Changeset 5527 for data/media/gui/scripts
- Timestamp:
- May 21, 2009, 5:18:23 PM (15 years ago)
- Location:
- data/media/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
data/media/gui/scripts/gui.lua
r5523 r5527 15 15 setmetatable(newElement, self) -- connects new element with class 16 16 self.__index = self 17 P:init()17 self:init() 18 18 return newElement 19 19 end -
data/media/gui/scripts/loadGUI_3.lua
r5491 r5527 11 11 system:setDefaultMouseCursor("TaharezLook", "MouseArrow") 12 12 system:setDefaultFont("BlueHighway-12") 13 system:setDefaultTooltip("TaharezLook/Tooltip") 13 14 14 15 loadedGUIs = {} -
data/media/gui/scripts/mainmenu_2.lua
r5523 r5527 9 9 10 10 function P:init() 11 --win = winMgr:getWindow("orxonox/LevelListBox") 12 --print(win.getItemCount()) 13 --item = winMgr:createWindow("TaharezLook/ListboxItem", "orxonox/LevelListBoxItem1") 14 --item:setText("HiHo") 15 --win:addItem(item) 16 --print(win:getItemCount()) 11 listbox = winMgr:getWindow("orxonox/LevelListbox") 12 orxonox.GUIManager:getInstance():getLevelList() 13 for k,v in pairs(levellist) do 14 item = CEGUI.createListboxTextItem(v) 15 item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush") 16 CEGUI.toListbox(listbox):addItem(item) 17 end 17 18 end 18 19 … … 20 21 -- events for mainmenu 21 22 function P.button_quit_clicked(e) 22 hideGUI()23 orxonox.CommandExecutor:execute("exit")23 hideGUI() 24 orxonox.CommandExecutor:execute("exit") 24 25 end 25 26 26 27 function P.button_standalone_clicked(e) 27 orxonox.CommandExecutor:execute("startGame") 28 toggleGUI() 28 choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem() 29 if choice then 30 orxonox.CommandExecutor:execute("setLevel " .. choice:getText() .. ".oxw") 31 orxonox.CommandExecutor:execute("startGame") 32 toggleGUI() 33 end 29 34 end 30 35 … … 44 49 end 45 50 51 function P.listbox_level_selectionchanged(e) 52 if winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem() then 53 winMgr:getWindow("orxonox/StandaloneButton"):enable() 54 else 55 winMgr:getWindow("orxonox/StandaloneButton"):disable() 56 end 57 end 58 46 59 return mainmenu_2 47 60
Note: See TracChangeset
for help on using the changeset viewer.