jf-roku/components/LibItem.xml
2019-02-03 20:57:52 -06:00

30 lines
978 B
XML

<?xml version="1.0" encoding="utf-8" ?>
<component name="LibItem" extends="Group">
<children>
<LayoutGroup layoutDirection="vert" vertAlignment="top" itemSpacings="20" translation="[0,0]" >
<Poster id="itemImage" translation="[0,0]" width="200" height="300" />
<Label id="itemText" horizAlign="center" translation="[0,0]" font="font:MediumSystemFont" width="196" height="65" />
</LayoutGroup>
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged"/>
</interface>
<script type="text/brightscript">
<![CDATA[
sub Init()
m.itemImage = m.top.findNode("itemImage")
m.itemText = m.top.findNode("itemText")
m.itemText.text = "Loading..."
end sub
function itemContentChanged() as void
itemData = m.top.itemContent
m.itemImage.uri = itemData.posterUrl
m.itemText.text = itemData.labelText
end function
]]>
</script>
</component>