Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestate/data/gui/scripts/InGameMenu.lua @ 6699

Last change on this file since 6699 was 6621, checked in by rgrieder, 15 years ago

Simplified GUI sheet creation (first lines in the lua file) a lot by exporting it to GUITools.lua

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