source:
code/trunk/data/gui/scripts/InGameMenu.lua
@
7691
Last change on this file since 7691 was 7689, checked in by dafrick, 14 years ago | |
---|---|
|
|
File size: 696 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() | |
[6746] | 14 | hideMenuSheet("InGameMenu") |
[6018] | 15 | end |
16 | ||
[6217] | 17 | function P.button_settings_clicked(e) |
[6746] | 18 | showMenuSheet("SettingsMenu", true) |
[6217] | 19 | end |
20 | ||
[6019] | 21 | function P.button_return_clicked(e) |
[6746] | 22 | hideMenuSheet("InGameMenu") |
[6019] | 23 | end |
24 | ||
[6048] | 25 | function P.callback(doExit) |
26 | if doExit then | |
[6746] | 27 | hideMenuSheet("InGameMenu") |
[6403] | 28 | orxonox.execute("exit") |
[6048] | 29 | end |
30 | end | |
31 | ||
[6018] | 32 | return P |
33 |
Note: See TracBrowser
for help on using the repository browser.