From 784059f8f478e59569d9bb5f8e599dd10c5eba41 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 2 Jan 2022 10:02:16 +0100 Subject: [PATCH] feat: add support for animated menu widgets --- sonic-radiance.love/birb/modules/gui/menus/widgets/base.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonic-radiance.love/birb/modules/gui/menus/widgets/base.lua b/sonic-radiance.love/birb/modules/gui/menus/widgets/base.lua index ca106f6..d2f5356 100644 --- a/sonic-radiance.love/birb/modules/gui/menus/widgets/base.lua +++ b/sonic-radiance.love/birb/modules/gui/menus/widgets/base.lua @@ -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