From: <sv...@ww...> - 2007-07-27 22:38:47
|
Author: nsmoooose Date: 2007-07-27 15:37:40 -0700 (Fri, 27 Jul 2007) New Revision: 2155 Modified: trunk/csp/cspsim/GameScreen.cpp trunk/csp/cspsim/GameScreen.h Log: Fixed hover effects on user interface elements like buttons. This didn't work due to the fact that the window manager didn't receive mouse movement events. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2155 Modified: trunk/csp/cspsim/GameScreen.cpp =================================================================== --- trunk/csp/cspsim/GameScreen.cpp 2007-07-27 21:49:18 UTC (rev 2154) +++ trunk/csp/cspsim/GameScreen.cpp 2007-07-27 22:37:40 UTC (rev 2155) @@ -505,5 +505,10 @@ } } +bool GameScreen::onMouseMove(SDL_MouseMotionEvent const &event) { + // Let the window manager process the input interface events. + return getWindowManager()->onMouseMove(event.x, event.y, event.xrel, event.yrel); +} + CSP_NAMESPACE_END Modified: trunk/csp/cspsim/GameScreen.h =================================================================== --- trunk/csp/cspsim/GameScreen.h 2007-07-27 21:49:18 UTC (rev 2154) +++ trunk/csp/cspsim/GameScreen.h 2007-07-27 22:37:40 UTC (rev 2155) @@ -190,6 +190,10 @@ // Handles signals to be emitted to the python gui code. For example player QUIT action. Ref<wf::InputInterfaceManager> m_InputInterfaceManager; + + // Receives mouse move events from the input interface and sends + // them on to the window framework for processing. + bool onMouseMove(SDL_MouseMotionEvent const &event); }; CSP_NAMESPACE_END |