Changeset 6032 for code/branches/menu/src
- Timestamp:
- Nov 4, 2009, 5:30:38 PM (15 years ago)
- Location:
- code/branches/menu/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/src/libraries/core/GUIManager.cc
r6024 r6032 89 89 GUIManager* GUIManager::singletonPtr_s = 0; 90 90 91 SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, true);91 SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, false).defaultValue(2, true); 92 92 SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User); 93 93 … … 210 210 For more details check out loadGUI_2.lua where the function presides. 211 211 */ 212 /*static*/ void GUIManager::showGUI(const std::string& name, bool showCursor)212 /*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor) 213 213 { 214 214 std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name); … … 220 220 InputManager::getInstance().enterState("guiMouseOnly"); 221 221 } 222 GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ")"); 222 COUT(0) << "showGUI" << endl; 223 GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")"); 223 224 } 224 225 … … 227 228 Hack-ish. Needed for GUIOverlay. 228 229 */ 229 void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor)230 void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor) 230 231 { 231 232 std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name); … … 237 238 InputManager::getInstance().enterState("guiMouseOnly"); 238 239 } 239 this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>( showCursor) + ", " + ptr + ")");240 this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")"); 240 241 } 241 242 … … 258 259 } 259 260 } 261 262 void GUIManager::setToggleMode(const bool& mode) 263 { 264 this->bToggleMode_ = mode; 265 this->executeCode("setToggleMode(" + multi_cast<std::string>(mode) + ")"); 266 } 267 268 void GUIManager::setBackground(const std::string& name) 269 { 270 this->executeCode("setBackground(\"" + name + "\")"); 271 } 260 272 261 273 void GUIManager::keyPressed(const KeyEvent& evt) -
code/branches/menu/src/libraries/core/GUIManager.h
r6024 r6032 68 68 void update(const Clock& time); 69 69 70 static void showGUI(const std::string& name, bool showCursor=true);71 void showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor=true);70 static void showGUI(const std::string& name, bool hidePrevious=false, bool showCursor=true); 71 void showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious=false, bool showCursor=true); 72 72 static void hideGUI(const std::string& name); 73 void setToggleMode(const bool& mode); 74 void setBackground(const std::string& name); 73 75 74 76 void setCamera(Ogre::Camera* camera); … … 111 113 112 114 static GUIManager* singletonPtr_s; //!< Singleton reference to GUIManager 115 bool bToggleMode_; 113 116 114 117 }; -
code/branches/menu/src/orxonox/gamestates/GSMainMenu.cc
r6024 r6032 82 82 { 83 83 // show main menu 84 GUIManager::getInstance().showGUI("MainMenu", false);84 GUIManager::getInstance().showGUI("MainMenu", true, false); 85 85 GUIManager::getInstance().setCamera(this->camera_); 86 GUIManager::getInstance().setBackground("MainMenuBackground"); 87 // GUIManager::getInstance().setBackground(""); 86 88 GraphicsManager::getInstance().setCamera(this->camera_); 87 89 … … 113 115 114 116 GUIManager::getInstance().setCamera(0); 117 GUIManager::getInstance().setBackground(""); 115 118 GUIManager::hideGUI("MainMenu"); 116 119 GraphicsManager::getInstance().setCamera(0);
Note: See TracChangeset
for help on using the changeset viewer.