Changeset 7687 for code/branches/menu/data/gui/scripts/SingleplayerMenu.lua
- Timestamp:
- Dec 1, 2010, 2:04:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/scripts/SingleplayerMenu.lua
r7163 r7687 2 2 3 3 local P = createMenuSheet("SingleplayerMenu") 4 5 P.buttonList = {} 4 6 5 7 function P.onLoad() … … 28 30 end 29 31 32 --buttons are arranged in a 1x2 matrix 33 local item = { 34 ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"), 35 ["function"] = P.SingleplayerStartButton_clicked 36 } 37 P.buttonList[1] = item 38 39 local item = { 40 ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"), 41 ["function"] = P.SingleplayerBackButton_clicked 42 } 43 P.buttonList[2] = item 44 45 end 46 47 function P.onShow() 48 --indices to iterate through buttonlist 49 P.oldindex = -2 50 P.index = -1 30 51 end 31 52 … … 43 64 end 44 65 66 function P.onKeyPressed() 67 buttonIteratorHelper(P.buttonList, code, P, 1, 2) 68 end 69 45 70 return P 46 71
Note: See TracChangeset
for help on using the changeset viewer.