jf-roku/components/options/OptionsSlider.bs

42 lines
931 B
Plaintext
Raw Normal View History

2019-05-03 12:48:59 +00:00
sub init()
m.top.visible = false
panel = m.top.findNode("panel")
panel.panelSize = "small"
2020-06-25 10:37:18 +00:00
panel.leftPosition = 96
2019-05-03 12:48:59 +00:00
panel.focusable = true
panel.hasNextPanel = false
panel.leftOnly = true
list = m.top.findNode("panelList")
panel.list = list
end sub
sub setFields()
options = m.top.options
buttons = m.top.buttons
row = m.top.findNode("fieldList")
row.clear()
row.appendChildren(options)
row.appendChildren(buttons)
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if not press then return false
if key = "options" or key = "back"
2019-05-03 12:48:59 +00:00
m.top.visible = false
2019-10-13 19:33:14 +00:00
m.top.closeSidePanel = true
2019-05-03 12:48:59 +00:00
return true
else if key = "OK"
list = m.top.findNode("panelList")
data = list.content.getChild(list.itemFocused)
2019-10-13 19:33:14 +00:00
data.optionSelected = true
2019-05-03 12:48:59 +00:00
return true
end if
return false
end function