From 9ed2b44be27cf612eddd2a3a2231fdd599e5d1f5 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 28 Aug 2021 21:14:48 +0200 Subject: [PATCH] fix: redraw menu when selecting another widget --- sonic-radiance.love/birb/modules/gui/menus/hlistbox.lua | 2 ++ sonic-radiance.love/birb/modules/gui/menus/listbox.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sonic-radiance.love/birb/modules/gui/menus/hlistbox.lua b/sonic-radiance.love/birb/modules/gui/menus/hlistbox.lua index 7c51643..e94809b 100644 --- a/sonic-radiance.love/birb/modules/gui/menus/hlistbox.lua +++ b/sonic-radiance.love/birb/modules/gui/menus/hlistbox.lua @@ -60,11 +60,13 @@ end function HListBox:moveByKeys(key, code) if key == 'left' then self.widget:moveCursor(-1) + self.canvas.needRedraw = true self:playNavigationSound() end if key == 'right' then self.widget:moveCursor(1) + self.canvas.needRedraw = true self:playNavigationSound() end end diff --git a/sonic-radiance.love/birb/modules/gui/menus/listbox.lua b/sonic-radiance.love/birb/modules/gui/menus/listbox.lua index 93051d8..934d502 100644 --- a/sonic-radiance.love/birb/modules/gui/menus/listbox.lua +++ b/sonic-radiance.love/birb/modules/gui/menus/listbox.lua @@ -61,11 +61,13 @@ function ListBox:moveByKeys(key) if key == 'up' then self.widget:moveCursor(-1) self:playNavigationSound() + self.canvas.needRedraw = true end if key == 'down' then self.widget:moveCursor(1) self:playNavigationSound() + self.canvas.needRedraw = true end end