fix: redraw menu when selecting another widget
This commit is contained in:
parent
4daa0b16eb
commit
9ed2b44be2
2 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue