Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2010, 7:37:18 PM (14 years ago)
Author:
konrad
Message:

Final changes to menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/data/gui/scripts/GraphicsMenu.lua

    r7689 r7779  
    44
    55P.buttonList = {}
     6P.schemeList = {"TaharezGreen", "Orxonox"}
    67
    78function P.onShow()
     
    9798    }
    9899    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
     112end
     113
     114function 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])
    99123end
    100124
Note: See TracChangeset for help on using the changeset viewer.