Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gamestates2/data/gui/scripts/InGameMenu.lua @ 6595

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

Merged remaining revisions from gamestate to gamestates2.

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