Added Escape to the help list.
Changed the help key from '?' to 'h'
This commit is contained in:
@@ -54,6 +54,10 @@ class OSGPRODUCER_EXPORT KeyboardMouseCallback : public Producer::KeyboardMouseC
|
||||
virtual void specialKeyRelease( Producer::KeyCharacter key);
|
||||
|
||||
|
||||
void setEscapeSetDone(bool esc) { _escapeKeySetsDone = esc; }
|
||||
bool getEscapeSetDone() const { return _escapeKeySetsDone; }
|
||||
|
||||
|
||||
// local methods and members
|
||||
typedef std::vector< osg::ref_ptr<EventAdapter> > EventQueue;
|
||||
|
||||
|
||||
@@ -293,6 +293,11 @@ void Viewer::requestWarpPointer(int x,int y)
|
||||
|
||||
void Viewer::getUsage(osg::ApplicationUsage& usage) const
|
||||
{
|
||||
if (_kbmcb && _kbmcb->getEscapeSetDone())
|
||||
{
|
||||
usage.addKeyboardMouseBinding("Escape","Exit the application");
|
||||
}
|
||||
|
||||
for(EventHandlerList::const_iterator itr=_eventHandlerList.begin();
|
||||
itr!=_eventHandlerList.end();
|
||||
++itr)
|
||||
|
||||
@@ -735,8 +735,7 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio
|
||||
}
|
||||
|
||||
case osgGA::GUIEventAdapter::KEY_Help :
|
||||
case '/' :
|
||||
case '?' :
|
||||
case 'h' :
|
||||
{
|
||||
setDisplayHelp(!getDisplayHelp());
|
||||
return true;
|
||||
@@ -759,7 +758,7 @@ void ViewerEventHandler::accept(osgGA::GUIEventHandlerVisitor& gehv)
|
||||
void ViewerEventHandler::getUsage(osg::ApplicationUsage& usage) const
|
||||
{
|
||||
usage.addKeyboardMouseBinding("f","Toggle fullscreen");
|
||||
usage.addKeyboardMouseBinding("?","Display help");
|
||||
usage.addKeyboardMouseBinding("h","Display help");
|
||||
usage.addKeyboardMouseBinding("o","Write scene graph to file");
|
||||
usage.addKeyboardMouseBinding("s","Toggle intrumention");
|
||||
usage.addKeyboardMouseBinding("v","Toggle block and vsync");
|
||||
|
||||
Reference in New Issue
Block a user