Last change
on this file since 6595 was
6595,
checked in by rgrieder, 15 years ago
|
Merged remaining revisions from gamestate to gamestates2.
|
-
Property svn:eol-style set to
native
|
File size:
805 bytes
|
Rev | Line | |
---|
[6018] | 1 | -- InGameMenu.lua |
---|
| 2 | |
---|
| 3 | BasicGUI = require("BasicGUI") |
---|
[6595] | 4 | local P = BasicGUI:new("InGameMenu") |
---|
[6018] | 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) |
---|
[6048] | 13 | openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback ) |
---|
[6018] | 14 | end |
---|
| 15 | |
---|
| 16 | function P.button_mainmenu_clicked(e) |
---|
[6019] | 17 | orxonox.Game:getInstance():popState() |
---|
| 18 | orxonox.Game:getInstance():popState() |
---|
| 19 | orxonox.Game:getInstance():requestState("mainmenu") |
---|
[6217] | 20 | hideGUI("InGameMenu") |
---|
[6018] | 21 | end |
---|
| 22 | |
---|
[6217] | 23 | function P.button_settings_clicked(e) |
---|
| 24 | showGUI("SettingsMenu", true) |
---|
| 25 | end |
---|
| 26 | |
---|
[6019] | 27 | function P.button_return_clicked(e) |
---|
[6217] | 28 | hideGUI("InGameMenu") |
---|
[6019] | 29 | end |
---|
| 30 | |
---|
[6048] | 31 | function P.callback(doExit) |
---|
| 32 | if doExit then |
---|
[6217] | 33 | hideGUI("InGameMenu") |
---|
[6403] | 34 | orxonox.execute("exit") |
---|
[6048] | 35 | end |
---|
| 36 | end |
---|
| 37 | |
---|
[6018] | 38 | return P |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.