Changeset 6036 for code/branches/menu/src/libraries/core
- Timestamp:
- Nov 5, 2009, 9:46:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.