Changeset 7779 for code/branches/presentation/data/gui/scripts
- Timestamp:
- Dec 19, 2010, 7:37:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/data/gui/scripts/GraphicsMenu.lua
r7689 r7779 4 4 5 5 P.buttonList = {} 6 P.schemeList = {"TaharezGreen", "Orxonox"} 6 7 7 8 function P.onShow() … … 97 98 } 98 99 P.buttonList[1] = item 100 101 local dropbox = winMgr:getWindow("orxonox/ThemeDropBox") 102 local scheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_") 103 for k,v in pairs(P.schemeList) do 104 local item = CEGUI.createListboxTextItem(P.schemeList[k]) 105 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 106 CEGUI.toListbox(dropbox):addItem(item) 107 if v == scheme then 108 dropbox:setItemSelectState(item, true) 109 end 110 end 111 112 end 113 114 function P.ThemeDropBox_changed(e) 115 local dropbox = winMgr:getWindow("orxonox/ThemeDropBox") 116 local listbox = CEGUI.toListbox(dropbox) 117 local choice = listbox:getFirstSelectedItem() 118 local index = 0 119 if choice ~= nil then 120 index = listbox:getItemIndex(choice) 121 end 122 orxonox.CommandExecutor:execute("config GUIManager guiScheme_ " .. P.schemeList[index+1]) 99 123 end 100 124
Note: See TracChangeset
for help on using the changeset viewer.