Changeset 5532
- Timestamp:
- May 24, 2009, 2:39:59 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/media/gui/scripts/mainmenu_2.lua
r5527 r5532 10 10 function P:init() 11 11 listbox = winMgr:getWindow("orxonox/LevelListbox") 12 orxonox.GUIManager:getInstance():getLevelList() 12 preselect = orxonox.Game:getInstance():getLevel() 13 orxonox.GUIManager:getInstance():getLevelList() --levellist variable ist set now 13 14 for k,v in pairs(levellist) do 14 item = CEGUI.createListboxTextItem(v) 15 item = CEGUI.createListboxTextItem(v) 15 16 item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush") 16 17 CEGUI.toListbox(listbox):addItem(item) 18 if v .. ".oxw" == preselect then 19 listbox:setItemSelectState(item, true) 20 end 17 21 end 18 22 end … … 28 32 choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem() 29 33 if choice then 30 orxonox. CommandExecutor:execute("setLevel " ..choice:getText() .. ".oxw")34 orxonox.Game:getInstance():setLevel(choice:getText() .. ".oxw") 31 35 orxonox.CommandExecutor:execute("startGame") 32 36 toggleGUI()
Note: See TracChangeset
for help on using the changeset viewer.