Changeset 2850 for code/branches/gui/src/orxonox/gamestates/GSLevel.cc
- Timestamp:
- Mar 25, 2009, 11:53:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSLevel.cc
r2848 r2850 49 49 #include "LevelManager.h" 50 50 #include "PlayerManager.h" 51 #include "gui/GUIManager.h" 51 52 52 53 namespace orxonox … … 86 87 if (GameMode::showsGraphics()) 87 88 { 89 { 90 FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::toggleGUI); 91 functor->setObject(this); 92 this->ccToggleGUI_ = createConsoleCommand(functor, "toggleGUI"); 93 CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_); 94 } 95 88 96 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game"); 89 97 keyBinder_ = new KeyBinder(); … … 110 118 if (GameMode::showsGraphics()) 111 119 { 112 // TODO: insert slomo console command with113 // .accessLevel(AccessLevel::Offline).defaultValue(0, 1.0).axisParamIndex(0).isAxisRelative(false);114 115 120 // keybind console command 116 121 FunctorMember<GSLevel>* functor1 = createFunctor(&GSLevel::keybind); … … 125 130 InputManager::getInstance().setKeyDetectorCallback(std::string("keybind ") + keyDetectorCallbackCode_); 126 131 132 // InGame GUI test 133 GUIManager::getInstance().showGUI("inGameTest"); 134 127 135 // level is loaded: we can start capturing the input 128 136 InputManager::getInstance().requestEnterState("game"); … … 143 151 this->ccTkeybind_ = 0; 144 152 } 153 if (this->ccToggleGUI_) 154 { 155 delete this->ccToggleGUI_; 156 this->ccToggleGUI_ = 0; 157 } 158 145 159 146 160 // this call will delete every BaseObject! … … 219 233 220 234 delete this->startFile_; 235 } 236 237 void GSLevel::toggleGUI() 238 { 239 if (GameMode::showsGraphics()) 240 { 241 GUIManager::getInstance().executeCode("toggleGUI()"); 242 } 221 243 } 222 244
Note: See TracChangeset
for help on using the changeset viewer.