jf-roku/components/LibItem.xml

37 lines
898 B
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8" ?>
<component name="LibItem" extends="Group">
<children>
2019-03-10 05:28:28 +00:00
<Label id="itemText" horizAlign="center" font="font:MediumSystemFont" height="75" />
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged"/>
</interface>
<script type="text/brightscript">
2019-03-05 05:18:01 +00:00
<![CDATA[
sub Init()
m.itemText = m.top.findNode("itemText")
m.itemText.text = "Loading..."
2019-03-10 05:28:28 +00:00
updateSize()
end sub
sub updateSize()
m.itemText = m.top.findNode("itemText")
2019-03-10 05:28:28 +00:00
maxSize = m.top.getParent().itemSize
m.itemText.width = maxSize[0]
m.itemText.translation = [0, (maxSize[1] / 2) - 15]
2019-03-05 05:18:01 +00:00
end sub
2019-03-05 05:18:01 +00:00
function itemContentChanged() as void
m.itemText = m.top.findNode("itemText")
itemData = m.top.itemContent
m.itemText.text = itemData.labelText
updateSize()
2019-03-05 05:18:01 +00:00
end function
]]>
</script>
</component>