Changeset 8033 for code/branches/usability/src
- Timestamp:
- Mar 6, 2011, 2:30:24 PM (14 years ago)
- Location:
- code/branches/usability/src/libraries/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/src/libraries/core/GUIManager.cc
r7994 r8033 105 105 SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false); 106 106 SetConsoleCommand("hideGUI", &GUIManager::hideGUI); 107 SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false); 107 108 108 109 /** … … 282 283 { 283 284 GUIManager::getInstance().executeCode("hideMenuSheet(\"" + name + "\")"); 285 } 286 287 /** 288 @brief 289 Toggles specified GUI. 290 If the GUI with the input name is already shown and on the top, it is hidden, else it is shown. 291 */ 292 /*static*/ void GUIManager::toggleGUI(const std::string& name, bool bHidePrevious, bool bNoInput) 293 { 294 GUIManager::getInstance().executeCode("getGUIFirstActive(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ")"); 295 } 296 297 /** 298 @brief 299 Helper method to toggle a specified GUI. 300 Is called by lua. 301 */ 302 void GUIManager::toggleGUIHelper(const std::string& name, bool bHidePrevious, bool bNoInput, bool show) 303 { 304 if(show) 305 GUIManager::showGUI(name, bHidePrevious, bNoInput); 306 else 307 GUIManager::hideGUI(name); 284 308 } 285 309 -
code/branches/usability/src/libraries/core/GUIManager.h
r7874 r8033 88 88 void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false, bool bNoInput = false); 89 89 static void hideGUI(const std::string& name); 90 static void toggleGUI(const std::string& name, bool bHidePrevious = false, bool bNoInput = false); 91 void toggleGUIHelper(const std::string& name, bool bHidePrevious, bool bNoInput, bool show); // tolua_export 90 92 void keyESC(); 91 93 void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.