- Timestamp:
- Jun 3, 2012, 6:05:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua
r9271 r9272 12 12 -- Windows 13 13 dircmd = "dir /b/s" 14 end]] 15 P.createFilterTab("All Ships") 14 end]] 15 P.createFilterTab("All Ships") 16 16 end 17 17 … … 19 19 P.shipList = {} 20 20 for line in io.lines("../levels/templates/.shipmodels") do --checks if shipmodel is included in level file 21 22 23 24 end 21 if selectedlevel:hasShip(string.lower(line)) then 22 P.shipList[#P.shipList+1] = string.lower(line) 23 end 24 end 25 25 end 26 26 … … 46 46 tabName = "orxonox/ShipSelectionLevelTab" 47 47 -- create new tab window with desired name 48 listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName)) 48 listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName)) 49 49 listbox:setText(name) 50 50 listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}") 51 --[[TODO: smaller list if image and description is implemented. 52 listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]] 51 --[[TODO: smaller list if image and description is implemented. 52 listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]] 53 53 listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}") 54 54 -- fill listbox with items … … 107 107 108 108 if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil) then 109 109 selectedlevel:selectShip(P.ShipSelectionGetSelectedModel()) 110 110 orxonox.execute("startGame " .. "_temp.oxw") 111 111 hideAllMenuSheets() 112 112 else 113 113 orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed") 114 114 end 115 115 end … … 128 128 function P.ShipSelectionBackButton_clicked(e) 129 129 orxonox.execute("keyESC") 130 end 130 end 131 131 132 132 return P
Note: See TracChangeset
for help on using the changeset viewer.