Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/data/gui/scripts/ControlsMenu.lua @ 11128

Last change on this file since 11128 was 8079, checked in by landauf, 14 years ago

merged usability branch back to trunk

incomplete summary of the changes in this branch:

  • enhanced keyboard navigation in GUIs
  • implemented new graphics menu and changeable window size at runtime
  • added developer mode
  • HUD shows if game is paused, game pauses if ingame menu is opened
  • removed a few obsolete commands and hid some that are more for internal use
  • numpad works in console and gui
  • faster loading of level info
  • enhanced usage of compositors (Shader class)
  • improved camera handling, configurable FOV and aspect ratio
  • Property svn:eol-style set to native
File size: 1010 bytes
Line 
1-- ControlsMenu.lua
2
3local P = createMenuSheet("ControlsMenu")
4P.loadAlong = { "MouseControlsMenu", "KeyBindMenu" }
5
6function P.onLoad()
7    P.multiplayerMode = "startClient"
8
9    --buttons are arranged in a 3x1 matrix:
10    P:setButton(1, 1, {
11            ["button"] = winMgr:getWindow("orxonox/MouseControlsButton"),
12            ["callback"]  = P.ControlsMouseControlsButton_clicked
13    })
14
15    P:setButton(2, 1, {
16            ["button"] = winMgr:getWindow("orxonox/KeybindingsButton"),
17            ["callback"]  = P.ControlsKeyboardControlsButton_clicked
18    })
19
20    P:setButton(3, 1, {
21            ["button"] = winMgr:getWindow("orxonox/ControlsBackButton"),
22            ["callback"]  = P.ControlsBackButton_clicked
23    })
24end
25
26function P.ControlsMouseControlsButton_clicked(e)
27    showMenuSheet("MouseControlsMenu", true)
28end
29
30function P.ControlsKeyboardControlsButton_clicked(e)
31    showMenuSheet("KeyBindMenu", true)
32end
33
34function P.ControlsBackButton_clicked(e)
35    hideMenuSheet(P.name)
36end
37
38return P
39
Note: See TracBrowser for help on using the repository browser.