Changeset 6036 for code/branches/menu
- Timestamp:
- Nov 5, 2009, 9:46:27 AM (15 years ago)
- Location:
- code/branches/menu
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/scripts/InitialiseGUI.lua
r6032 r6036 61 61 end 62 62 63 debug("test")64 debug(currentGUI.window:getName())65 debug(root:isChild(currentGUI.window))66 63 if(root:isChild(currentGUI.window)) then 67 debug("removing window")68 64 root:removeChildWindow(currentGUI.window) 69 65 end -
code/branches/menu/src/libraries/core/GUIManager.cc
r6032 r6036 213 213 { 214 214 std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name); 215 if(result.second == false) //!< GUI already showing.216 return;217 215 if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI. 218 216 { 219 // GUIManager::getInstance().executeCode("showCursor()");220 217 InputManager::getInstance().enterState("guiMouseOnly"); 221 218 } 222 COUT(0) << "showGUI" << endl;223 219 GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")"); 224 220 } … … 231 227 { 232 228 std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name); 233 if(result.second == false) //!< GUI already showing.234 return;235 229 if(this->showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI. 236 230 { … … 249 243 /*static*/ void GUIManager::hideGUI(const std::string& name) 250 244 { 251 bool present = GUIManager::getInstance().showingGUIs_.erase(name); 252 if(!present) //!< If there was nothing to erase. 253 return; 245 GUIManager::getInstance().showingGUIs_.erase(name); 254 246 GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")"); 255 247 if(GUIManager::getInstance().showingGUIs_.size() == 0)
Note: See TracChangeset
for help on using the changeset viewer.