Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/SettingsMenu.lua @ 7073

Last change on this file since 7073 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: 792 bytes
Line 
1-- SettingsMenu.lua
2
3local P = createMenuSheet("SettingsMenu")
4P.loadAlong = { "ControlsMenu", "AudioMenu", "GraphicsMenu" }
5
6function P.SettingsGameplayButton_clicked(e)
7    showMenuSheet("GameplayMenu", true)
8end
9
10function P.SettingsMultiplayerOptionsButton_clicked(e)
11    showMenuSheet("MultiplayerOptionsMenu", true)
12end
13
14function P.SettingsControlsButton_clicked(e)
15    showMenuSheet("ControlsMenu", true)
16end
17
18function P.SettingsGraphicsButton_clicked(e)
19    showMenuSheet("GraphicsMenu", true)
20end
21
22function P.SettingsAudioButton_clicked(e)
23    showMenuSheet("AudioMenu", true)
24end
25
26function P.SettingsResetSettingsButton_clicked(e)
27    -- reset settings
28    logMessage(0, "event: reset settings")
29end
30
31function P.SettingsBackButton_clicked(e)
32    hideMenuSheet(P.name)
33end
34
35return P
36
Note: See TracBrowser for help on using the repository browser.