X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=src%2FMain%2FFGEventHandler.hxx;h=3abea015e61d1855d6a63882b326c17a96db5b59;hb=da73dd97d3d0e36b6078728ac39f0b98cae46ff7;hp=652b2b74dc4bf305fa5bfbef8b1ed1ff6a2a6b64;hpb=74d9e3f2256d8cf430feedc5f68449d16c2d9b2d;p=flightgear.git diff --git a/src/Main/FGEventHandler.hxx b/src/Main/FGEventHandler.hxx index 652b2b74d..3abea015e 100644 --- a/src/Main/FGEventHandler.hxx +++ b/src/Main/FGEventHandler.hxx @@ -5,11 +5,26 @@ #include #include #include +#include #include "fg_os.hxx" namespace flightgear { + class FGStatsHandler : public osgViewer::StatsHandler + { + public: + FGStatsHandler() + { +#if (SG_OSG_VERSION >= 30000) + // Adjust font type/size for >=OSG3. + // OSG defaults aren't working/available for FG. + _font = "Fonts/helvetica_medium.txf"; + _characterSize = 12.0f; +#endif + } + }; + class FGEventHandler : public osgGA::GUIEventHandler { public: FGEventHandler(); @@ -34,26 +49,6 @@ public: return idleHandler; } - void setDrawHandler(fgDrawHandler drawHandler) - { - this->drawHandler = drawHandler; - } - - fgDrawHandler getDrawHandler() const - { - return drawHandler; - } - - void setWindowResizeHandler(fgWindowResizeHandler windowResizeHandler) - { - this->windowResizeHandler = windowResizeHandler; - } - - fgWindowResizeHandler getWindowResizeHandler() const - { - return windowResizeHandler; - } - void setKeyHandler(fgKeyHandler keyHandler) { this->keyHandler = keyHandler; @@ -103,12 +98,10 @@ public: protected: osg::ref_ptr _node; fgIdleHandler idleHandler; - fgDrawHandler drawHandler; - fgWindowResizeHandler windowResizeHandler; fgKeyHandler keyHandler; fgMouseClickHandler mouseClickHandler; fgMouseMotionHandler mouseMotionHandler; - osg::ref_ptr statsHandler; + osg::ref_ptr statsHandler; osg::ref_ptr statsEvent; int statsType; int currentModifiers;