Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7873


Ignore:
Timestamp:
Feb 12, 2011, 9:10:41 PM (14 years ago)
Author:
landauf
Message:

fixed mouse cursor offset after window resize

Location:
code/trunk/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GUIManager.cc

    r7811 r7873  
    190190    void GUIManager::changedGUIScheme(void)
    191191    {
    192        
     192
    193193    }
    194194
     
    498498    }
    499499
     500    /**
     501        @brief Callback of window event listener, called if the window is resized. Sets the display size of CEGUI.
     502    */
     503    void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight)
     504    {
     505        this->guiRenderer_->setDisplaySize(CEGUI::Size(newWidth, newHeight));
     506    }
    500507}
  • code/trunk/src/libraries/core/GUIManager.h

    r7801 r7873  
    5050#include "input/InputHandler.h"
    5151#include "OrxonoxClass.h"
     52#include "WindowEventListener.h"
    5253
    5354// Tolua includes (have to be relative to the current directory)
     
    7172    */
    7273    class _CoreExport GUIManager // tolua_export
    73         : public Singleton<GUIManager>, public InputHandler, public OrxonoxClass
     74        : public Singleton<GUIManager>, public InputHandler, public WindowEventListener
    7475    { // tolua_export
    7576        friend class Singleton<GUIManager>;
     
    132133        void mouseScrolled (int abs, int rel);
    133134
     135        // window event handler
     136        virtual void windowResized(unsigned int newWidth, unsigned int newHeight);
     137
    134138        scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
    135139        scoped_ptr<LuaState>                 luaState_;         //!< LuaState, access point to the Lua engine
Note: See TracChangeset for help on using the changeset viewer.