- Timestamp:
- Feb 20, 2011, 12:47:57 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/SingleplayerMenu.lua
r7876 r7922 3 3 local P = createMenuSheet("SingleplayerMenu") 4 4 5 P.buttonList = {}6 5 P.levelList = {} 7 6 P.itemList = {} … … 15 14 16 15 --buttons are arranged in a 1x2 matrix 17 local item = { 16 P:initButtons(1, 2) 17 18 P:setButton(1, 1, { 18 19 ["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"), 19 ["function"] = P.SingleplayerStartButton_clicked 20 } 21 P.buttonList[1] = item 20 ["callback"] = P.SingleplayerStartButton_clicked 21 }) 22 22 23 local item ={23 P:setButton(1, 2, { 24 24 ["button"] = winMgr:getWindow("orxonox/SingleplayerBackButton"), 25 ["function"] = P.SingleplayerBackButton_clicked 26 } 27 P.buttonList[2] = item 25 ["callback"] = P.SingleplayerBackButton_clicked 26 }) 28 27 end 29 28 … … 61 60 end 62 61 63 function P.onShow()64 --indices to iterate through buttonlist65 P.oldindex = -266 P.index = -167 end68 69 62 function P.SingleplayerStartButton_clicked(e) 70 63 local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/SingleplayerLevelListbox")) … … 93 86 end 94 87 95 function P.onKeyPressed()96 buttonIteratorHelper(P.buttonList, code, P, 1, 2)97 end98 99 88 return P 100 89
Note: See TracChangeset
for help on using the changeset viewer.