Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6722


Ignore:
Timestamp:
Apr 13, 2010, 6:17:51 PM (15 years ago)
Author:
rgrieder
Message:

Renamed showGUI and hideGUI to showMenuSheet and hideMenuSheet.

Location:
code/branches/gamestates2
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/data/gui/scripts/AudioMenu.lua

    r6720 r6722  
    169169
    170170function P.AudioBackButton_clicked(e)
    171     hideGUI(P.name)
     171    hideMenuSheet(P.name)
    172172end
    173173
  • code/branches/gamestates2/data/gui/scripts/ControlsMenu.lua

    r6718 r6722  
    44
    55function P.ControlsMouseControlsButton_clicked(e)
    6     showGUI("MouseControlsMenu", true)
     6    showMenuSheet("MouseControlsMenu", true)
    77end
    88
    99function P.ControlsKeyboardControlsButton_clicked(e)
    10     showGUI("KeyBindMenu", true)
     10    showMenuSheet("KeyBindMenu", true)
    1111end
    1212
    1313function P.ControlsBackButton_clicked(e)
    14     hideGUI(P.name)
     14    hideMenuSheet(P.name)
    1515end
    1616
  • code/branches/gamestates2/data/gui/scripts/CreditsMenu.lua

    r6718 r6722  
    44
    55function P.CreditsBackButton_clicked(e)
    6     hideGUI(P.name)
     6    hideMenuSheet(P.name)
    77end
    88
  • code/branches/gamestates2/data/gui/scripts/DecisionPopup.lua

    r6718 r6722  
    1616        P.functionPtr(true)
    1717    end
    18     hideGUI("DecisionPopup")
     18    hideMenuSheet("DecisionPopup")
    1919end
    2020
     
    2323        P.functionPtr(false)
    2424    end
    25     hideGUI("DecisionPopup")
     25    hideMenuSheet("DecisionPopup")
    2626end
    2727
  • code/branches/gamestates2/data/gui/scripts/GUITools.lua

    r6718 r6722  
    1515
    1616function openDecisionPopup( text, callbackPtr )
    17     showGUI("DecisionPopup", false, true)
     17    showMenuSheet("DecisionPopup", false, true)
    1818    DecisionPopup.setCallback(callbackPtr)
    1919    DecisionPopup.setText(text)
     
    2121
    2222function openInfoPopup(text, functionPtr, closeButton, arguments)
    23     showGUI("InfoPopup", false, true)
     23    showMenuSheet("InfoPopup", false, true)
    2424    InfoPopup.execute(functionPtr, arguments)
    2525    InfoPopup.setText(text)
  • code/branches/gamestates2/data/gui/scripts/GameplayMenu.lua

    r6720 r6722  
    3737
    3838function P.GameplayBackButton_clicked(e)
    39     hideGUI(P.name)
     39    hideMenuSheet(P.name)
    4040end
    4141
  • code/branches/gamestates2/data/gui/scripts/GraphicsMenu.lua

    r6720 r6722  
    192192
    193193function P.GraphicsBackButton_clicked(e)
    194     hideGUI(P.name)
     194    hideMenuSheet(P.name)
    195195end
    196196
  • code/branches/gamestates2/data/gui/scripts/InGameMenu.lua

    r6718 r6722  
    1212    orxonox.Game:getInstance():popState()
    1313    orxonox.Game:getInstance():requestState("mainmenu")
    14     hideGUI("InGameMenu")
     14    hideMenuSheet("InGameMenu")
    1515end
    1616
    1717function P.button_settings_clicked(e)
    18     showGUI("SettingsMenu", true)
     18    showMenuSheet("SettingsMenu", true)
    1919end
    2020
    2121function P.button_return_clicked(e)
    22     hideGUI("InGameMenu")
     22    hideMenuSheet("InGameMenu")
    2323end
    2424
    2525function P.callback(doExit)
    2626    if doExit then
    27         hideGUI("InGameMenu")
     27        hideMenuSheet("InGameMenu")
    2828        orxonox.execute("exit")
    2929    end
  • code/branches/gamestates2/data/gui/scripts/InfoPopup.lua

    r6718 r6722  
    2929-- events for ingamemenu
    3030function P.close(e)
    31     hideGUI(P.name)
     31    hideMenuSheet(P.name)
    3232end
    3333
  • code/branches/gamestates2/data/gui/scripts/InitialiseGUI.lua

    r6721 r6722  
    7575
    7676-- ?
    77 function showGUI(name, bHidePrevious, ptr)
    78     local sheet = showGUI(name, bHidePrevious)
     77function showMenuSheet(name, bHidePrevious, ptr)
     78    local sheet = showMenuSheet(name, bHidePrevious)
    7979    sheet.overlay = ptr
    8080    return sheet
     
    8282
    8383-- Shows the specified menu sheet and loads it if neccessary
    84 function showGUI(name, bHidePrevious)
     84function showMenuSheet(name, bHidePrevious)
    8585    -- Get sheet (or load it)
    8686    local menuSheet = loadSheet(name)
     
    103103    -- Hide if already displayed (to make sure it is up front in the end)
    104104    if activeMenuSheets[name] ~= nil then
    105         hideGUI(name)
     105        hideMenuSheet(name)
    106106    end
    107107
     
    146146end
    147147
    148 function hideGUI(name)
     148function hideMenuSheet(name)
    149149    local sheetTuple = activeMenuSheets[name]
    150150    if sheetTuple == nil then
     
    206206
    207207-- Hides all menu GUI sheets
    208 function hideAllGUIs()
     208function hideAllMenuSheets()
    209209    while activeMenuSheets.size ~= 0 do
    210         hideGUI(activeMenuSheets.topSheetTuple.sheet.name)
     210        hideMenuSheet(activeMenuSheets.topSheetTuple.sheet.name)
    211211    end
    212212end
     
    217217        orxonox.execute("exit")
    218218    elseif activeMenuSheets.size > 0 then
    219         orxonox.execute("hideGUI "..activeMenuSheets.topSheetTuple.sheet.name)
     219        orxonox.execute("hideMenuSheet "..activeMenuSheets.topSheetTuple.sheet.name)
    220220    else
    221         showGUI("InGameMenu")
     221        showMenuSheet("InGameMenu")
    222222    end
    223223end
  • code/branches/gamestates2/data/gui/scripts/KeyBindMenu.lua

    r6720 r6722  
    244244
    245245function P.KeyBindBackButton_clicked(e)
    246     hideGUI("KeyBindMenu")
     246    hideMenuSheet("KeyBindMenu")
    247247end
    248248
  • code/branches/gamestates2/data/gui/scripts/MainMenu.lua

    r6718 r6722  
    99
    1010function P.SingleplayerButton_clicked(e)
    11     showGUI("SingleplayerMenu", true)
     11    showMenuSheet("SingleplayerMenu", true)
    1212end
    1313
    1414function P.MultiplayerButton_clicked(e)
    15     showGUI("MultiplayerMenu", true)
     15    showMenuSheet("MultiplayerMenu", true)
    1616end
    1717
    1818function P.SettingsButton_clicked(e)
    19     showGUI("SettingsMenu", true)
     19    showMenuSheet("SettingsMenu", true)
    2020end
    2121
    2222function P.CreditsButton_clicked(e)
    23     showGUI("CreditsMenu", true)
     23    showMenuSheet("CreditsMenu", true)
    2424end
    2525
  • code/branches/gamestates2/data/gui/scripts/MouseControlsMenu.lua

    r6720 r6722  
    9595
    9696function P.MouseControlsBackButton_clicked(e)
    97     hideGUI(P.name)
     97    hideMenuSheet(P.name)
    9898end
    9999
  • code/branches/gamestates2/data/gui/scripts/MultiplayerMenu.lua

    r6720 r6722  
    6262        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    6363        orxonox.execute(multiplayerMode)
    64         hideAllGUIs()
     64        hideAllMenuSheets()
    6565    end
    6666end
    6767
    6868function P.MultiplayerBackButton_clicked(e)
    69     hideGUI(P.name)
     69    hideMenuSheet(P.name)
    7070end
    7171
  • code/branches/gamestates2/data/gui/scripts/MultiplayerOptionsMenu.lua

    r6718 r6722  
    44
    55function P.MultiplayerOptionsBackButton_clicked(e)
    6     hideGUI(P.name)
     6    hideMenuSheet(P.name)
    77end
    88
  • code/branches/gamestates2/data/gui/scripts/SettingsMenu.lua

    r6718 r6722  
    44
    55function P.SettingsGameplayButton_clicked(e)
    6     showGUI("GameplayMenu", true)
     6    showMenuSheet("GameplayMenu", true)
    77end
    88
    99function P.SettingsMultiplayerOptionsButton_clicked(e)
    10     showGUI("MultiplayerOptionsMenu", true)
     10    showMenuSheet("MultiplayerOptionsMenu", true)
    1111end
    1212
    1313function P.SettingsControlsButton_clicked(e)
    14     showGUI("ControlsMenu", true)
     14    showMenuSheet("ControlsMenu", true)
    1515end
    1616
    1717function P.SettingsGraphicsButton_clicked(e)
    18     showGUI("GraphicsMenu", true)
     18    showMenuSheet("GraphicsMenu", true)
    1919end
    2020
    2121function P.SettingsAudioButton_clicked(e)
    22     showGUI("AudioMenu", true)
     22    showMenuSheet("AudioMenu", true)
    2323end
    2424
     
    2929
    3030function P.SettingsBackButton_clicked(e)
    31     hideGUI(P.name)
     31    hideMenuSheet(P.name)
    3232end
    3333
  • code/branches/gamestates2/data/gui/scripts/SingleplayerMenu.lua

    r6720 r6722  
    3434        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    3535        orxonox.execute("startGame")
    36         hideAllGUIs()
     36        hideAllMenuSheets()
    3737    end
    3838end
    3939
    4040function P.SingleplayerBackButton_clicked(e)
    41     hideGUI(P.name)
     41    hideMenuSheet(P.name)
    4242end
    4343
  • code/branches/gamestates2/src/libraries/core/GUIManager.cc

    r6662 r6722  
    226226
    227227        The function executes the Lua function with the same name in case the GUIManager is ready.
    228         For more details check out loadGUI_2.lua where the function presides.
    229     */
    230     /*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor)
    231     {
    232         GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
     228    */
     229    /*static*/ void GUIManager::showGUI(const std::string& name, bool bHidePrevious)
     230    {
     231        GUIManager::getInstance().executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ")");
    233232    }
    234233
     
    237236        Hack-ish. Needed for GUIOverlay.
    238237    */
    239     void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor)
    240     {
    241         this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
     238    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious)
     239    {
     240        this->executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + ptr + ")");
    242241    }
    243242
     
    250249    /*static*/ void GUIManager::hideGUI(const std::string& name)
    251250    {
    252         GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
     251        GUIManager::getInstance().executeCode("hideMenuSheet(\"" + name + "\")");
    253252    }
    254253
  • code/branches/gamestates2/src/libraries/core/GUIManager.h

    r6662 r6722  
    7575
    7676        void loadGUI(const std::string& name);
    77         static void showGUI(const std::string& name, bool hidePrevious=false, bool showCursor=true);
    78         void showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious=false, bool showCursor=true);
     77        static void showGUI(const std::string& name, bool bHidePrevious = false);
     78        void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false);
    7979        static void hideGUI(const std::string& name);
    8080        void keyESC();
  • code/branches/gamestates2/src/orxonox/gamestates/GSMainMenu.cc

    r6595 r6722  
    8585    {
    8686        // show main menu
    87         GUIManager::getInstance().showGUI("MainMenu", true, GraphicsManager::getInstance().isFullScreen());
     87        GUIManager::getInstance().showGUI("MainMenu", true);
    8888        GUIManager::getInstance().setCamera(this->camera_);
    8989        GUIManager::getInstance().setBackground("MainMenuBackground");
  • code/branches/gamestates2/src/orxonox/overlays/GUISheet.cc

    r6595 r6722  
    6565    void GUISheet::show()
    6666    {
    67         GUIManager::showGUI(this->script_, this->bHidePrevious_, this->bShowCursor_);
     67        GUIManager::showGUI(this->script_, this->bHidePrevious_);
    6868    }
    6969
Note: See TracChangeset for help on using the changeset viewer.