Changeset 6003 for code/branches/ingamemenu/src/orxonox
- Timestamp:
- Oct 28, 2009, 5:58:11 PM (15 years ago)
- Location:
- code/branches/ingamemenu/src/orxonox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.cc
r5929 r6003 64 64 void GSGraphics::activate() 65 65 { 66 // add console command to toggle GUI 67 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI")); 66 68 67 } 69 68 … … 78 77 } 79 78 80 /**81 @brief82 Toggles the visibility of the current GUI83 84 This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.85 For more details on this function check out the Lua code.86 */87 void GSGraphics::toggleGUI()88 {89 GUIManager::getInstance().executeCode("toggleGUI()");90 }91 92 79 void GSGraphics::update(const Clock& time) 93 80 { -
code/branches/ingamemenu/src/orxonox/gamestates/GSGraphics.h
r5929 r6003 57 57 void update(const Clock& time); 58 58 59 void toggleGUI();60 61 59 private: 62 60 }; -
code/branches/ingamemenu/src/orxonox/gamestates/GSLevel.cc
r5966 r6003 101 101 if (show) 102 102 { 103 GUIManager::getInstance().showGUI("inGameTest"); 104 GUIManager::getInstance().executeCode("showCursor()"); 105 InputManager::getInstance().enterState("guiMouseOnly"); 103 GUIManager::showGUI("inGameTest"); 106 104 } 107 105 else 108 106 { 109 GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")"); 110 GUIManager::getInstance().executeCode("hideCursor()"); 111 InputManager::getInstance().leaveState("guiMouseOnly"); 107 GUIManager::hideGUI("inGameTest"); 112 108 } 113 109 } -
code/branches/ingamemenu/src/orxonox/gamestates/GSMainMenu.cc
r5929 r6003 82 82 { 83 83 // show main menu 84 GUIManager:: getInstance().showGUI("MainMenu");84 GUIManager::showGUI("MainMenu"); 85 85 GUIManager::getInstance().setCamera(this->camera_); 86 86 GraphicsManager::getInstance().setCamera(this->camera_); … … 111 111 112 112 InputManager::getInstance().leaveState("mainMenu"); 113 GUIManager::hideGUI("MainMenu"); 113 114 114 115 GUIManager::getInstance().setCamera(0); -
code/branches/ingamemenu/src/orxonox/pickup/PickupInventory.cc
r5781 r6003 86 86 { 87 87 if(PickupInventory::getSingleton()->isVisible()) { 88 GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")"); 89 GUIManager::getInstance().executeCode("hideCursor()"); 90 InputManager::getInstance().leaveState("guiMouseOnly"); 91 } 92 else 93 { 94 GUIManager::getInstance().showGUI("PickupInventory"); 95 GUIManager::getInstance().executeCode("showCursor()"); 96 InputManager::getInstance().enterState("guiMouseOnly"); 88 GUIManager::hideGUI("PickupInventory"); 89 } 90 else 91 { 92 GUIManager::showGUI("PickupInventory"); 97 93 } 98 94 PickupInventory::getSingleton()->setVisible(!PickupInventory::getSingleton()->isVisible()); -
code/branches/ingamemenu/src/orxonox/pickup/PickupSpawner.cc
r5929 r6003 96 96 // & load the GUI itself too, along with some empty windows 97 97 // = even less delays 98 GUIManager:: getInstance().showGUI("PickupInventory");99 GUIManager:: getInstance().executeCode("hideGUI(\"PickupInventory\")");98 GUIManager::showGUI("PickupInventory"); 99 GUIManager::hideGUI("PickupInventory"); 100 100 PickupInventory::getSingleton(); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.