function showFocus()
' if (m.top.gridHasFocus <> invalid)
if m.top.focusPercent = 1.0
m.itemText.font="font:MediumBoldSystemFont"
print m.top.itemContent.labelText
else if m.top.focusPercent = 0.0
m.itemText.font="font:MediumStyleFont"
end if
' end if
' if focus
' m.itemText.text=m.top.itemContent.labelText
' else
' m.itemText.font="font:MediumSystemFont"
' end if
' print m.top.itemContent.labelText
end function
<?xml version="1.0" encoding="utf-8" ?>
<!--********** Copyright 2016 Roku Corp. All Rights Reserved. **********-->
<component name="SimpleGridItem" extends="Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd">
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged"/>
<field id="focusPercent" type="float" onChange="showfocus"/>
</interface>
<script type="text/brightscript" uri="pkg:/components/SimpleGridItem.brs" />
<children>
<LayoutGroup layoutDirection="vert" vertAlignment="top" itemSpacings="20" translation="[0,0]" >
<Poster id="itemImage" translation="[17,3]" width="195" height="150" />
<LayoutGroup layoutDirection="horiz" horizAlignment="center" itemSpacings="0" >
<Label id="itemText" font="font:MediumSystemFont" horizAlign="center"/>
</LayoutGroup>
</LayoutGroup>
</children>
</component>
Same issue did you find solution?
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!