Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/menu/data/gui/scripts/InGameMenu.lua @ 6027

Last change on this file since 6027 was 6024, checked in by scheusso, 15 years ago

merged ingamemenu branch to menu branch

File size: 861 bytes
Line 
1-- InGameMenu.lua
2
3BasicGUI = require("BasicGUI")
4local P = BasicGUI:new() --inherit everything from the gui package
5if _REQUIREDNAME == nil then
6    InGameMenu = P
7else
8    _G[_REQUIREDNAME] = P
9end
10
11P.filename = "InGameMenu"
12P.layoutString = "InGameMenu.layout"
13
14function P:init()
15end
16
17
18-- events for ingamemenu
19function P.button_quit_clicked(e)
20    orxonox.CommandExecutor:execute("hideGUI InGameMenu")
21    orxonox.CommandExecutor:execute("exit")
22end
23
24function P.button_mainmenu_clicked(e)
25    orxonox.Game:getInstance():popState()
26    orxonox.Game:getInstance():popState()
27    orxonox.Game:getInstance():requestState("mainmenu")
28    orxonox.CommandExecutor:execute("showGUI MainMenu")
29    orxonox.CommandExecutor:execute("hideGUI InGameMenu")
30end
31
32function P.button_return_clicked(e)
33    orxonox.CommandExecutor:execute("hideGUI InGameMenu")
34end
35
36return P
37
Note: See TracBrowser for help on using the repository browser.