Changeset 2869 for code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
- Timestamp:
- Mar 30, 2009, 11:34:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
r2854 r2869 36 36 #include "core/ConfigValueIncludes.h" 37 37 #include "core/Clock.h" 38 #include "core/ConsoleCommand.h" 38 39 #include "core/Core.h" 39 40 #include "core/CoreIncludes.h" … … 110 111 guiManager_->initialise(renderWindow); 111 112 113 FunctorMember<GSGraphics>* functor = createFunctor(&GSGraphics::toggleGUI); 114 functor->setObject(this); 115 this->ccToggleGUI_ = createConsoleCommand(functor, "toggleGUI"); 116 CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_); 117 118 112 119 InputManager::getInstance().requestEnterState("master"); 113 120 } … … 115 122 void GSGraphics::deactivate() 116 123 { 124 125 if (this->ccToggleGUI_) 126 { 127 delete this->ccToggleGUI_; 128 this->ccToggleGUI_ = 0; 129 } 130 117 131 masterInputState_->setHandler(0); 118 132 InputManager::getInstance().requestDestroyState("master"); … … 131 145 132 146 GameMode::setShowsGraphics(false); 147 } 148 149 void GSGraphics::toggleGUI() 150 { 151 GUIManager::getInstance().executeCode("toggleGUI()"); 133 152 } 134 153
Note: See TracChangeset
for help on using the changeset viewer.