Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/usability/data/gui/scripts/SettingsMenu.lua @ 7924

Last change on this file since 7924 was 7924, checked in by landauf, 14 years ago
  • the "back" button of MultiplayerMenu and SettingsMenu now fills the whole row at the bottom, so it can be accessed from both columns by pressing 'down'
  • added keyboard support for KeyBindMenu, MiscConfigMenu, and MouseControlsMenu
  • Property svn:eol-style set to native
File size: 1.9 KB
RevLine 
[6363]1-- SettingsMenu.lua
2
[6746]3local P = createMenuSheet("SettingsMenu")
[6748]4P.loadAlong = { "ControlsMenu", "AudioMenu", "GraphicsMenu" }
[6363]5
[7689]6function P.onLoad()
7    --"Gameplay" and "Multiplayer Options" are not integrated in the list
8    --buttons are arranged in a 4x2 matrix. The lower-right element is not in the matrix!
[7922]9    P:initButtons(4, 2)
10
11    P:setButton(1, 2, {
[7689]12            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/GraphicsButton"),
[7922]13            ["callback"]  = P.SettingsGraphicsButton_clicked
14    })
[7689]15
[7922]16    P:setButton(2, 2, {
[7689]17            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/AudioButton"),
[7922]18            ["callback"]  = P.SettingsAudioButton_clicked
19    })
[7689]20
[7922]21    P:setButton(3, 1, {
[7689]22            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),
[7922]23            ["callback"]  = P.SettingsControlsButton_clicked
24    })
[7689]25
[7922]26    P:setButton(3, 2, {
[7689]27            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),
[7922]28            ["callback"]  = P.SettingsMiscellaneousButton_clicked
29    })
[7689]30
[7922]31    P:setButton(4, 1, {
[7689]32            ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),
[7922]33            ["callback"]  = P.SettingsBackButton_clicked
34    })
[7924]35
36    P:setButton(4, 2, P:getButton(4, 1))
[7689]37end
38
[6363]39function P.SettingsGameplayButton_clicked(e)
[6746]40    showMenuSheet("GameplayMenu", true)
[6363]41end
42
43function P.SettingsMultiplayerOptionsButton_clicked(e)
[6746]44    showMenuSheet("MultiplayerOptionsMenu", true)
[6363]45end
46
47function P.SettingsControlsButton_clicked(e)
[6746]48    showMenuSheet("ControlsMenu", true)
[6363]49end
50
51function P.SettingsGraphicsButton_clicked(e)
[6746]52    showMenuSheet("GraphicsMenu", true)
[6363]53end
54
55function P.SettingsAudioButton_clicked(e)
[6746]56    showMenuSheet("AudioMenu", true)
[6363]57end
58
[7163]59function P.SettingsMiscellaneousButton_clicked(e)
60    showMenuSheet("MiscConfigMenu", true)
[6363]61end
62
63function P.SettingsBackButton_clicked(e)
[6746]64    hideMenuSheet(P.name)
[6363]65end
66
67return P
68
Note: See TracBrowser for help on using the repository browser.