2019-02-04 02:57:52 +00:00
|
|
|
<?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" />
|
2019-02-04 02:57:52 +00:00
|
|
|
</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
|
|
|
|
2019-03-10 05:53:36 +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-02-04 02:57:52 +00:00
|
|
|
|
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
|
2019-03-10 06:16:01 +00:00
|
|
|
updateSize()
|
2019-03-05 05:18:01 +00:00
|
|
|
end function
|
|
|
|
]]>
|
2019-02-04 02:57:52 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</component>
|