Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 12, 2009, 11:32:41 AM (15 years ago)
Author:
scheusso
Message:

ESC handling in ingame menu: if theres already an opened GUI sheet then hide it, if not open the ingame menu
in mainmenu everything should remain the same

File:
1 edited

Legend:

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

    r6036 r6048  
    108108        , resourceProvider_(0)
    109109        , camera_(NULL)
     110        , bShowIngameGUI_(false)
    110111    {
    111112        using namespace CEGUI;
     
    251252        }
    252253    }
     254
     255    void GUIManager::toggleIngameGUI()
     256    {
     257        if ( this->bShowIngameGUI_==false )
     258        {
     259            GUIManager::showGUI("InGameMenu");
     260            this->bShowIngameGUI_ = true;
     261        }
     262        else
     263        {
     264            GUIManager::hideGUI("InGameMenu");
     265            this->bShowIngameGUI_ = false;
     266        }
     267    }
    253268   
    254     void GUIManager::setToggleMode(const bool& mode)
    255     {
    256         this->bToggleMode_ = mode;
    257         this->executeCode("setToggleMode(" + multi_cast<std::string>(mode) + ")");
     269    void GUIManager::keyESC()
     270    {
     271        if( this->showingGUIs_.size() == 0 )
     272            this->showGUI("InGameMenu");
     273        else
     274            this->executeCode("keyESC()");
    258275    }
    259276   
Note: See TracChangeset for help on using the changeset viewer.