Last change
on this file since 6569 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 | |
---|
3 | BasicGUI = require("BasicGUI") |
---|
4 | local P = BasicGUI:new("InGameMenu") |
---|
5 | if _REQUIREDNAME == nil then |
---|
6 | InGameMenu = P |
---|
7 | else |
---|
8 | _G[_REQUIREDNAME] = P |
---|
9 | end |
---|
10 | |
---|
11 | -- events for ingamemenu |
---|
12 | function P.button_quit_clicked(e) |
---|
13 | openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback ) |
---|
14 | end |
---|
15 | |
---|
16 | function P.button_mainmenu_clicked(e) |
---|
17 | orxonox.Game:getInstance():popState() |
---|
18 | orxonox.Game:getInstance():popState() |
---|
19 | orxonox.Game:getInstance():requestState("mainmenu") |
---|
20 | hideGUI("InGameMenu") |
---|
21 | end |
---|
22 | |
---|
23 | function P.button_settings_clicked(e) |
---|
24 | showGUI("SettingsMenu", true) |
---|
25 | end |
---|
26 | |
---|
27 | function P.button_return_clicked(e) |
---|
28 | hideGUI("InGameMenu") |
---|
29 | end |
---|
30 | |
---|
31 | function P.callback(doExit) |
---|
32 | if doExit then |
---|
33 | hideGUI("InGameMenu") |
---|
34 | orxonox.execute("exit") |
---|
35 | end |
---|
36 | end |
---|
37 | |
---|
38 | return P |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.