jf-roku/components/JFScene.brs

27 lines
768 B
Plaintext
Raw Normal View History

import "pkg:/source/utils/misc.brs"
2019-10-13 19:33:14 +00:00
sub init()
2021-07-09 20:08:32 +00:00
m.top.backgroundColor = "#262626" '"#101010"
m.top.backgroundURI = ""
2019-10-13 19:33:14 +00:00
end sub
function onKeyEvent(key as string, press as boolean) as boolean
2021-07-09 20:08:32 +00:00
if not press then return false
2019-10-13 19:33:14 +00:00
2021-07-09 20:08:32 +00:00
if key = "back"
m.global.sceneManager.callFunc("popScene")
2021-07-09 20:08:32 +00:00
return true
else if key = "options"
group = m.global.sceneManager.callFunc("getActiveScene")
2022-12-23 17:37:44 +00:00
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
2021-07-09 20:08:32 +00:00
return true
end if
2019-10-13 19:33:14 +00:00
2021-07-09 20:08:32 +00:00
return false
2019-10-13 19:33:14 +00:00
end function