Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/InGameMenu.lua @ 7683

Last change on this file since 7683 was 6748, checked in by rgrieder, 15 years ago

A GUISheet can assign its field "loadAlong" any strings designating other sheets that have to be loaded as well.
Implemented this for all menus sheets as I see fit (load the whole MainMenu, but don't load MainMenu or Settings for the InGameMenu).
This is just a measure to avoid lags when clicking through the menus.

  • Property svn:eol-style set to native
File size: 752 bytes
RevLine 
[6018]1-- InGameMenu.lua
2
[6746]3local P = createMenuSheet("InGameMenu")
[6748]4P.loadAlong = { "DecisionPopup" }
[6018]5
6-- events for ingamemenu
7function P.button_quit_clicked(e)
[6048]8    openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback )
[6018]9end
10
11function P.button_mainmenu_clicked(e)
[6019]12    orxonox.Game:getInstance():popState()
13    orxonox.Game:getInstance():popState()
14    orxonox.Game:getInstance():requestState("mainmenu")
[6746]15    hideMenuSheet("InGameMenu")
[6018]16end
17
[6217]18function P.button_settings_clicked(e)
[6746]19    showMenuSheet("SettingsMenu", true)
[6217]20end
21
[6019]22function P.button_return_clicked(e)
[6746]23    hideMenuSheet("InGameMenu")
[6019]24end
25
[6048]26function P.callback(doExit)
27    if doExit then
[6746]28        hideMenuSheet("InGameMenu")
[6403]29        orxonox.execute("exit")
[6048]30    end
31end
32
[6018]33return P
34
Note: See TracBrowser for help on using the repository browser.