Changeset 7284 for code/trunk/src/libraries/core/input/Mouse.cc
- Timestamp:
- Aug 31, 2010, 3:37:40 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/input/Mouse.cc
r5929 r7284 30 30 31 31 #include <ois/OISMouse.h> 32 #include "core/ConsoleCommand.h"33 32 #include "core/CoreIncludes.h" 33 #include "core/command/ConsoleCommand.h" 34 34 #include "InputState.h" 35 35 … … 41 41 namespace orxonox 42 42 { 43 #ifdef ORXONOX_PLATFORM_LINUX 44 static const std::string __CC_Mouse_name = "Mouse"; 45 static const std::string __CC_grab_name = "grab"; 46 static const std::string __CC_ungrab_name = "ungrab"; 47 48 SetConsoleCommand(__CC_Mouse_name, __CC_grab_name, &Mouse::grab); 49 SetConsoleCommand(__CC_Mouse_name, __CC_ungrab_name, &Mouse::ungrab); 50 #endif 51 43 52 Mouse::Mouse(unsigned int id, OIS::InputManager* oisInputManager) 44 53 : super(id, oisInputManager) … … 48 57 49 58 #ifdef ORXONOX_PLATFORM_LINUX 50 // Mouse grab console command 51 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&Mouse::grab, this), "grab"), false); 52 // Mouse ungrab console command 53 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&Mouse::ungrab, this), "ungrab"), false); 59 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(this); 60 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(this); 61 #endif 62 } 63 64 Mouse::~Mouse() 65 { 66 #ifdef ORXONOX_PLATFORM_LINUX 67 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(0); 68 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(0); 54 69 #endif 55 70 }
Note: See TracChangeset
for help on using the changeset viewer.