[Orxonox-commit 1318] r6036 - in code/branches/menu: data/gui/scripts src/libraries/core
scheusso at orxonox.net
scheusso at orxonox.net
Thu Nov 5 09:46:27 CET 2009
Author: scheusso
Date: 2009-11-05 09:46:27 +0100 (Thu, 05 Nov 2009)
New Revision: 6036
Modified:
code/branches/menu/data/gui/scripts/InitialiseGUI.lua
code/branches/menu/src/libraries/core/GUIManager.cc
Log:
some changes to make GUI showing/hiding with possible coverage of current shown GUIs now possible
Modified: code/branches/menu/data/gui/scripts/InitialiseGUI.lua
===================================================================
--- code/branches/menu/data/gui/scripts/InitialiseGUI.lua 2009-11-05 07:19:55 UTC (rev 6035)
+++ code/branches/menu/data/gui/scripts/InitialiseGUI.lua 2009-11-05 08:46:27 UTC (rev 6036)
@@ -60,11 +60,7 @@
currentGUI = loadGUI(filename)
end
- debug("test")
- debug(currentGUI.window:getName())
- debug(root:isChild(currentGUI.window))
if(root:isChild(currentGUI.window)) then
- debug("removing window")
root:removeChildWindow(currentGUI.window)
end
root:addChildWindow(currentGUI.window)
Modified: code/branches/menu/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/menu/src/libraries/core/GUIManager.cc 2009-11-05 07:19:55 UTC (rev 6035)
+++ code/branches/menu/src/libraries/core/GUIManager.cc 2009-11-05 08:46:27 UTC (rev 6036)
@@ -212,14 +212,10 @@
/*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor)
{
std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
- if(result.second == false) //!< GUI already showing.
- return;
if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
{
-// GUIManager::getInstance().executeCode("showCursor()");
InputManager::getInstance().enterState("guiMouseOnly");
}
- COUT(0) << "showGUI" << endl;
GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
}
@@ -230,8 +226,6 @@
void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor)
{
std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
- if(result.second == false) //!< GUI already showing.
- return;
if(this->showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
{
this->executeCode("showCursor()");
@@ -248,9 +242,7 @@
*/
/*static*/ void GUIManager::hideGUI(const std::string& name)
{
- bool present = GUIManager::getInstance().showingGUIs_.erase(name);
- if(!present) //!< If there was nothing to erase.
- return;
+ GUIManager::getInstance().showingGUIs_.erase(name);
GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
if(GUIManager::getInstance().showingGUIs_.size() == 0)
{
More information about the Orxonox-commit
mailing list