Changeset 3327 for code/trunk/src/orxonox/gamestates/GSLevel.cc
- Timestamp:
- Jul 19, 2009, 5:31:02 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 merged: 3269,3271-3275,3278,3285,3290-3294,3310
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSLevel.cc
r3280 r3327 31 31 32 32 #include "core/input/InputManager.h" 33 #include "core/input/ SimpleInputState.h"33 #include "core/input/InputState.h" 34 34 #include "core/input/KeyBinder.h" 35 35 #include "core/Clock.h" … … 90 90 if (GameMode::showsGraphics()) 91 91 { 92 gameInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("game");92 gameInputState_ = InputManager::getInstance().createInputState("game"); 93 93 keyBinder_ = new KeyBinder(); 94 94 keyBinder_->loadBindings("keybindings.ini"); 95 95 gameInputState_->setHandler(keyBinder_); 96 96 97 guiMouseOnlyInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("guiMouseOnly");97 guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly"); 98 98 guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr()); 99 99 100 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState <SimpleInputState>("guiKeysOnly");100 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 101 101 guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr()); 102 102 … … 134 134 135 135 // level is loaded: we can start capturing the input 136 InputManager::getInstance(). requestEnterState("game");136 InputManager::getInstance().enterState("game"); 137 137 } 138 138 } … … 144 144 GUIManager::getInstance().showGUI("inGameTest"); 145 145 GUIManager::getInstance().executeCode("showCursor()"); 146 InputManager::getInstance(). requestEnterState("guiMouseOnly");146 InputManager::getInstance().enterState("guiMouseOnly"); 147 147 } 148 148 else … … 150 150 GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")"); 151 151 GUIManager::getInstance().executeCode("hideCursor()"); 152 InputManager::getInstance(). requestLeaveState("guiMouseOnly");152 InputManager::getInstance().leaveState("guiMouseOnly"); 153 153 } 154 154 } … … 178 178 179 179 if (GameMode::showsGraphics()) 180 InputManager::getInstance(). requestLeaveState("game");180 InputManager::getInstance().leaveState("game"); 181 181 182 182 if (GameMode::isMaster()) … … 218 218 guiMouseOnlyInputState_->setHandler(0); 219 219 guiKeysOnlyInputState_->setHandler(0); 220 InputManager::getInstance(). requestDestroyState("game");220 InputManager::getInstance().destroyState("game"); 221 221 if (this->keyBinder_) 222 222 { … … 286 286 { 287 287 COUT(0) << "Press any button/key or move a mouse/joystick axis" << std::endl; 288 InputManager::getInstance(). requestEnterState("detector");288 InputManager::getInstance().enterState("detector"); 289 289 bindingString = command; 290 290 bTemporarySaved = bTemporary; … … 301 301 COUT(0) << "Binding string \"" << bindingString << "\" on key '" << name << "'" << std::endl; 302 302 this->keyBinder_->setBinding(bindingString, name, bTemporarySaved); 303 InputManager::getInstance(). requestLeaveState("detector");303 InputManager::getInstance().leaveState("detector"); 304 304 bound = true; 305 305 }
Note: See TracChangeset
for help on using the changeset viewer.