- Timestamp:
- May 21, 2009, 5:18:23 PM (16 years ago)
- Location:
- data/media/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
data/media/gui/layouts/MainMenu.layout
r5435 r5527 12 12 <Property Name="Text" Value="Standalone"/> 13 13 <Event Name="Clicked" Function="button_standalone_clicked"/> 14 </Window> 15 16 <Window Type="TaharezLook/Listbox" Name="orxonox/LevelListbox"> 14 17 </Window> 15 18 -
data/media/gui/layouts/MainMenu_2.layout
r5496 r5527 11 11 <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/> 12 12 <Property Name="Text" Value="Standalone"/> 13 <Property Name="Disabled" Value="true"/> 13 14 <Event Name="Clicked" Function="mainmenu_2.button_standalone_clicked"/> 15 </Window> 16 17 <Window Type="TaharezLook/Listbox" Name="orxonox/LevelListbox"> 18 <Property Name="UnifiedPosition" Value="{{0.4,0},{0.3,0}}"/> 19 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="UnifiedSize" Value="{{0.35,0},{0.33,0}}" /> 21 <Property Name="Tooltip" Value="Available Levels." /> 22 <Event Name="ItemSelectionChanged" Function="mainmenu_2.listbox_level_selectionchanged" /> 14 23 </Window> 15 24 -
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.