Changeset 6746 for code/trunk/data/gui/scripts/SingleplayerMenu.lua
- Timestamp:
- Apr 16, 2010, 2:50:16 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/data/gui/scripts/SingleplayerMenu.lua
r6417 r6746 1 1 -- SingleplayerMenu.lua 2 2 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new() --inherit everything from the gui package 5 if _REQUIREDNAME == nil then 6 SingleplayerMenu = P 7 else 8 _G[_REQUIREDNAME] = P 9 end 3 local P = createMenuSheet("SingleplayerMenu") 10 4 11 P.filename = "SingleplayerMenu" 12 P.layoutString = "SingleplayerMenu.layout" 13 14 function P:init() 5 function P.onLoad() 15 6 listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox") 16 7 preselect = orxonox.LevelManager:getInstance():getDefaultLevel() … … 30 21 for k,v in pairs(levelList) do 31 22 item = CEGUI.createListboxTextItem(v) 32 item:setSelectionBrushImage( "TaharezLook", "MultiListSelectionBrush")23 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 33 24 CEGUI.toListbox(listbox):addItem(item) 34 25 if v .. ".oxw" == preselect then … … 43 34 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw") 44 35 orxonox.execute("startGame") 45 hideAll GUIs()36 hideAllMenuSheets() 46 37 end 47 38 end 48 39 49 40 function P.SingleplayerBackButton_clicked(e) 50 hide GUI(P.filename)41 hideMenuSheet(P.name) 51 42 end 52 43
Note: See TracChangeset
for help on using the changeset viewer.