feat: add support for animated menu widgets
This commit is contained in:
parent
b779a55eb7
commit
784059f8f4
1 changed files with 2 additions and 1 deletions
|
@ -37,6 +37,7 @@ function BaseWidget:new(menuName)
|
||||||
self.canvas = {}
|
self.canvas = {}
|
||||||
self.canvas.texture = nil
|
self.canvas.texture = nil
|
||||||
self.canvas.needRedraw = true
|
self.canvas.needRedraw = true
|
||||||
|
self.canvas.isAnimated = false
|
||||||
|
|
||||||
self.order = 0
|
self.order = 0
|
||||||
self:register()
|
self:register()
|
||||||
|
@ -74,7 +75,7 @@ function BaseWidget:register()
|
||||||
end
|
end
|
||||||
|
|
||||||
function BaseWidget:redraw()
|
function BaseWidget:redraw()
|
||||||
if (self.canvas.needRedraw) then
|
if (self.canvas.needRedraw or self.canvas.isAnimated) then
|
||||||
self:generateTexture()
|
self:generateTexture()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue