Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 14, 2009, 11:50:47 AM (15 years ago)
Author:
rgrieder
Message:

Added window size as static variable to the WindowEventListener interface.
This resolves several hacks and inconveniences in Mouse, InputManager, InGameConsole, GSGraphics and OrxonoxOverlay.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/WindowEventListener.h

    r3290 r3291  
    3838    class _CoreExport WindowEventListener : virtual public OrxonoxClass
    3939    {
    40         public:
     40        friend class OgreWindowEventListener;
     41
     42        protected:
    4143            WindowEventListener();
    4244            virtual ~WindowEventListener() { }
    4345
     46            //! Returns the current render window width
     47            unsigned int getWindowWidth() const { return windowWidth_s; }
     48            //! Returns the current render window height
     49            unsigned int getWindowHeight() const { return windowHeight_s; }
     50
     51        private:
    4452            //! Window has been moved
    4553            virtual void windowMoved() { }
     
    5058            //! Window has lost/gained focus
    5159            virtual void windowFocusChanged() { }
     60
     61            static void moveWindow();
     62            static void resizeWindow(unsigned int newWidth, unsigned int newHeight);
     63            static void changeWindowFocus();
     64
     65            //! Static variable that holds the latest distributed information
     66            static unsigned int windowWidth_s;
     67            static unsigned int windowHeight_s;
    5268    };
    5369}
Note: See TracChangeset for help on using the changeset viewer.