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