- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to observe two rectangles in a layout group to see what one got clicked?
Hello guys!
I am extremely new to Roku development and I am trying to create a custom button (using a custom component) that extends rectangle. I have accomplished this and have also been able to manage the focusing by change the color of the focused rectangle. But I am now stuck on trying to manage the selection.
For example, when a rectangle has focus and the ok key is pressed, I want to do something, but I am not able to wrap my head around observing for when a rectangle is clicked on like we would normally do with the buttonGroup buttons. So what will be the best way or the way to perform an action on the focused rectangle?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Is there a way to observe two rectangles in a layout group to see what one got clicked?
If I'm following you, you should be able to catch the button press and then check to see if the rectangle has focus.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Is there a way to observe two rectangles in a layout group to see what one got clicked?
Thanks for the suggestion. I was able to use the "OK" key to perform an action if the button/rectangle in focus has the same ID as the string I am checking it against.
I wish Roku made it easy for us to customize their button.