jf-roku/components/config/item.xml

52 lines
1.1 KiB
XML
Raw Normal View History

2019-03-14 17:11:51 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<component name="ConfigItem" extends="Group">
<children>
<LayoutGroup
layoutDirection="horiz"
vertAlignment="center"
itemSpacings="20"
translation="[8,40]" >
<Label id="label"
horizAlign="left"
width="196"
height="60"
color="#666666" />
<Label id="value"
horizAlign="left"
width="196"
height="60"
color="#666666" />
</LayoutGroup>
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged" />
</interface>
<script type="text/brightscript">
<![CDATA[
sub Init()
m.name = m.top.findNode("label")
m.value = m.top.findNode("value")
end sub
sub itemContentChanged() as void
data = m.top.itemContent
m.name.text = data.label
if data.value = ""
m.value.color = "#444444"
m.value.text = "Enter a value..."
else if data.type = "password"
m.value.color = "#ffffff"
m.value.text = "********"
else
m.value.color = "#ffffff"
m.value.text = data.value
end if
end sub
]]>
</script>
</component>