I am in the process of making a Roku channel. The idea is to have a full screen player going, if the user presses a particular button on remote, a small pop up menu will display in a corner of the screen with a list of available channels. I have all working with the following exception: I can't figure out how to populate the area where the menu displays. Currently I have a transparent roImageCanvas on layer 1, the menu box is drawn on layer 2. The problem is that roImageCanvas allows for a text element but only one Item. So if I have a list of 10 channels, I would have to create 10 items on the canvas. The roImageCanvas does not accept arrays. So there is no way to create the pop menu on the fly if the number of channels changes. The number of items on the canvas has to be hard coded as far as I can tell. Ideally the roListScreen is what I would like to pop up but from what I understand all screens are full screen all the time. Does anybody know of a way to populate the targetbox on the canvas or create a screen that is resizable? Thanks for any suggestions
Asked
Active
Viewed 344 times
0
-
I have coded a roku channel for my company and found the roImageCanvas to be less than satisfactory for creating a rich user experience. I solved this by using the [roScreen](http://sdkdocs.roku.com/display/sdkdoc/roScreen) and [roCompositor](http://sdkdocs.roku.com/display/sdkdoc/roCompositor) We are a content streaming service and using the aforementioned, I have a system that looks and feels alot like the Netflix and YouTube apps which are some of the best custom Roku channels out there. – Lord Sidious Mar 16 '15 at 16:08
1 Answers
1
A roImageCanvas
layer is an array. There is no technical limitation to you adding >1 elements to a layer and so you can add as many separate text items as you want (not hard-coded!). It seems to me best to have 1 text element per 1 menu item, so you can use their bounding rectangles (or text color) to highlight the choice

Nas Banov
- 28,347
- 6
- 48
- 67
-
I am able to create the list in the correct location but not sure how to determine if any particular item in the list is selected. I have come across some code that checks the item location (in the list versus a counter) and if true changes the text color. From what I can tell it cycles thru every item in the list and redraws each time. This seems cumbersome, redrawing list with each click of remote. Thought there might be an easier way to scroll thru a list and make a selection. – B Todd Poole Oct 24 '14 at 12:09
-
@BToddPoole, re-drawing is left to roImageCanvas but you will have to change the color of particular items in the list when selection moves. There is no need to reconstruct the whole list, just to remove highlight color from previous item and set it to the new item – Nas Banov Oct 25 '14 at 04:14