feat: add support for animated menu widgets

This commit is contained in:
Kazhnuz 2022-01-02 10:02:16 +01:00
parent b779a55eb7
commit 784059f8f4

View file

@ -37,6 +37,7 @@ function BaseWidget:new(menuName)
self.canvas = {}
self.canvas.texture = nil
self.canvas.needRedraw = true
self.canvas.isAnimated = false
self.order = 0
self:register()
@ -74,7 +75,7 @@ function BaseWidget:register()
end
function BaseWidget:redraw()
if (self.canvas.needRedraw) then
if (self.canvas.needRedraw or self.canvas.isAnimated) then
self:generateTexture()
end
end