I'm seeing an issue and hoping for some help or guidance for handling it.
The problem can be observed on Roku 3 (and at least one model of Roku TV, probably many other older models)
Get the LabelExample.zip from the tutorial docs here
To fully demonstrate the problem, I changed the contents of labelscene.xml to this:
<?xml version = "1.0" encoding = "utf-8" ?>
<!--********** Copyright 2016 Roku Corp. All Rights Reserved. **********-->
<component name = "LabelExample" extends = "Scene" >
<script type = "text/brightscript" >
m.top.backgroundURI = "pkg:/images/rsgde_bg_hd.jpg"
example = m.top.findNode("exampleLabel")
leftBorder = m.top.findNode("leftBorder")
rightBorder = m.top.findNode("rightBorder")
examplerect = example.boundingRect()
centerx = (1280 - examplerect.width) / 2
centery = (720 - examplerect.height) / 2
example.translation = [ centerx, centery ]
? " XXXXXXXXXXXXXXXXXXXXXXXXX examplerect.width: "; examplerect.width
borderY = centery + leftBorder.height/2
leftBorder.translation = [centerx-leftBorder.width, borderY]
rightBorder.translation = [centerx+examplerect.width, borderY]
id = "exampleLabel"
width = "0"
height = "44"
font = "font:MediumBoldSystemFont"
text = "All the Best Videos ... All the Time! All the Best Videos"
horizAlign = "center"
vertAlign = "center" />
Now with this change alone, everything is fine (the pink rectangles line up exactly on the text boundaries) because the default is to ui resolution of HD. Next, modify the manifest's last line of text to this:
Note that the existing format in the manifest is incorrect and retaining the quotation marks makes it do NOTHING.
Now observe on the screen with Roku3 that the right border rectangle is overlapping the words. The calculated examplerect width is wrong for this device and screen resolution. I'm trying to do some precise layouts based on text widths and this is making it not possible. with Roku Ultra, everything works perfectly. This is a mystery I would love to solve soon!
thank you very much in advance,