All pastes #99527 Raw Edit

Lindquist

public lua v1 · immutable
#99527 ·published 2006-07-25 12:02 UTC
rendered paste body
local look = CEGUI.WidgetLookFeel("MyLook")        local colour_property = CEGUI.PropertyDefinition("Colour", "FFFF0000", true, false)    look:addPropertyDefinition(colour_property)        local imagery = CEGUI.ImagerySection("main")    local text = CEGUI.TextComponent()        local full_area = CEGUI.ComponentArea()    full_area.d_left = CEGUI.Dimension(CEGUI.AbsoluteDim(0), CEGUI.DT_LEFT_EDGE)    full_area.d_top = CEGUI.Dimension(CEGUI.AbsoluteDim(0), CEGUI.DT_TOP_EDGE)    full_area.d_right_or_width = CEGUI.Dimension(CEGUI.UnifiedDim(CEGUI.UDim(1,0),CEGUI.DT_RIGHT_EDGE), CEGUI.DT_RIGHT_EDGE)    full_area.d_bottom_or_height = CEGUI.Dimension(CEGUI.UnifiedDim(CEGUI.UDim(1,0),CEGUI.DT_BOTTOM_EDGE), CEGUI.DT_BOTTOM_EDGE)        text:setComponentArea(full_area)    text:setColoursPropertySource("Colour")    text:setColoursPropertyIsColourRect(false)    text:setVerticalFormatting(CEGUI.VTF_CENTRE_ALIGNED)    text:setHorizontalFormatting(CEGUI.HTF_CENTRE_ALIGNED)        imagery:addTextComponent(text)    look:addImagerySection(imagery)        local state = CEGUI.StateImagery("Enabled")    local layer = CEGUI.LayerSpecification(0)    local section = CEGUI.SectionSpecification("MyLook", "main", "")    layer:addSectionSpecification(section)    state:addLayer(layer)    look:addStateSpecification(state)        state = CEGUI.StateImagery("Disabled")    state:addLayer(layer)    look:addStateSpecification(state)