Changeset 8079 for code/trunk/src/libraries/core/GUIManager.cc
- Timestamp:
- Mar 15, 2011, 9:47:11 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/GUIManager.cc
r7876 r8079 32 32 #include <boost/bind.hpp> 33 33 #include <memory> 34 extern "C" { 35 #include <lua.h> 36 } 34 37 35 #include <CEGUIDefaultLogger.h> 38 36 #include <CEGUIExceptions.h> … … 107 105 SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false); 108 106 SetConsoleCommand("hideGUI", &GUIManager::hideGUI); 107 SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false); 109 108 110 109 /** … … 284 283 { 285 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); 286 308 } 287 309 … … 512 534 void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight) 513 535 { 514 this->guiRenderer_->setDisplaySize(CEGUI::Size( newWidth,newHeight));515 } 516 517 /** 518 @brief Notify CEGUI if the windows loses the focus (stops hig lightof menu items, etc).536 this->guiRenderer_->setDisplaySize(CEGUI::Size((float)newWidth, (float)newHeight)); 537 } 538 539 /** 540 @brief Notify CEGUI if the windows loses the focus (stops highlighting of menu items, etc). 519 541 */ 520 542 void GUIManager::windowFocusChanged(bool bFocus)
Note: See TracChangeset
for help on using the changeset viewer.