cesarcarlos
3 years agoBinge Watcher
Target the selected item in a markup grid to make changes to it
I have a MarkupGrid with a corresponding itemcomponent (MarkUpGridItem):
<MarkupGrid
id="lessons"
translation="[105,386]"
itemComponentName = "MarkupGridItem"
itemSize="[300,350]"
itemSpacing = "[40,20]"
numColumns = "5"
numRows = "2"
vertFocusAnimationStyle="fixedFocus"
/>
The grid item has a poster and also a second poster with a checkmark which remains invisible.
<component name = "MarkupGridItem" extends = "Group" >
<interface>
<field id = "itemContent" type = "node" onChange = "showcontent"/>
</interface>
<script type="text/brightscript" uri="MarkupGridItem.brs" />
<children>
<Poster
id="poster"
loadDisplayMode="scaleToFit"
width="300"
height="300"
loadWidth="300"
loadHeight="300"
translation="[0,0]" >
<Poster
id = "watched"
translation = "[ 250, 20 ]"
width = "30"
height = "30" />
</Poster>
</children>
</component>
The idea is that when the user clicks on a particular item, a video plays. When the video finishes we want the checkmark for the item the user clicked to become visible (based on a roArray to which the watched video id is added).
How can I target the particular item that was clicked in order to make changes just to that one.
I couldn't find a way so all I could do was reload the content of the markup grid. This managed to get the checkmark to appear but as soon as I used jumptoitem to move the focus to the watched item, the checkmark no longer appears.