66 lines
1.7 KiB
XML
66 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<component name="ConfigItem" extends="Group">
|
|
<children>
|
|
<Rectangle
|
|
id="selectionOutline"
|
|
translation="[0,0]"
|
|
color="#a2a2a2"
|
|
opacity="0"
|
|
width="196"
|
|
height="40"
|
|
/>
|
|
|
|
<Rectangle
|
|
translation="[4, 4]"
|
|
color="#000b35"
|
|
opacity="1"
|
|
width="188"
|
|
height="32"
|
|
/>
|
|
|
|
<LayoutGroup
|
|
layoutDirection="horiz"
|
|
vertAlignment="center"
|
|
itemSpacings="20"
|
|
translation="[8,40]" >
|
|
<!-- above translation is itemspacings + item height / 2 -->
|
|
<Label id="itemName" horizAlign="left" width="196" height="60" />
|
|
<Label id="itemValue" horizAlign="left" width="196" height="60" />
|
|
</LayoutGroup>
|
|
</children>
|
|
|
|
<interface>
|
|
<field id="itemContent" type="node" onChange="itemContentChanged" />
|
|
<field id="focusPercent" type="float" onChange="focusChanged" />
|
|
<field id="itemHasFocus" type="bool" onChange="focusChanged" />
|
|
</interface>
|
|
|
|
<script type="text/brightscript">
|
|
<![CDATA[
|
|
sub Init()
|
|
m.itemName = m.top.findNode("itemName")
|
|
m.itemValue = m.top.findNode("itemValue")
|
|
m.selectedBox = m.top.findNode("selectionOutline")
|
|
end sub
|
|
|
|
sub itemContentChanged() as void
|
|
itemData = m.top.itemContent
|
|
|
|
m.itemName.text = itemData.labelText
|
|
if itemData.valueText <> ""
|
|
m.itemValue.color = "#ffffff"
|
|
m.itemValue.text = itemData.valueText
|
|
else
|
|
m.itemValue.color = "#444444"
|
|
m.itemValue.text = "Enter a value..." ' TODO - get a placeholder
|
|
end if
|
|
end sub
|
|
|
|
sub focusChanged() as void
|
|
m.selectedBox.opacity = m.top.focusPercent
|
|
end sub
|
|
]]>
|
|
</script>
|
|
|
|
</component>
|