Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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