- Timestamp:
- Nov 4, 2009, 1:59:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ingamemenu/src/libraries/core/GUIManager.cc
r6020 r6023 50 50 51 51 #include "util/Clock.h" 52 #include "util/Convert.h" 52 53 #include "util/Debug.h" 53 54 #include "util/Exception.h" … … 88 89 GUIManager* GUIManager::singletonPtr_s = 0; 89 90 90 SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User) ;91 SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, true); 91 92 SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User); 92 93 … … 209 210 For more details check out loadGUI_2.lua where the function presides. 210 211 */ 211 /*static*/ void GUIManager::showGUI(const std::string& name )212 /*static*/ void GUIManager::showGUI(const std::string& name, bool showCursor) 212 213 { 213 214 std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name); … … 216 217 if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI. 217 218 { 218 GUIManager::getInstance().executeCode("showCursor()");219 // GUIManager::getInstance().executeCode("showCursor()"); 219 220 InputManager::getInstance().enterState("guiMouseOnly"); 220 221 } 221 GUIManager::getInstance().executeCode("showGUI(\"" + name + "\" )");222 GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ")"); 222 223 } 223 224 … … 226 227 Hack-ish. Needed for GUIOverlay. 227 228 */ 228 void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr )229 void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor) 229 230 { 230 231 std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name); … … 236 237 InputManager::getInstance().enterState("guiMouseOnly"); 237 238 } 238 this->executeCode("showGUI(\"" + name + "\", " + ptr + ")");239 this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")"); 239 240 } 240 241 … … 258 259 } 259 260 260 /*static*/ void GUIManager::hideCursor()261 {262 GUIManager::getInstance().executeCode("hideCursor()");263 }264 265 261 void GUIManager::keyPressed(const KeyEvent& evt) 266 262 {
Note: See TracChangeset
for help on using the changeset viewer.