Changeset 7922 for code/branches/usability/data/gui/scripts/HostMenu.lua
- Timestamp:
- Feb 20, 2011, 12:47:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/HostMenu.lua
r7887 r7922 5 5 P.multiplayerMode = "startServer" 6 6 7 P.buttonList = {}8 7 P.levelList = {} 9 8 P.itemList = {} … … 11 10 12 11 function P.onLoad() 13 P.multiplayerMode = "startServer" 12 P.multiplayerMode = "startServer" 14 13 local window = winMgr:getWindow("orxonox/MultiplayerShowAllCheckbox") 15 14 local button = tolua.cast(window,"CEGUI::Checkbox") … … 17 16 P.createLevelList() 18 17 19 local item = { 18 P:initButtons(1, 2) 19 20 P:setButton(1, 1, { 20 21 ["button"] = winMgr:getWindow("orxonox/HostMenuStartButton"), 21 ["function"] = P.HostMenuStartButton_clicked 22 } 23 P.buttonList[1] = item 22 ["callback"] = P.HostMenuStartButton_clicked 23 }) 24 24 25 local item ={25 P:setButton(1, 2, { 26 26 ["button"] = winMgr:getWindow("orxonox/HostMenuBackButton"), 27 ["function"] = P.HostMenuBackButton_clicked 28 } 29 P.buttonList[2] = item 27 ["callback"] = P.HostMenuBackButton_clicked 28 }) 30 29 end 31 30 … … 44 43 P.createLevelList() 45 44 end 46 47 P.oldindex = -248 P.index = -149 50 45 end 51 46 … … 97 92 end 98 93 99 function P.HostMenuStartButton_clicked(e) 94 function P.HostMenuStartButton_clicked(e) 100 95 local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/HostMenuListbox")) 101 96 local choice = listbox:getFirstSelectedItem() … … 119 114 end 120 115 121 function P.onKeyPressed()122 buttonIteratorHelper(P.buttonList, code, P, 1, 2)123 end124 125 116 return P
Note: See TracChangeset
for help on using the changeset viewer.