Changeset 7220
- Timestamp:
- Aug 26, 2010, 12:29:33 AM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/input/Mouse.cc
r7204 r7220 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 } -
code/branches/consolecommands3/src/libraries/core/input/Mouse.h
r5781 r7220 64 64 //! Only sets the clipping size. Initialising is done in the base class. 65 65 Mouse(unsigned int id, OIS::InputManager* oisInputManager); 66 ~Mouse() { }66 ~Mouse(); 67 67 68 68 #ifdef ORXONOX_PLATFORM_LINUX
Note: See TracChangeset
for help on using the changeset viewer.