Changeset 7689 for code/trunk/data/gui/scripts/SingleplayerMenu.lua
- Timestamp:
- Dec 1, 2010, 3:00:19 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/menu merged: 7587-7588,7594,7607-7608,7649,7663,7670-7671,7687
- Property svn:mergeinfo changed
-
code/trunk/data/gui/scripts/SingleplayerMenu.lua
r7648 r7689 3 3 local P = createMenuSheet("SingleplayerMenu") 4 4 5 P.buttonList = {} 5 6 P.levelList = {} 6 7 P.itemList = {} … … 12 13 button:setSelected(false) 13 14 P.createLevelList() 15 16 --buttons are arranged in a 1x2 matrix 17 local item = { 18 ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"), 19 ["function"] = P.SingleplayerStartButton_clicked 20 } 21 P.buttonList[1] = item 22 23 local item = { 24 ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"), 25 ["function"] = P.SingleplayerBackButton_clicked 26 } 27 P.buttonList[2] = item 14 28 end 15 29 … … 47 61 end 48 62 63 function P.onShow() 64 --indices to iterate through buttonlist 65 P.oldindex = -2 66 P.index = -1 67 end 68 49 69 function P.SingleplayerStartButton_clicked(e) 50 70 local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox")) … … 74 94 end 75 95 96 function P.onKeyPressed() 97 buttonIteratorHelper(P.buttonList, code, P, 1, 2) 98 end 99 76 100 return P 77 101
Note: See TracChangeset
for help on using the changeset viewer.