2019-03-17 23:07:57 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<component name="OptionsSlider" extends="PanelSet">
|
|
|
|
<children>
|
|
|
|
<ListPanel id="panel">
|
|
|
|
<Rectangle id="backdrop" />
|
|
|
|
<LabelList id="panelList">
|
|
|
|
<ContentNode id="fieldList" role="content" />
|
|
|
|
</LabelList>
|
|
|
|
</ListPanel>
|
|
|
|
</children>
|
|
|
|
<interface>
|
|
|
|
<field id="options" type="nodearray" onChange="setFields" />
|
|
|
|
<field id="escape" type="boolean" alwaysNotify="true" />
|
|
|
|
</interface>
|
|
|
|
<script type="text/brightscript">
|
|
|
|
<![CDATA[
|
|
|
|
sub init()
|
|
|
|
m.top.visible = false
|
|
|
|
|
|
|
|
panel = m.top.findNode("panel")
|
|
|
|
panel.panelSize = "small"
|
|
|
|
panel.leftPosition = 0
|
|
|
|
panel.focusable = true
|
|
|
|
panel.hasNextPanel = false
|
|
|
|
panel.leftOnly = true
|
|
|
|
|
|
|
|
list = m.top.findNode("panelList")
|
|
|
|
|
|
|
|
panel.list = list
|
|
|
|
|
|
|
|
bd = m.top.findNode("backdrop")
|
|
|
|
bd.color = "#101010DD"
|
|
|
|
bd.translation = [0, 0]
|
|
|
|
dimensions = m.top.getScene().currentDesignResolution
|
|
|
|
bd.width = 575
|
|
|
|
bd.height = dimensions.height
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub setFields()
|
|
|
|
options = m.top.options
|
|
|
|
row = m.top.findNode("fieldList")
|
|
|
|
|
2019-03-18 00:17:54 +00:00
|
|
|
row.clear()
|
2019-03-17 23:07:57 +00:00
|
|
|
row.appendChildren(options)
|
|
|
|
end sub
|
|
|
|
|
|
|
|
function onKeyEvent(key as string, press as boolean) as boolean
|
|
|
|
if not press then return false
|
|
|
|
|
|
|
|
if key = "options"
|
|
|
|
m.top.visible = false
|
|
|
|
m.top.escape = true
|
|
|
|
return true
|
2019-03-18 00:17:54 +00:00
|
|
|
else if key = "OK"
|
|
|
|
list = m.top.findNode("panelList")
|
|
|
|
data = list.content.getChild(list.itemFocused)
|
|
|
|
data.callFunc("cycle")
|
|
|
|
return true
|
2019-03-17 23:07:57 +00:00
|
|
|
end if
|
|
|
|
|
|
|
|
return false
|
|
|
|
end function
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
</component>
|