Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2010, 10:07:48 PM (14 years ago)
Author:
rgrieder
Message:

Changed use of CEGUI widgets: Instead of addressing a type with "TaharezLook/Button" I changed it to "MenuWidgets/MyWidget".
That allows to define multiple skins for the menu and simply load the one we like.
Furthermore the idea is to use "HUDWidgets/MyWidget" for HUD elements. But I haven't added that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/data/gui/scripts/KeyBindMenu.lua

    r6459 r6564  
    6565
    6666    --Calculate design parameters:
    67     sampleWindow = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/SampleWindow")
     67    sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/SampleWindow")
    6868    sampleWindow:setText("SampleText")
    6969
     
    122122    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1))))
    123123
    124     local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
     124    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
    125125    command:setText(nameList[k])
    126126    command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))
     
    129129    offset = offset + commandWidth + spaceWidth
    130130
    131     local plus = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
     131    local plus = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
    132132    plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0)))
    133133    plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
     
    139139    local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]);
    140140    for i=0,(numButtons-1) do
    141         local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
     141        local button = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
    142142        local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i)
    143143        name = P.KeyNameNiceifier(name)
     
    153153        offset = offset + buttonWidth
    154154
    155         local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
     155        local clear = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
    156156        clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
    157157        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
Note: See TracChangeset for help on using the changeset viewer.