Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6036


Ignore:
Timestamp:
Nov 5, 2009, 9:46:27 AM (15 years ago)
Author:
scheusso
Message:

some changes to make GUI showing/hiding with possible coverage of current shown GUIs now possible

Location:
code/branches/menu
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu/data/gui/scripts/InitialiseGUI.lua

    r6032 r6036  
    6161    end
    6262
    63     debug("test")
    64     debug(currentGUI.window:getName())
    65     debug(root:isChild(currentGUI.window))
    6663    if(root:isChild(currentGUI.window)) then
    67         debug("removing window")
    6864        root:removeChildWindow(currentGUI.window)
    6965    end
  • code/branches/menu/src/libraries/core/GUIManager.cc

    r6032 r6036  
    213213    {
    214214        std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
    215         if(result.second == false) //!< GUI already showing.
    216             return;
    217215        if(GUIManager::getInstance().showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
    218216        {
    219 //             GUIManager::getInstance().executeCode("showCursor()");
    220217            InputManager::getInstance().enterState("guiMouseOnly");
    221218        }
    222         COUT(0) << "showGUI" << endl;
    223219        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
    224220    }
     
    231227    {
    232228        std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
    233         if(result.second == false) //!< GUI already showing.
    234             return;
    235229        if(this->showingGUIs_.size() == 1 && result.second == true) //!< If it's the first GUI.
    236230        {
     
    249243    /*static*/ void GUIManager::hideGUI(const std::string& name)
    250244    {
    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);
    254246        GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
    255247        if(GUIManager::getInstance().showingGUIs_.size() == 0)
Note: See TracChangeset for help on using the changeset viewer.