Update Button and Label
This commit is contained in:
@@ -23,7 +23,11 @@ return function(name, basalt)
|
||||
|
||||
getBase = function(self)
|
||||
return base
|
||||
end,
|
||||
end,
|
||||
|
||||
getHorizontalAlign = function(self)
|
||||
return textHorizontalAlign
|
||||
end,
|
||||
|
||||
setHorizontalAlign = function(self, pos)
|
||||
textHorizontalAlign = pos
|
||||
@@ -31,12 +35,20 @@ return function(name, basalt)
|
||||
return self
|
||||
end,
|
||||
|
||||
getVerticalAlign = function(self)
|
||||
return textVerticalAlign
|
||||
end,
|
||||
|
||||
setVerticalAlign = function(self, pos)
|
||||
textVerticalAlign = pos
|
||||
self:updateDraw()
|
||||
return self
|
||||
end,
|
||||
|
||||
getText = function(self)
|
||||
return text
|
||||
end,
|
||||
|
||||
setText = function(self, newText)
|
||||
text = newText
|
||||
self:updateDraw()
|
||||
|
||||
@@ -77,6 +77,12 @@ return function(name, basalt)
|
||||
return self
|
||||
end,
|
||||
|
||||
--- Gets the text alignment of the label.
|
||||
--- @return string
|
||||
getTextAlign = function(self)
|
||||
return textAlign
|
||||
end,
|
||||
|
||||
--- Sets the text alignment of the label.
|
||||
--- @param align string The alignment of the text. Can be "left", "center", or "right".
|
||||
--- @return object
|
||||
|
||||
@@ -475,7 +475,7 @@ return {
|
||||
base.setValuesByXMLData(self, data, renderContext)
|
||||
self:updateSpecifiedValuesByXMLData(data, {
|
||||
"text",
|
||||
"align"
|
||||
"textAlign"
|
||||
})
|
||||
return self
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user