Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

Re: roListScreen and roImageCanvas

Can you live with http://sdkdocs.roku.com/display/sdkdoc/roMessageDialog for that?
It dims lower screen and shows modal dialog (pop-up menu really).

On the rest - no, i don't think so. Most components i think are single-purpose ones, at least the ones i have used - they were not designed to be flexible. You should be able to "roll-your-own cigarette" using roImageCanvas though. Disclaimer: I roast my own coffee beans.
0 Kudos
btpoole
Channel Surfer

Re: roListScreen and roImageCanvas

Thanks for the suggestion. I have looked into this but not sure it will work. I guess I should be asking the question, how can I set the Text element of roImageCanvas to equal an array? Once the canvas is created I set the attributes for the text as follows:

Items = [
{
Text:myarray
TextAttrs:{Color:"#FFCCCCCC", Font:"small",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:500,y:60,w:200,h:60}
}
]

I would like the Text to show the list which is stored in array. I can set the Text = "Whatever I want" and it displays correctly so I know I have all on correct layers etc. But if I set Text=myarray, nothing appears even though I have check myarray in previous areas with a print statement that shows myarray is populated.
Thanks again
0 Kudos
RokuMarkn
Visitor

Re: roListScreen and roImageCanvas

The text element must be a string, not an array. If you want to print a list of items you have in an array, you should concatenate them into one string and set the text element to that.

--Mark
0 Kudos
btpoole
Channel Surfer

Re: roListScreen and roImageCanvas

Will this create a vertical selectable list? I would think this would be one long string. Am I missing something.
Thanks
0 Kudos
btpoole
Channel Surfer

Re: roListScreen and roImageCanvas

Well, I have realized something. I was able to use a while statement to assign the array dim to the text of the roImageCanvas, but the only one that shows is the last one. Realized that each Item on the canvas is an entity to itself and the text element holds only one value at a time. In order to create a complete list an Item would have to be created for each text dim I would like to display. This seems a waste of time. Is there no way to create a selectable vertical list in a particular place on a canvas?
0 Kudos
EnTerr
Roku Guru

Re: roListScreen and roImageCanvas

"btpoole" wrote:
Realized that each Item on the canvas is an entity to itself and the text element holds only one value at a time. In order to create a complete list an Item would have to be created for each text dim I would like to display.
Exactly! You got it.

This seems a waste of time. Is there no way to create a selectable vertical list in a particular place on a canvas?
Nah, you expect too much from it. Besides, you need to keep close tabs on each item's location/rectangle so that you can position the highlight bar there:
myMenuLayer = [
{ url: "something:/something/dark.side", targetRect: {x: 390, y: 357, w: 500, h: 60} } 'this is the selection bar
{ text: "menu item 1", targetRect: {x: 390, y: 357, w: 500, h: 60} } 'each targetRect will come handy to move the selection
...
{ text: "menu item N", targetRect: { ... } }
]
0 Kudos
btpoole
Channel Surfer

Re: roListScreen and roImageCanvas

I know what I am attempting is possible, there is a roku channel for wow tv shown on youtube with the idea of a smaller screen on one side with channel list. How is this being done?
0 Kudos
TheEndless
Channel Surfer

Re: roListScreen and roImageCanvas

"btpoole" wrote:
I know what I am attempting is possible, there is a roku channel for wow tv shown on youtube with the idea of a smaller screen on one side with channel list. How is this being done?

I haven't seen the video or channel you reference, but the only way to accomplish this is either with roImageCanvas or roScreen. They are both blank slates, though (with the exception of being able to add buttons to the bottom of the image canvas, similar to an roParagraphScreen), so you have to write all of the code to draw the screen and respond to user interaction yourself. It'll require you to invest quite a bit of time into it, but there's no magic to it. You just have to do it yourself. Take a look at the custom UI part of this example: http://blog.roku.com/developer/2012/10/ ... eo-player/
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
btpoole
Channel Surfer

Re: roListScreen and roImageCanvas

Thank you, looking at the code this looks like what I am attempting.
Thanks again to all
0 Kudos
destruk
Streaming Star

Re: roListScreen and roImageCanvas

Why wouldn't you be able to concatenate the lines with chr(13) or chr(10) or /r/n and then use that to display the entire combined entity? That's how I'd do it anyway.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.