Beginning Development

I’m looking into creating a Roku channel, and have a few questions I hope someone can answer.

Roku documentation mentions things called components, however these components appear to be more like templates. In other words, I just supply the appropriate data and call the appropriate methods/functions, and the template/component takes care of the actual rendering of the view.

Is this correct?

Is there an way to create customized templates/components?

“stevelaw18” wrote:
I’m looking into creating a Roku channel, and have a few questions I hope someone can answer.

Roku documentation mentions things called components, however these components appear to be more like templates. In other words, I just supply the appropriate data and call the appropriate methods/functions, and the template/component takes care of the actual rendering of the view.

Is this correct?

Is there an way to create customized templates/components?

Generally speaking, this is correct. However, you can create and render your own graphic displays with the roScreen and roImageCanvas components.

  • Joel

“jbrave” wrote:

“stevelaw18” wrote:
I’m looking into creating a Roku channel, and have a few questions I hope someone can answer.

Roku documentation mentions things called components, however these components appear to be more like templates. In other words, I just supply the appropriate data and call the appropriate methods/functions, and the template/component takes care of the actual rendering of the view.

Is this correct?

Is there an way to create customized templates/components?

Generally speaking, this is correct. However, you can create and render your own graphic displays with the roScreen and roImageCanvas components.

  • Joel
    Thanks for the response.

When you say create create a graphic display, is it possible to control focus of any sorts within that graphical display, or is it simply a non-focusable graphic?

Since both roScreen and roImageCanvas are relatively free form - you will have to generate the focus effect yourself - for example, you could draw a box around the item you want to represent as “selected”.

If you want your screen to behave like a standard roku component, then read up on anonymous functions, there is some documentation in the brightscript manual, and a few good examples in the forum here. That way you can do something like:

MyGui=newgui()
Mygui.drawMyCustomUI()
Mygui.selectelement(1)

And any other methods you want to invent.

-Joel