source:
code/trunk/data/gui/scripts/InGameMenu.lua
@
6987
Last change on this file since 6987 was 6748, checked in by rgrieder, 15 years ago | |
---|---|
|
|
File size: 752 bytes |
Rev | Line | |
---|---|---|
[6018] | 1 | -- InGameMenu.lua |
2 | ||
[6746] | 3 | local P = createMenuSheet("InGameMenu") |
[6748] | 4 | P.loadAlong = { "DecisionPopup" } |
[6018] | 5 | |
6 | -- events for ingamemenu | |
7 | function P.button_quit_clicked(e) | |
[6048] | 8 | openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback ) |
[6018] | 9 | end |
10 | ||
11 | function P.button_mainmenu_clicked(e) | |
[6019] | 12 | orxonox.Game:getInstance():popState() |
13 | orxonox.Game:getInstance():popState() | |
14 | orxonox.Game:getInstance():requestState("mainmenu") | |
[6746] | 15 | hideMenuSheet("InGameMenu") |
[6018] | 16 | end |
17 | ||
[6217] | 18 | function P.button_settings_clicked(e) |
[6746] | 19 | showMenuSheet("SettingsMenu", true) |
[6217] | 20 | end |
21 | ||
[6019] | 22 | function P.button_return_clicked(e) |
[6746] | 23 | hideMenuSheet("InGameMenu") |
[6019] | 24 | end |
25 | ||
[6048] | 26 | function P.callback(doExit) |
27 | if doExit then | |
[6746] | 28 | hideMenuSheet("InGameMenu") |
[6403] | 29 | orxonox.execute("exit") |
[6048] | 30 | end |
31 | end | |
32 | ||
[6018] | 33 | return P |
34 |
Note: See TracBrowser
for help on using the repository browser.