Changeset 7587 for code/branches/menu/data/gui/scripts
- Timestamp:
- Oct 27, 2010, 1:11:24 PM (14 years ago)
- Location:
- code/branches/menu/data/gui/scripts
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/scripts/MenuSheet.lua
r7163 r7587 16 16 newSheet.bHidePrevious = handleDefArg(_bHidePrevious, true) 17 17 newSheet.tShowCursor = handleDefArg(_tShowCusor, TriBool.True) 18 newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool. Dontcare)18 newSheet.tUseKeyboard = handleDefArg(_tUseKeyboard, TriBool.True) 19 19 newSheet.bBlockJoyStick = handleDefArg(_bBlockJoyStick, false) 20 20 -
code/branches/menu/data/gui/scripts/MultiplayerMenu.lua
r7163 r7587 8 8 9 9 function P.onShow() 10 if P.multiplayerMode == "startClient" then 11 local window = winMgr:getWindow("orxonox/MultiplayerJoinButton") 12 local button = tolua.cast(window,"CEGUI::RadioButton") 13 button:setSelected(true) 14 P.showServerList() 15 end 16 if P.multiplayerMode == "startServer" then 17 local window = winMgr:getWindow("orxonox/MultiplayerHostButton") 18 local button = tolua.cast(window,"CEGUI::RadioButton") 19 button:setSelected(true) 20 P.showLevelList() 21 end 22 if P.multiplayerMode == "startDedicated" then 23 local window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton") 24 local button = tolua.cast(window,"CEGUI::RadioButton") 25 button:setSelected(true) 26 P.showLevelList() 27 end 10 P.showServerList() 28 11 end 29 12 … … 43 26 end 44 27 45 function P.MultiplayerStartButton_clicked(e) 28 function P.MultiplayerHostButton2_clicked(e) 29 showMenuSheet("HostMenu", true) 30 end 31 32 33 function P.MultiplayerJoinButton2_clicked(e) 46 34 local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem() 47 if P.multiplayerMode == "startClient" then 48 if choice then 49 local client = orxonox.Client:getInstance() 50 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 51 client:setDestination( P.serverList[index][2], 55556 ) 52 else 53 return 54 end 35 if choice then 36 local client = orxonox.Client:getInstance() 37 local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID() 38 client:setDestination( P.serverList[index][2], 55556 ) 55 39 else 56 if choice then 57 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 58 else 59 return 60 end 40 return 61 41 end 62 orxonox.execute( P.multiplayerMode)42 orxonox.execute("startClient") 63 43 hideAllMenuSheets() 64 44 end
Note: See TracChangeset
for help on using the changeset viewer.