Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2009, 5:30:38 PM (15 years ago)
Author:
scheusso
Message:

partially working hiding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu/src/libraries/core/GUIManager.cc

    r6024 r6032  
    8989    GUIManager* GUIManager::singletonPtr_s = 0;
    9090
    91     SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, true);
     91    SetConsoleCommandShortcut(GUIManager, showGUI).accessLevel(AccessLevel::User).defaultValue(1, false).defaultValue(2, true);
    9292    SetConsoleCommandShortcut(GUIManager, hideGUI).accessLevel(AccessLevel::User);
    9393
     
    210210        For more details check out loadGUI_2.lua where the function presides.
    211211    */
    212     /*static*/ void GUIManager::showGUI(const std::string& name, bool showCursor)
     212    /*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor)
    213213    {
    214214        std::pair<std::set<std::string>::iterator,bool> result = GUIManager::getInstance().showingGUIs_.insert(name);
     
    220220            InputManager::getInstance().enterState("guiMouseOnly");
    221221        }
    222         GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ")");
     222        COUT(0) << "showGUI" << endl;
     223        GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
    223224    }
    224225
     
    227228        Hack-ish. Needed for GUIOverlay.
    228229    */
    229     void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool showCursor)
     230    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor)
    230231    {
    231232        std::pair<std::set<std::string>::iterator,bool> result = this->showingGUIs_.insert(name);
     
    237238            InputManager::getInstance().enterState("guiMouseOnly");
    238239        }
    239         this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
     240        this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
    240241    }
    241242
     
    258259        }
    259260    }
     261   
     262    void GUIManager::setToggleMode(const bool& mode)
     263    {
     264        this->bToggleMode_ = mode;
     265        this->executeCode("setToggleMode(" + multi_cast<std::string>(mode) + ")");
     266    }
     267   
     268    void GUIManager::setBackground(const std::string& name)
     269    {
     270        this->executeCode("setBackground(\"" + name + "\")");
     271    }
    260272
    261273    void GUIManager::keyPressed(const KeyEvent& evt)
Note: See TracChangeset for help on using the changeset viewer.