jf-roku/components/config/item.xml
2019-03-14 12:11:51 -05:00

52 lines
1.1 KiB
XML

<?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>