- Timestamp:
- Feb 20, 2011, 12:47:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/MultiplayerMenu.lua
r7916 r7922 2 2 3 3 local P = createMenuSheet("MultiplayerMenu") 4 5 P.buttonList = {}6 4 7 5 --joinMode is 1 for choice "LAN" and 2 for "Internet" … … 13 11 14 12 --button are arranged in a 2x2 matrix, the left lower item is nil 15 local item = { 13 P:initButtons(2, 2) 14 15 P:setButton(1, 1, { 16 16 ["button"] = winMgr:getWindow("orxonox/MultiplayerJoinButton"), 17 ["function"] = P.MultiplayerJoinButton_clicked 18 } 19 P.buttonList[1] = item 17 ["callback"] = P.MultiplayerJoinButton_clicked 18 }) 20 19 21 local item ={20 P:setButton(1, 2, { 22 21 ["button"] = winMgr:getWindow("orxonox/MultiplayerHostButton"), 23 ["function"] = P.MultiplayerHostButton_clicked 24 } 25 P.buttonList[2] = item 22 ["callback"] = P.MultiplayerHostButton_clicked 23 }) 26 24 27 local item ={25 P:setButton(2, 2, { 28 26 ["button"] = winMgr:getWindow("orxonox/MultiplayerBackButton"), 29 ["function"] = P.MultiplayerBackButton_clicked 30 } 31 P.buttonList[4] = item 27 ["callback"] = P.MultiplayerBackButton_clicked 28 }) 32 29 end 33 30 34 31 function P.onShow() 35 32 --P.showServerList() 36 37 --indices to iterate through buttonlist38 P.oldindex = -239 P.index = -140 33 41 34 if P.joinMode == 1 then … … 158 151 end 159 152 160 function P.onKeyPressed()161 buttonIteratorHelper(P.buttonList, code, P, 2, 2)162 end163 164 153 return P 165 154
Note: See TracChangeset
for help on using the changeset viewer.