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
|
Line | |
---|
1 | -- InGameMenu.lua |
---|
2 | |
---|
3 | local P = createSheet("InGameMenu") |
---|
4 | |
---|
5 | -- events for ingamemenu |
---|
6 | function P.button_quit_clicked(e) |
---|
7 | openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback ) |
---|
8 | end |
---|
9 | |
---|
10 | function P.button_mainmenu_clicked(e) |
---|
11 | orxonox.Game:getInstance():popState() |
---|
12 | orxonox.Game:getInstance():popState() |
---|
13 | orxonox.Game:getInstance():requestState("mainmenu") |
---|
14 | hideGUI("InGameMenu") |
---|
15 | end |
---|
16 | |
---|
17 | function P.button_settings_clicked(e) |
---|
18 | showGUI("SettingsMenu", true) |
---|
19 | end |
---|
20 | |
---|
21 | function P.button_return_clicked(e) |
---|
22 | hideGUI("InGameMenu") |
---|
23 | end |
---|
24 | |
---|
25 | function P.callback(doExit) |
---|
26 | if doExit then |
---|
27 | hideGUI("InGameMenu") |
---|
28 | orxonox.execute("exit") |
---|
29 | end |
---|
30 | end |
---|
31 | |
---|
32 | return P |
---|
33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.