Changeset 7284 for code/trunk/src/libraries/core/input/InputManager.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/InputManager.cc
r7266 r7284 47 47 #include "core/CoreIncludes.h" 48 48 #include "core/ConfigValueIncludes.h" 49 #include "core/ConsoleCommand.h"50 49 #include "core/CommandLineParser.h" 51 #include "core/Functor.h"52 50 #include "core/GraphicsManager.h" 51 #include "core/command/ConsoleCommand.h" 52 #include "core/command/Functor.h" 53 53 54 54 #include "InputBuffer.h" … … 61 61 { 62 62 SetCommandLineSwitch(keyboard_no_grab).information("Whether not to exclusively grab the keyboard"); 63 64 static const std::string __CC_InputManager_name = "InputManager"; 65 static const std::string __CC_calibrate_name = "calibrate"; 66 static const std::string __CC_reload_name = "reload"; 67 68 SetConsoleCommand(__CC_InputManager_name, __CC_calibrate_name, &InputManager::calibrate).addShortcut(); 69 SetConsoleCommand(__CC_InputManager_name, __CC_reload_name, &InputManager::reload ); 63 70 64 71 // Abuse of this source file for the InputHandler … … 118 125 this->updateActiveStates(); 119 126 120 // calibrate console command 121 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&InputManager::calibrate, this), "calibrate"), true); 122 // reload console command 123 this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(&InputManager::reload, this), "reload"), false); 127 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(this); 128 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(this); 124 129 125 130 CCOUT(4) << "Construction complete." << std::endl; … … 287 292 if (!(internalState_ & Bad)) 288 293 this->destroyDevices(); 294 295 // Reset console commands 296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(0); 297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(0); 289 298 290 299 CCOUT(3) << "Destruction complete." << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.