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: Creation of New app.

"hclapp_1" wrote:
Scene graph comes under brightscript na ? Am I correct...?

Not at all, just like Adobe Flash does not come under Javascript. Learning JS does not require you use Flash - it can be used with HTML, Node.js etc

Did you read what i said earlier? 
"EnTerr" wrote:
At first blush, focus on using only SDK1 - and none of the SDK2 (the so-called "Roku Scene Graph"). It's hard to tell them apart because the documentation is a mishmash assuming you know already which is which - but if the component name starts with "ro" - use that. If it starts with "roSG" or no "ro" prefix at all - that is RSG and trust me, you don't want that.
At 2nd blush, i maintain my initial guess - RSG is not right for you.
0 Kudos
hclapp_1
Visitor

Re: Creation of New app.

I have read the basics of bright script, if RSG is not useful for me, then whats the purpose of RSG, in which scenario we use RSG. Please explain
0 Kudos
EnTerr
Roku Guru

Re: Creation of New app.

"hclapp_1" wrote:
I have read the basics of bright script, if RSG is not useful for me, then whats the purpose of RSG, in which scenario we use RSG. Please explain

RSG is not a good fit for you and your case.
It's (a) created to solve more complicated problems than yours and (b) requires really experienced developers.
Think a "razor blade" - without the handle, just the blade. 
0 Kudos
hclapp_1
Visitor

Re: Creation of New app.

Hi En terr
  Is this link helps me to read brightscript 
 http://docs.brightsign.biz/display/DOC/Object+Reference
0 Kudos
EnTerr
Roku Guru

Re: Creation of New app.

"hclapp_1" wrote:
Hi En terr
  Is this link helps me to read brightscript 
 http://docs.brightsign.biz/display/DOC/Object+Reference

I don't think so. BrightSign is now a different company from Roku. Common roots (founders, investors) - and they use BrightScript as well - but i believe over the years the code base have drifted signifcantly away. Partly the language - but much more so the objects/components. 
0 Kudos
hclapp_1
Visitor

Re: Creation of New app.

Hi Ent ter,
    Its possible to layout the roscreen or roimagecanvas screens like multiple child divs inside one parent container. Please check below image. I want the layout like this.


Please suggest some ideas. And is any another way to achieve this.
0 Kudos
hclapp_1
Visitor

Re: Creation of New app.

I have create a page using roimagecanvas, for reference please check the attached image. I have few doubts on this. 




using set layer i have created the layer for each objects in the screen.

  • Pink background (Layer 1)

  • Black background(Layer 2)

  • Pink background content is achieved using uriTransfer. Each item is in separate layer like JEFF HAN(layer 3), David Kelley (layer 4) etc.....

  • Black background content achieved through left side list item selection. Based on list selection the content will change.

Doubts are:

  • If my web services data is more than 100 list items, so i need to create separate layer for each list items. is that advisable or any other method to achieve it.

  • How to change Right side content font line-height , apart from system font shall i give any other font? is that possible.
0 Kudos
EnTerr
Roku Guru

Re: Creation of New app.

"hclapp_1" wrote:
Doubts are:
  • If my web services data is more than 100 list items, so i need to create separate layer for each list items. is that advisable or any other method to achieve it.

  • How to change Right side content font line-height , apart from system font shall i give any other font? is that possible.

You won't be showing a hundred list items on screen, just the ones that are visible - a dozen or two. Yes, you have to figure out which ones to show.

TextAttrs Attribute Keys says "Also can use any fonts registered by the roFontRegistry Object and returned by its Get() method". How you can specify size/bold/italic attributes though, i have no idea.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: Creation of New app.

"EnTerr" wrote:

TextAttrs Attribute Keys says "Also can use any fonts registered by the roFontRegistry Object and returned by its Get() method". How you can specify size/bold/italic attributes though, i have no idea.


Shirley, you aren't serious... :roll:
ifFontRegistry Get(family as String, size as Integer, bold as Boolean, italic as Boolean) as String
https://sdkdocs.roku.com/display/sdkdoc ... casBoolean)asString
0 Kudos
EnTerr
Roku Guru

Re: Creation of New app.

"RokuKC" wrote:
Shirley, you aren't serious... :roll:
ifFontRegistry Get(family as String, size as Integer, bold as Boolean, italic as Boolean) as String
https://sdkdocs.roku.com/display/sdkdoc ... casBoolean)asString

Doh! Slowly but Shirley i am turning into a prof. Farnsworth. 8-)

So to re-cap for posterity - to change font's family/size/bold/italic for a text in roImageCanvas, assign the string returned by calling .get(...) on a roFontRegistry - assign to Font of TextAttrs. E.g.
roFonts = createObject("roFontRegistry")
roFonts.register("pkg:/myFont.ttf")
newFontToken = roFonts.get("myFontFamilial", 10, false, true)
canvasItem = {
           text: "Hello ImageCanvas"
           textAttrs: {Color: "#FFCCCCCC", Font: newFontToken}
           targetRect: {x:390, y:357, w:500, h:60}
       }
0 Kudos