Changeset 6417 for code/trunk/src/orxonox/gamestates/GSLevel.cc
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSLevel.cc
r5966 r6417 56 56 , guiKeysOnlyInputState_(0) 57 57 , startFile_(0) 58 , bShowIngameGUI_(false) 58 59 { 59 60 } … … 78 79 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 79 80 guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr()); 80 81 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSLevel::showIngameGUI, this), "showIngameGUI"));82 81 } 83 82 … … 91 90 // level is loaded: we can start capturing the input 92 91 InputManager::getInstance().enterState("game"); 93 92 94 93 // connect the HumanPlayer to the game 95 94 PlayerManager::getInstance().clientConnected(0); 96 }97 }98 99 void GSLevel::showIngameGUI(bool show)100 {101 if (show)102 {103 GUIManager::getInstance().showGUI("inGameTest");104 GUIManager::getInstance().executeCode("showCursor()");105 InputManager::getInstance().enterState("guiMouseOnly");106 }107 else108 {109 GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");110 GUIManager::getInstance().executeCode("hideCursor()");111 InputManager::getInstance().leaveState("guiMouseOnly");112 95 } 113 96 } … … 122 105 InputManager::getInstance().leaveState("game"); 123 106 } 124 107 125 108 // disconnect all HumanPlayers 126 109 PlayerManager::getInstance().disconnectAllClients(); … … 152 135 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 153 136 this->staticObjects_.insert(*it); 154 137 155 138 // call the loader 156 139 COUT(0) << "Loading level..." << std::endl; … … 171 154 if (find == this->staticObjects_.end()) 172 155 { 173 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ")"<< std::endl;156 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ')' << std::endl; 174 157 } 175 158 }
Note: See TracChangeset
for help on using the changeset viewer.