Changeset 7236 for code/branches/consolecommands3/src/libraries/core/input
- Timestamp:
- Aug 28, 2010, 1:51:04 AM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/core/input
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/input/InputManager.cc
r7219 r7236 66 66 static const std::string __CC_reload_name = "reload"; 67 67 68 _SetConsoleCommand(__CC_InputManager_name, __CC_calibrate_name, &InputManager::calibrate).addShortcut();69 _SetConsoleCommand(__CC_InputManager_name, __CC_reload_name, &InputManager::reload );68 SetConsoleCommand(__CC_InputManager_name, __CC_calibrate_name, &InputManager::calibrate).addShortcut(); 69 SetConsoleCommand(__CC_InputManager_name, __CC_reload_name, &InputManager::reload ); 70 70 71 71 // Abuse of this source file for the InputHandler … … 125 125 this->updateActiveStates(); 126 126 127 _ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(this);128 _ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(this);127 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(this); 128 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(this); 129 129 130 130 CCOUT(4) << "Construction complete." << std::endl; … … 294 294 295 295 // Reset console commands 296 _ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(0);297 _ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(0);296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(0); 297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(0); 298 298 299 299 CCOUT(3) << "Destruction complete." << std::endl; -
code/branches/consolecommands3/src/libraries/core/input/KeyBinderManager.cc
r7219 r7236 48 48 static const std::string __CC_tunbind_name = "tunbind"; 49 49 50 _SetConsoleCommand(__CC_keybind_name, &KeyBinderManager::keybind).defaultValues("");51 _SetConsoleCommand(__CC_tkeybind_name, &KeyBinderManager::tkeybind).defaultValues("");52 _SetConsoleCommand(__CC_unbind_name, &KeyBinderManager::unbind).defaultValues("");53 _SetConsoleCommand(__CC_tunbind_name, &KeyBinderManager::tunbind).defaultValues("");50 SetConsoleCommand(__CC_keybind_name, &KeyBinderManager::keybind).defaultValues(""); 51 SetConsoleCommand(__CC_tkeybind_name, &KeyBinderManager::tkeybind).defaultValues(""); 52 SetConsoleCommand(__CC_unbind_name, &KeyBinderManager::unbind).defaultValues(""); 53 SetConsoleCommand(__CC_tunbind_name, &KeyBinderManager::tunbind).defaultValues(""); 54 54 55 55 KeyBinderManager::KeyBinderManager() … … 62 62 63 63 // keybind console commands 64 _ModifyConsoleCommand(__CC_keybind_name ).setObject(this);65 _ModifyConsoleCommand(__CC_tkeybind_name).setObject(this);66 _ModifyConsoleCommand(__CC_unbind_name ).setObject(this);67 _ModifyConsoleCommand(__CC_tunbind_name ).setObject(this);64 ModifyConsoleCommand(__CC_keybind_name ).setObject(this); 65 ModifyConsoleCommand(__CC_tkeybind_name).setObject(this); 66 ModifyConsoleCommand(__CC_unbind_name ).setObject(this); 67 ModifyConsoleCommand(__CC_tunbind_name ).setObject(this); 68 68 69 69 // Load default key binder … … 78 78 79 79 // Reset console commands 80 _ModifyConsoleCommand(__CC_keybind_name ).setObject(0);81 _ModifyConsoleCommand(__CC_tkeybind_name).setObject(0);82 _ModifyConsoleCommand(__CC_unbind_name ).setObject(0);83 _ModifyConsoleCommand(__CC_tunbind_name ).setObject(0);80 ModifyConsoleCommand(__CC_keybind_name ).setObject(0); 81 ModifyConsoleCommand(__CC_tkeybind_name).setObject(0); 82 ModifyConsoleCommand(__CC_unbind_name ).setObject(0); 83 ModifyConsoleCommand(__CC_tunbind_name ).setObject(0); 84 84 } 85 85 -
code/branches/consolecommands3/src/libraries/core/input/KeyDetector.cc
r7219 r7236 41 41 42 42 static const std::string __CC_KeyDetector_callback_name = "KeyDetectorKeyPressed"; 43 _DeclareConsoleCommand(__CC_KeyDetector_callback_name, &prototype::void__string);43 DeclareConsoleCommand(__CC_KeyDetector_callback_name, &prototype::void__string); 44 44 45 45 KeyDetector::KeyDetector() … … 48 48 RegisterObject(KeyDetector); 49 49 50 _ModifyConsoleCommand(__CC_KeyDetector_callback_name).setFunction(&KeyDetector::callback, this);50 ModifyConsoleCommand(__CC_KeyDetector_callback_name).setFunction(&KeyDetector::callback, this); 51 51 52 52 this->assignCommands(); … … 62 62 inputState_->setHandler(NULL); 63 63 InputManager::getInstance().destroyState("detector"); 64 _ModifyConsoleCommand(__CC_KeyDetector_callback_name).resetFunction();64 ModifyConsoleCommand(__CC_KeyDetector_callback_name).resetFunction(); 65 65 } 66 66 -
code/branches/consolecommands3/src/libraries/core/input/Mouse.cc
r7220 r7236 46 46 static const std::string __CC_ungrab_name = "ungrab"; 47 47 48 _SetConsoleCommand(__CC_Mouse_name, __CC_grab_name, &Mouse::grab);49 _SetConsoleCommand(__CC_Mouse_name, __CC_ungrab_name, &Mouse::ungrab);48 SetConsoleCommand(__CC_Mouse_name, __CC_grab_name, &Mouse::grab); 49 SetConsoleCommand(__CC_Mouse_name, __CC_ungrab_name, &Mouse::ungrab); 50 50 #endif 51 51 … … 57 57 58 58 #ifdef ORXONOX_PLATFORM_LINUX 59 _ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(this);60 _ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(this);59 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(this); 60 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(this); 61 61 #endif 62 62 } … … 65 65 { 66 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);67 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(0); 68 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(0); 69 69 #endif 70 70 }
Note: See TracChangeset
for help on using the changeset viewer.