Skip to main content
Skip to main content

TextBackdropElement

TextBackdropElement

Description

Element that sizes depending on the size of its child text element

Parent

BitmapElement

Functions

copyAttributes

Description

Definition

copyAttributes()

Arguments

anysrc

Code

function TextBackdropElement:copyAttributes(src)
TextBackdropElement:superClass().copyAttributes( self , src)

self.padding = table.clone(src.padding)
end

loadFromXML

Description

Definition

loadFromXML()

Arguments

anyxmlFile
anykey

Code

function TextBackdropElement:loadFromXML(xmlFile, key)
TextBackdropElement:superClass().loadFromXML( self , xmlFile, key)

self.padding = GuiUtils.getNormalizedScreenValues(getXMLString(xmlFile, key .. "#padding" ), self.padding)
end

loadProfile

Description

Definition

loadProfile()

Arguments

anyprofile
anyapplyProfile

Code

function TextBackdropElement:loadProfile(profile, applyProfile)
TextBackdropElement:superClass().loadProfile( self , profile, applyProfile)

self.padding = GuiUtils.getNormalizedScreenValues(profile:getValue( "padding" ), self.padding)
end

new

Description

Definition

new()

Arguments

anytarget
anycustom_mt

Code

function TextBackdropElement.new(target, custom_mt)
local self = BitmapElement.new(target, custom_mt or TextBackdropElement _mt)

self.padding = { 0 , 0 , 0 , 0 } -- left, top, right, bottom

return self
end