Last change
on this file since 11703 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:
662 bytes
|
Line | |
---|
1 | -- MainMenu.lua |
---|
2 | |
---|
3 | local P = createMenuSheet("MainMenu") |
---|
4 | P.loadAlong = { "SingleplayerMenu", "MultiplayerMenu", "SettingsMenu", "CreditsMenu" } |
---|
5 | |
---|
6 | -- events for MainMenu |
---|
7 | function P.QuickGameTestButton_clicked(e) |
---|
8 | orxonox.execute("startGame") |
---|
9 | end |
---|
10 | |
---|
11 | function P.SingleplayerButton_clicked(e) |
---|
12 | showMenuSheet("SingleplayerMenu", true) |
---|
13 | end |
---|
14 | |
---|
15 | function P.MultiplayerButton_clicked(e) |
---|
16 | showMenuSheet("MultiplayerMenu", true) |
---|
17 | end |
---|
18 | |
---|
19 | function P.SettingsButton_clicked(e) |
---|
20 | showMenuSheet("SettingsMenu", true) |
---|
21 | end |
---|
22 | |
---|
23 | function P.CreditsButton_clicked(e) |
---|
24 | showMenuSheet("CreditsMenu", true) |
---|
25 | end |
---|
26 | |
---|
27 | function P.ExitButton_clicked(e) |
---|
28 | orxonox.execute("exit") |
---|
29 | end |
---|
30 | |
---|
31 | return P |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.