Changeset 9057 for code/branches/shipSelection/data/gui/scripts
- Timestamp:
- Mar 23, 2012, 4:24:24 PM (13 years ago)
- Location:
- code/branches/shipSelection/data/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shipSelection/data/gui/scripts/ShipSelectionMenu.lua
r9046 r9057 2 2 3 3 local P = createMenuSheet("ShipSelectionMenu") 4 level = nil5 4 P.activeTabIndexes = {} 6 5 P.scrollbarWidth = 13 7 function P.loadShips(levelname) 8 --orxonox.execute("echo " .. levelname) 9 --level = levelname 10 end 6 11 7 function P.onLoad() 12 --[[ P.createLevelList() 13 8 orxonox.execute("orxout internal_warning Ships= " .. selectedlevel.getShips()) 9 P.createLevelList(selectedlevel) 10 --[[ 14 11 -- create tabs with desired tab as argument (nil for all) 15 12 P.createFilterTab("Gametypes", "gametype") … … 40 37 })--]] 41 38 end 42 --[[ 43 function P.createLevelList() 44 P.levelList = {} 39 40 function P.createShipList(level) 41 42 orxonox.execute("orxout internal_warning Ships= " .. selectedlevel:getShips()) 43 --local stream = selectedlevel:getShips() 44 --local substr = stream 45 --while substr.find(",") 46 --[[ 45 47 local size = orxonox.LevelManager:getInstance():getNumberOfLevels() 46 48 local index = 0 … … 60 62 end 61 63 index = index + 1 62 end 64 end--]] 63 65 end 66 67 64 68 65 69 function P.createFilterTab(name, tag) -
code/branches/shipSelection/data/gui/scripts/SingleplayerMenu.lua
r9046 r9057 6 6 P.activeTabIndexes = {} 7 7 P.scrollbarWidth = 13 8 selectedlevel = {} -- level for ship selection 8 9 9 10 function P.onLoad() … … 141 142 142 143 function P.SingleplayerStartButton_clicked(e) 143 local level = P.SingleplayerGetSelectedLevel() 144 if level ~= nil then 145 146 if level:hasTag("shipselection") then 144 selectedlevel = P.SingleplayerGetSelectedLevel() 145 if selectedlevel ~= nil then 146 if selectedlevel:hasTag("shipselection") then 147 147 local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true) 148 shipSelectionMenu:loadShips(level:getXMLFilename())149 148 else 150 orxonox.execute("startGame " .. level:getXMLFilename())149 orxonox.execute("startGame " .. selectedlevel:getXMLFilename()) 151 150 hideAllMenuSheets() 152 151 end
Note: See TracChangeset
for help on using the changeset viewer.