Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/MainMenu.lua @ 6756

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