Changeset 9272 for code/branches/presentation2012merge/data/gui/scripts
- Timestamp:
- Jun 3, 2012, 6:05:24 PM (13 years ago)
- Location:
- code/branches/presentation2012merge/data/gui/scripts
- Files:
-
- 2 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 -
code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua
r9269 r9272 10 10 function P.onLoad() 11 11 P.createLevelList() 12 12 13 13 -- create tabs with desired tab as argument (nil for all) 14 14 P.createFilterTab("Gametypes", "gametype") … … 19 19 P.createFilterTab("Tests", "test") 20 20 P.createFilterTab("Show All", nil) 21 21 22 22 -- update description and screenshot boxes 23 23 P.SingleplayerSelectionChanged() 24 24 25 25 --buttons are arranged in a 1x3 matrix 26 26 P:setButton(1, 1, { … … 48 48 level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index) 49 49 if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then 50 50 --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx") 51 51 local levelXMLFilename = level:getXMLFilename() 52 52 -- create an imageset for each screenshot … … 151 151 orxonox.execute("startGame " .. selectedlevel:getXMLFilename()) 152 152 hideAllMenuSheets() 153 153 end 154 154 end 155 155 end
Note: See TracChangeset
for help on using the changeset viewer.