Changeset 2790 for code/trunk/src/orxonox/gamestates
- Timestamp:
- Mar 16, 2009, 11:47:06 AM (16 years ago)
- Location:
- code/trunk/src/orxonox/gamestates
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gamestates/GSGUI.cc
r2087 r2790 51 51 52 52 // show main menu 53 guiManager_->loadScene("MainMenu"); 53 54 guiManager_->showGUI("MainMenu", 0); 54 55 getParent()->getViewport()->setCamera(guiManager_->getCamera()); -
code/trunk/src/orxonox/gamestates/GSLevel.h
r2710 r2790 43 43 ~GSLevel(); 44 44 45 // was private before (is public now because of console command in GSStandalone) 46 void setConfigValues(); 47 45 48 protected: 46 49 void enter(Ogre::Viewport* viewport); … … 71 74 ConsoleCommand* ccTkeybind_; 72 75 73 private:74 void setConfigValues();75 76 76 }; 77 77 } -
code/trunk/src/orxonox/gamestates/GSStandalone.cc
r2087 r2790 30 30 #include "GSStandalone.h" 31 31 32 #include <OgreViewport.h> 33 #include <OgreCamera.h> 32 34 #include "core/Core.h" 35 #include "core/ConsoleCommand.h" 36 #include "gui/GUIManager.h" 33 37 34 38 namespace orxonox 35 39 { 40 SetConsoleCommand(GSStandalone, showGUI, true).setAsInputCommand(); 41 42 bool GSStandalone::guiShowing_s = false; 43 36 44 GSStandalone::GSStandalone() 37 45 : GameState<GSGraphics>("standalone") … … 43 51 } 44 52 53 void GSStandalone::showGUI() 54 { 55 GSStandalone::guiShowing_s = true; 56 } 57 45 58 void GSStandalone::enter() 46 59 { … … 48 61 49 62 GSLevel::enter(this->getParent()->getViewport()); 63 64 guiManager_ = getParent()->getGUIManager(); 65 // not sure if necessary 66 // guiManager_->loadScene("IngameMenu"); 50 67 } 51 68 … … 59 76 void GSStandalone::ticked(const Clock& time) 60 77 { 78 if (guiShowing_s) 79 { 80 guiManager_->showGUI("IngameMenu", this->getParent()->getViewport()->getCamera()->getSceneManager()); 81 } 82 else 83 { 84 if (guiManager_) 85 guiManager_->hideGUI(); 86 } 87 // tick CEGUI 88 guiManager_->tick(time.getDeltaTime()); 89 61 90 GSLevel::ticked(time); 62 91 this->tickChild(time); -
code/trunk/src/orxonox/gamestates/GSStandalone.h
r2087 r2790 41 41 GSStandalone(); 42 42 ~GSStandalone(); 43 static void showGUI(); 43 44 44 45 private: … … 46 47 void leave(); 47 48 void ticked(const Clock& time); 49 50 GUIManager* guiManager_; 51 static bool guiShowing_s; 48 52 }; 49 53 }
Note: See TracChangeset
for help on using the changeset viewer.