Changeset 7874
- Timestamp:
- Feb 13, 2011, 1:25:46 AM (14 years ago)
- Location:
- code/trunk/src/libraries/core
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/GUIManager.cc
r7873 r7874 393 393 394 394 /** 395 @brief Indicates that the mouse left the application's window. 396 */ 397 void GUIManager::mouseLeft() 398 { 399 this->protectedCall(boost::bind(&CEGUI::System::injectMouseLeaves, _1)); 400 } 401 402 /** 395 403 @brief 396 404 converts mouse event code to CEGUI event code … … 505 513 this->guiRenderer_->setDisplaySize(CEGUI::Size(newWidth, newHeight)); 506 514 } 515 516 /** 517 @brief Notify CEGUI if the windows loses the focus (stops higlight of menu items, etc). 518 */ 519 void GUIManager::windowFocusChanged(bool bFocus) 520 { 521 if (!bFocus) 522 this->mouseLeft(); 523 } 507 524 } -
code/trunk/src/libraries/core/GUIManager.h
r7873 r7874 132 132 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize); 133 133 void mouseScrolled (int abs, int rel); 134 void mouseLeft (); 134 135 135 136 // window event handler 136 137 virtual void windowResized(unsigned int newWidth, unsigned int newHeight); 138 virtual void windowFocusChanged(bool bFocus); 137 139 138 140 scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_; //!< CEGUI's interface to the Ogre Engine -
code/trunk/src/libraries/core/GraphicsManager.cc
r7870 r7874 75 75 { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); } 76 76 void windowFocusChange (Ogre::RenderWindow* rw) 77 { orxonox::WindowEventListener::changeWindowFocus( ); }77 { orxonox::WindowEventListener::changeWindowFocus(rw->isActive()); } 78 78 void windowClosed (Ogre::RenderWindow* rw) 79 79 { orxonox::Game::getInstance().stop(); } -
code/trunk/src/libraries/core/WindowEventListener.cc
r5781 r7874 57 57 58 58 //! Calls all registered objects 59 /*static*/ void WindowEventListener::changeWindowFocus( )59 /*static*/ void WindowEventListener::changeWindowFocus(bool bFocus) 60 60 { 61 61 for (ObjectList<WindowEventListener>::iterator it = ObjectList<WindowEventListener>::begin(); it; ++it) 62 it->windowFocusChanged( );62 it->windowFocusChanged(bFocus); 63 63 } 64 64 } -
code/trunk/src/libraries/core/WindowEventListener.h
r7401 r7874 62 62 63 63 //! Window has lost/gained focus 64 virtual void windowFocusChanged( ) { }64 virtual void windowFocusChanged(bool bFocus) { } 65 65 66 66 static void moveWindow(); 67 67 static void resizeWindow(unsigned int newWidth, unsigned int newHeight); 68 static void changeWindowFocus( );68 static void changeWindowFocus(bool bFocus); 69 69 70 70 //! Static variable that holds the latest distributed information -
code/trunk/src/libraries/core/input/InputManager.cc
r7401 r7874 496 496 497 497 //! Gets called by WindowEventListener upon focus change --> clear buffers 498 void InputManager::windowFocusChanged( )498 void InputManager::windowFocusChanged(bool bFocus) 499 499 { 500 500 this->clearBuffers(); -
code/trunk/src/libraries/core/input/InputManager.h
r7401 r7874 202 202 203 203 // From WindowEventListener 204 void windowFocusChanged( );204 void windowFocusChanged(bool bFocus); 205 205 206 206 private: // variables
Note: See TracChangeset
for help on using the changeset viewer.