Changeset 6150 for code/branches/presentation2/src/libraries/core/Game.cc
- Timestamp:
- Nov 25, 2009, 4:52:37 PM (15 years ago)
- Location:
- code/branches/presentation2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2
- Property svn:mergeinfo changed
/code/branches/ingamemenu (added) merged: 6003,6018-6020,6022-6023 /code/branches/menu (added) merged: 5941,5944,5952,6024,6032,6036,6047-6049,6051,6145-6146,6148
- Property svn:mergeinfo changed
-
code/branches/presentation2/src/libraries/core/Game.cc
r6121 r6150 51 51 #include "GameMode.h" 52 52 #include "GameState.h" 53 #include "GUIManager.h" 53 54 54 55 namespace orxonox … … 57 58 { Game::getInstance().stop(); } 58 59 SetConsoleCommandShortcutExternAlias(stop_game, "exit"); 60 static void key_esc() 61 { Game::getInstance().keyESC(); } 62 SetConsoleCommandShortcutExternAlias(key_esc, "keyESC"); 59 63 static void printFPS() 60 64 { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; } … … 327 331 } 328 332 333 void Game::keyESC() 334 { 335 if( this->getState("mainMenu") && this->getState("mainMenu")->getActivity().active==true ) 336 this->stop(); 337 else 338 GUIManager::getInstance().keyESC(); 339 } 340 329 341 void Game::stop() 330 342 { … … 557 569 558 570 shared_ptr<GameState> state = this->getState(name); 559 state->activate ();571 state->activateInternal(); 560 572 if (!this->loadedStates_.empty()) 561 573 this->loadedStates_.back()->activity_.topState = false; … … 576 588 if (!this->loadedStates_.empty()) 577 589 this->loadedStates_.back()->activity_.topState = true; 578 state->deactivate ();590 state->deactivateInternal(); 579 591 } 580 592 catch (...)
Note: See TracChangeset
for help on using the changeset viewer.