Changeset 5863 for code/branches/core5/src/orxonox/gamestates/GSGraphics.cc
- Timestamp:
- Oct 3, 2009, 5:33:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/gamestates/GSGraphics.cc
r5855 r5863 41 41 #include "core/Game.h" 42 42 #include "core/GUIManager.h" 43 #include "core/input/InputManager.h"44 #include "core/input/KeyBinder.h"45 #include "core/input/InputState.h"46 43 #include "core/Loader.h" 47 44 #include "core/XMLFile.h" … … 56 53 GSGraphics::GSGraphics(const GameStateInfo& info) 57 54 : GameState(info) 58 , masterKeyBinder_(0)59 , masterInputState_(0)60 55 , debugOverlay_(0) 61 56 { 62 // load master key bindings63 masterInputState_ = InputManager::getInstance().createInputState("master", true);64 masterKeyBinder_ = new KeyBinder();65 masterInputState_->setKeyHandler(masterKeyBinder_);66 57 } 67 58 68 59 GSGraphics::~GSGraphics() 69 60 { 70 InputManager::getInstance().destroyState("master");71 this->masterKeyBinder_->destroy();72 61 } 73 62 … … 94 83 Loader::open(debugOverlay_); 95 84 96 masterKeyBinder_->loadBindings("masterKeybindings.ini");97 98 85 // add console command to toggle GUI 99 86 this->ccToggleGUI_ = createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI"); 100 87 CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_); 101 102 // enable master input103 InputManager::getInstance().enterState("master");104 88 } 105 89
Note: See TracChangeset
for help on using the changeset viewer.