Changeset 8079 for code/trunk/data/gui/scripts/DecisionPopup.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/DecisionPopup.lua
r7726 r8079 3 3 local P = createMenuSheet("DecisionPopup") 4 4 5 P.buttonList = {}6 7 function P.onShow()8 --indices to iterate through buttonlist9 P.oldindex = -210 P.index = -111 end12 13 5 function P.onLoad() 14 6 15 7 --button are arranged in a 1x2 matrix 16 local item ={8 P:setButton(1, 1, { 17 9 ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_yes"), 18 ["function"] = P.button_yes 19 } 20 P.buttonList[1] = item 10 ["callback"] = P.button_yes 11 }) 21 12 22 local item ={13 P:setButton(1, 2, { 23 14 ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_no"), 24 [" function"] = P.button_no25 } 26 P.buttonList[2] = item 15 ["callback"] = P.button_no 16 }) 17 end 27 18 19 function P.onShow() 20 P:setSelection(1, 1) 28 21 end 29 22 … … 51 44 end 52 45 53 function P.onKeyPressed()54 buttonIteratorHelper(P.buttonList, code, P, 1, 2)55 end56 57 46 return P 58 47
Note: See TracChangeset
for help on using the changeset viewer.