Forum Discussion

bbrouse's avatar
bbrouse
Visitor
10 years ago

Creating custom focus indicators for Scene Graph lists

We're trying to create custom focus indicators for some scene graph components and are having trouble getting them right. Indicators either sit inside the list item, or there is padding around the image, we seem to be hitting a wall trying to get an image to sit perfectly around a list item.

Does anyone (or Roku) have an example focus indicator or at least instructions on how they should be created?

2 Replies

  • Hi,
    You can have a rectangle as a part of list item which is having the width and height, slightly more than that of the text item(use boundingRect on the label node to get the label node properties).
    Only when the focus comes comes to a list item, this rectangle can be made visible.

    Media Dev
  • Hello,

    We have done this for our project. You need to create a "9-Patch" png image that is transparent in the middle. One important thing when working with these images is that they must be named with a '.9.png' at the end in order for Roku to understand it's a special image.

    If you need further help, feel free to contact me privately.