Added ability to customize the keys used to control stats

This commit is contained in:
Robert Osfield
2007-01-23 11:56:10 +00:00
parent affb8f1289
commit 691e4d7b88
2 changed files with 13 additions and 2 deletions

View File

@@ -34,6 +34,12 @@ class StatsHandler : public osgGA::GUIEventHandler
SCENE_STATS = 3,
LAST = 4
};
void setKeyEventTogglesOnScreenStats(int key) { _keyEventTogglesOnScreenStats = key; }
int getKeyEventTogglesOnScreenStats() const { return _keyEventTogglesOnScreenStats; }
void setKeyEventPrintsOutStats(int key) { _keyEventPrintsOutStats = key; }
int getKeyEventPrintsOutStats() const { return _keyEventPrintsOutStats; }
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
@@ -53,6 +59,9 @@ class StatsHandler : public osgGA::GUIEventHandler
void setUpScene(osgViewer::Viewer* viewer);
int _keyEventTogglesOnScreenStats;
int _keyEventPrintsOutStats;
int _statsType;
osg::ref_ptr<osg::Camera> _camera;
osg::ref_ptr<osg::Switch> _switch;