fix: redraw menu when selecting another widget

This commit is contained in:
Kazhnuz 2021-08-28 21:14:48 +02:00
parent 4daa0b16eb
commit 9ed2b44be2
2 changed files with 4 additions and 0 deletions

View file

@ -60,11 +60,13 @@ end
function HListBox:moveByKeys(key, code) function HListBox:moveByKeys(key, code)
if key == 'left' then if key == 'left' then
self.widget:moveCursor(-1) self.widget:moveCursor(-1)
self.canvas.needRedraw = true
self:playNavigationSound() self:playNavigationSound()
end end
if key == 'right' then if key == 'right' then
self.widget:moveCursor(1) self.widget:moveCursor(1)
self.canvas.needRedraw = true
self:playNavigationSound() self:playNavigationSound()
end end
end end

View file

@ -61,11 +61,13 @@ function ListBox:moveByKeys(key)
if key == 'up' then if key == 'up' then
self.widget:moveCursor(-1) self.widget:moveCursor(-1)
self:playNavigationSound() self:playNavigationSound()
self.canvas.needRedraw = true
end end
if key == 'down' then if key == 'down' then
self.widget:moveCursor(1) self.widget:moveCursor(1)
self:playNavigationSound() self:playNavigationSound()
self.canvas.needRedraw = true
end end
end end