Correctly set focus after exiting a screen created from Extras group (#719)

Co-authored-by: 1hitsong <3330318+1hitsong@users.noreply.github.com>
This commit is contained in:
debmint 2022-08-20 08:54:36 +00:00 committed by GitHub
parent 37fdcc7ae7
commit 12517707d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,11 @@ end sub
sub OnScreenShown()
' set focus to button group
m.buttonGrp.setFocus(true)
if m.extrasGrp.opacity = 1
m.top.lastFocus.setFocus(true)
else
m.buttonGrp.setFocus(true)
end if
end sub
@ -297,6 +301,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
end if
if key = "down" and m.buttonGrp.isInFocusChain()
m.top.lastFocus = m.extrasGrid
m.extrasGrid.setFocus(true)
m.top.findNode("VertSlider").reverse = false
m.top.findNode("extrasFader").reverse = false
@ -306,6 +311,7 @@ function onKeyEvent(key as string, press as boolean) as boolean
if key = "up" and m.top.findNode("extrasGrid").isInFocusChain()
if m.extrasGrid.itemFocused = 0
m.top.lastFocus = m.buttonGrp
m.top.findNode("VertSlider").reverse = true
m.top.findNode("extrasFader").reverse = true
m.top.findNode("pplAnime").control = "start"