39 lines
918 B
XML
39 lines
918 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()
|
|
itemText = m.top.findNode("itemText")
|
|
itemText.text = "Loading..."
|
|
|
|
updateSize()
|
|
end sub
|
|
|
|
sub updateSize()
|
|
itemText = m.top.findNode("itemText")
|
|
maxSize = m.top.getParent().itemSize
|
|
itemText.width = maxSize[0]
|
|
|
|
itemText.translation = [0, (maxSize[1] / 2) - 15]
|
|
end sub
|
|
|
|
function itemContentChanged() as void
|
|
itemData = m.top.itemContent
|
|
if itemData = invalid then return
|
|
|
|
itemText = m.top.findNode("itemText")
|
|
itemText.text = itemData.name
|
|
updateSize()
|
|
end function
|
|
]]>
|
|
</script>
|
|
|
|
</component>
|