Last change
on this file since 6750 was
6748,
checked in by rgrieder, 15 years ago
|
A GUISheet can assign its field "loadAlong" any strings designating other sheets that have to be loaded as well.
Implemented this for all menus sheets as I see fit (load the whole MainMenu, but don't load MainMenu or Settings for the InGameMenu).
This is just a measure to avoid lags when clicking through the menus.
|
-
Property svn:eol-style set to
native
|
File size:
752 bytes
|
Line | |
---|
1 | -- InGameMenu.lua |
---|
2 | |
---|
3 | local P = createMenuSheet("InGameMenu") |
---|
4 | P.loadAlong = { "DecisionPopup" } |
---|
5 | |
---|
6 | -- events for ingamemenu |
---|
7 | function P.button_quit_clicked(e) |
---|
8 | openDecisionPopup( "Do you really want to quit the game?", InGameMenu.callback ) |
---|
9 | end |
---|
10 | |
---|
11 | function P.button_mainmenu_clicked(e) |
---|
12 | orxonox.Game:getInstance():popState() |
---|
13 | orxonox.Game:getInstance():popState() |
---|
14 | orxonox.Game:getInstance():requestState("mainmenu") |
---|
15 | hideMenuSheet("InGameMenu") |
---|
16 | end |
---|
17 | |
---|
18 | function P.button_settings_clicked(e) |
---|
19 | showMenuSheet("SettingsMenu", true) |
---|
20 | end |
---|
21 | |
---|
22 | function P.button_return_clicked(e) |
---|
23 | hideMenuSheet("InGameMenu") |
---|
24 | end |
---|
25 | |
---|
26 | function P.callback(doExit) |
---|
27 | if doExit then |
---|
28 | hideMenuSheet("InGameMenu") |
---|
29 | orxonox.execute("exit") |
---|
30 | end |
---|
31 | end |
---|
32 | |
---|
33 | return P |
---|
34 | |
---|
Note: See
TracBrowser
for help on using the repository browser.