Changeset 8079 for code/trunk/data/gui/scripts/ControlsMenu.lua
- Timestamp:
- Mar 15, 2011, 9:47:11 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/data/gui/scripts/ControlsMenu.lua
r7689 r8079 2 2 3 3 local P = createMenuSheet("ControlsMenu") 4 P.buttonList = {}5 4 P.loadAlong = { "MouseControlsMenu", "KeyBindMenu" } 6 5 7 6 function P.onLoad() 8 P.multiplayerMode = "startClient" 7 P.multiplayerMode = "startClient" 9 8 10 9 --buttons are arranged in a 3x1 matrix: 11 local item ={10 P:setButton(1, 1, { 12 11 ["button"] = winMgr:getWindow("orxonox/MouseControlsButton"), 13 ["function"] = P.ControlsMouseControlsButton_clicked 14 } 15 P.buttonList[1] = item 12 ["callback"] = P.ControlsMouseControlsButton_clicked 13 }) 16 14 17 local item ={15 P:setButton(2, 1, { 18 16 ["button"] = winMgr:getWindow("orxonox/KeybindingsButton"), 19 ["function"] = P.ControlsKeyboardControlsButton_clicked 20 } 21 P.buttonList[2] = item 17 ["callback"] = P.ControlsKeyboardControlsButton_clicked 18 }) 22 19 23 local item ={20 P:setButton(3, 1, { 24 21 ["button"] = winMgr:getWindow("orxonox/ControlsBackButton"), 25 ["function"] = P.ControlsBackButton_clicked 26 } 27 P.buttonList[3] = item 28 29 end 30 31 function P.onShow() 32 --indices to iterate through buttonlist 33 P.oldindex = -2 34 P.index = -1 22 ["callback"] = P.ControlsBackButton_clicked 23 }) 35 24 end 36 25 … … 47 36 end 48 37 49 function P.onKeyPressed()50 buttonIteratorHelper(P.buttonList, code, P, 3, 1)51 end52 53 38 return P 54 39
Note: See TracChangeset
for help on using the changeset viewer.