Fix graphics reloading in Text element
This commit is contained in:
parent
3e17d0af7d
commit
416e6a1758
@ -9,8 +9,15 @@ function Text:new(o)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Text:setText(text)
|
function Text:setText(text)
|
||||||
|
if self.text ~= text then
|
||||||
self:setDirty()
|
self:setDirty()
|
||||||
|
|
||||||
|
local needReload = #self.text ~= #text
|
||||||
self.text = text
|
self.text = text
|
||||||
|
if needReload then
|
||||||
|
self:_reload()
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Text:draw()
|
function Text:draw()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user