Changeset 6176 for code/branches
- Timestamp:
- Nov 29, 2009, 1:36:12 PM (15 years ago)
- Location:
- code/branches/presentation2/data/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/gui/scripts/InitialiseGUI.lua
r6153 r6176 161 161 end 162 162 163 function hideAllGUIs() 164 while nrOfActiveSheets ~= 0 do 165 hideGUI(activeSheets[nrOfActiveSheets]) 166 end 167 end 168 163 169 function keyESC() 164 170 if nrOfActiveSheets > 0 then -
code/branches/presentation2/data/gui/scripts/NewMultiplayerMenu.lua
r6150 r6176 20 20 local level = "" 21 21 while true do 22 level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)23 if level == "" then24 break25 end26 table.insert(levelList, level)27 index = index + 122 level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index) 23 if level == "" then 24 break 25 end 26 table.insert(levelList, level) 27 index = index + 1 28 28 end 29 29 table.sort(levelList) … … 38 38 local multiplayerMode = "startClient" 39 39 if multiplayerMode == "startClient" then 40 41 40 window = winMgr:getWindow("orxonox/MultiplayerJoinButton") 41 button = tolua.cast(window,"CEGUI::RadioButton") 42 42 button:setSelected(true) 43 43 end 44 44 if multiplayerMode == "startServer" then 45 46 45 window = winMgr:getWindow("orxonox/MultiplayerHostButton") 46 button = tolua.cast(window,"CEGUI::RadioButton") 47 47 button:setSelected(true) 48 48 end 49 49 if multiplayerMode == "startDedicated" then 50 51 50 window = winMgr:getWindow("orxonox/MultiplayerDedicatedButton") 51 button = tolua.cast(window,"CEGUI::RadioButton") 52 52 button:setSelected(true) 53 53 end … … 70 70 71 71 function P.MultiplayerStartButton_clicked(e) 72 orxonox.CommandExecutor:execute(multiplayerMode) 73 debug("event: start") 72 local choice = winMgr:getWindow("orxonox/MultiplayerLevelListbox"):getFirstSelectedItem() 73 if choice then 74 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 75 orxonox.CommandExecutor:execute(multiplayerMode) 76 hideAllGUIs() 77 debug("event: start") 78 end 74 79 end 75 80 -
code/branches/presentation2/data/gui/scripts/NewSingleplayerMenu.lua
r6150 r6176 39 39 40 40 function P.SingleplayerStartButton_clicked(e) 41 -- start game 42 debug("event: start") 41 choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem() 42 if choice then 43 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 44 orxonox.CommandExecutor:execute("startGame") 45 hideAllGUIs() 46 debug("event: start") 47 end 43 48 end 44 49
Note: See TracChangeset
for help on using the changeset viewer.