Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.

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