This is probably a dumb question but I am really not sure if I understand. Is it possible to have roListScreen with a roImageCanvas at the same time? I have a roListScreen and would like to add a small player to the right side of the list, kinda of like a preview screen. I think I can create the roImageCanvas and FramedScreen but before I spend alot of timing trying to put it together wanted to make sure they will work together.
Thanks
I don’t know, but one thing I would think would get tricky is where you forward the events. Like, the list screen gets events as ‘roListScreenEvent’, I believe. So if you had the canvas on the upper layer… how would you get the events to the list screen when you needed them (I ask rhetorically, because I don’t know either)?
Thank you for the input, and you are correct I attempted to put together something and having trouble with such.
Only the top screen on the screen stack is active. That’s the only screen that can accept input. So layering an ImageCanvas on a ListScreen will make the ListScreen dormant, even if part of it shows through the transparency.
–Mark
“RokuMarkn” wrote:
Only the top screen on the screen stack is active. That’s the only screen that can accept input. So layering an ImageCanvas on a ListScreen will make the ListScreen dormant, even if part of it shows through the transparency.
What if roImageCanvas handles the input events and uses setFocusedListItem() to manipulate the roListScreen underneath - will that do?
Naturally there will be no roListScreenEvents but if list-screen can be trusted to re-draw itself according to changes of focus, this contraption may work?!
I’m not really sure. I don’t think the ListScreen will redraw if it’s not the top screen, but I’m not sure about that.
–Mark
“EnTerr” wrote:
“RokuMarkn” wrote:
Only the top screen on the screen stack is active. That’s the only screen that can accept input. So layering an ImageCanvas on a ListScreen will make the ListScreen dormant, even if part of it shows through the transparency.
What if roImageCanvas handles the input events and uses setFocusedListItem() to manipulate the roListScreen underneath - will that do?Naturally there will be no roListScreenEvents but if list-screen can be trusted to re-draw itself according to changes of focus, this contraption may work?!
Last time I tried that, the answer was no. Only the top-most screen updates. You could potentially close and re-open the canvas to force an update to the list screen, but I suspect that would cause a nasty flicker.
How is the Roku My Channels screen created? It looks like a roListScreen on the left with the menu options but there are multiple channel icons on the right.
“btpoole” wrote:
How is the Roku My Channels screen created? It looks like a roListScreen on the left with the menu options but there are multiple channel icons on the right.
The device home screen is not built with BrightScript
Can a roListScreen be target to a particular place on a canvas or is it always going to be the same size and located full screen? I understand the top most layer gets focus. What I am trying to accomplish is being able to have a pop up menu in one corner of the screen. I have the player below and a layer that comes up in the corner displaying my border of the pop up menu, in the target area of the pop menu border I can even get text to display on a layer above the border. All this works as desired. What I would like to have come up instead of just text I assign to the location is a list that comes from an array. Ideally this would be a roListScreen where the list is selectable and events would occur after the selection. I am fairly sure I can work thru the event to pass the info once a selection is made, I am just having trouble on how to get the list in the desired location.
Thanks for all the input.
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.
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
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
Will this create a vertical selectable list? I would think this would be one long string. Am I missing something.
Thanks
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?
“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: { ... } }
]
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?
“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/
Thank you, looking at the code this looks like what I am attempting.
Thanks again to all
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.
