Changeset 7741 for code/branches
- Timestamp:
- Dec 8, 2010, 4:54:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/data/gui/scripts/MultiplayerMenu.lua
r7739 r7741 6 6 7 7 --joinMode is 1 for choice "LAN" and 2 for "Internet" 8 --initial status 09 P.joinMode = 08 --initial status 1 9 P.joinMode = 1 10 10 11 11 function P.onLoad() … … 33 33 34 34 function P.onShow() 35 P.showServerList()35 --P.showServerList() 36 36 37 37 --indices to iterate through buttonlist 38 38 P.oldindex = -2 39 39 P.index = -1 40 41 if P.joinMode == 1 then 42 local window = winMgr:getWindow("orxonox/MultiplayerLanButton") 43 local button = tolua.cast(window,"CEGUI::RadioButton") 44 button:setSelected(true) 45 end 46 if P.joinMode == 2 then 47 local window = winMgr:getWindow("orxonox/MultiplayerInternetButton") 48 local button = tolua.cast(window,"CEGUI::RadioButton") 49 button:setSelected(true) 50 end 40 51 end 41 52 42 53 function P.LanButton_clicked(e) 54 local we = CEGUI.toWindowEventArgs(e) 55 local button = tolua.cast(we.window,"CEGUI::RadioButton") 43 56 P.joinMode = 1 44 P.showServerList() 57 if button:isSelected() == true then 58 P.showServerList() 59 end 45 60 end 46 61 47 62 function P.InternetButton_clicked(e) 63 local we = CEGUI.toWindowEventArgs(e) 64 local button = tolua.cast(we.window,"CEGUI::RadioButton") 48 65 P.joinMode = 2 49 P.showServerList() 66 if button:isSelected() == true then 67 P.showServerList() 68 end 50 69 end 51 70
Note: See TracChangeset
for help on using the changeset viewer.