jf-roku/components/JFScene.bs
2023-10-03 12:11:25 -04:00

27 lines
767 B
Plaintext

import "pkg:/source/utils/misc.bs"
sub init()
m.top.backgroundColor = "#262626" '"#101010"
m.top.backgroundURI = ""
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if not press then return false
if key = "back"
m.global.sceneManager.callFunc("popScene")
return true
else if key = "options"
group = m.global.sceneManager.callFunc("getActiveScene")
if isValid(group) and isValid(group.optionsAvailable) and group.optionsAvailable
group.lastFocus = group.focusedChild
panel = group.findNode("options")
panel.visible = true
panel.findNode("panelList").setFocus(true)
end if
return true
end if
return false
end function