Changeset 2808 for code/branches/gui/src/orxonox/gamestates
- Timestamp:
- Mar 21, 2009, 1:07:53 AM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/gamestates
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSGUI.cc
r2801 r2808 53 53 54 54 // show main menu 55 guiManager_->loadScene("MainMenu");55 //guiManager_->loadScene("MainMenu"); 56 56 guiManager_->showGUI("MainMenu", 0); 57 57 GraphicsManager::getInstance().getViewport()->setCamera(guiManager_->getCamera()); -
code/branches/gui/src/orxonox/gamestates/GSStandalone.cc
r2801 r2808 39 39 namespace orxonox 40 40 { 41 SetConsoleCommand(GSStandalone, showGUI, true).setAsInputCommand();42 43 bool GSStandalone::guiShowing_s = false;44 45 41 GSStandalone::GSStandalone() 46 42 : GameState<GSGraphics>("standalone") … … 52 48 } 53 49 54 void GSStandalone::showGUI()55 {56 GSStandalone::guiShowing_s = true;57 }58 50 59 51 void GSStandalone::enter() … … 66 58 // not sure if necessary 67 59 // guiManager_->loadScene("IngameMenu"); 60 61 Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport(); 62 guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager()); 68 63 } 69 64 … … 77 72 void GSStandalone::ticked(const Clock& time) 78 73 { 79 if (guiShowing_s) 80 { 81 Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport(); 82 guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager()); 83 } 84 else 85 { 86 if (guiManager_) 87 guiManager_->hideGUI(); 88 } 74 Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport(); 75 //COUT(0) << "** " << viewport->getCamera()->getSceneManager() << std::endl; 76 //guiManager_->testFct(); 77 //Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport(); 78 guiManager_->showGUI("IngameMenu", viewport->getCamera()->getSceneManager()); 79 89 80 // tick CEGUI 90 81 guiManager_->update(time); -
code/branches/gui/src/orxonox/gamestates/GSStandalone.h
r2790 r2808 41 41 GSStandalone(); 42 42 ~GSStandalone(); 43 static void showGUI();44 43 45 44 private: … … 49 48 50 49 GUIManager* guiManager_; 51 static bool guiShowing_s;52 50 }; 53 51 }
Note: See TracChangeset
for help on using the changeset viewer.