jf-roku/source/HelperUtils.brs

41 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-03-10 05:28:28 +00:00
' "Q" stands for "Question mark" since nodeEvent? wasn't acceptable
' Probably needs a better name, but unique for now
function nodeEventQ(msg, field) as boolean
return type(msg) = "roSGNodeEvent" and msg.getField() = field
end function
2019-03-10 05:28:28 +00:00
function getMsgRowTarget(msg) as object
node = msg.getRoSGNode()
coords = node.rowItemSelected
target = node.content.getChild(coords[0]).getChild(coords[1])
return target
2019-03-10 05:28:28 +00:00
end function
sub themeScene(scene)
2019-03-13 02:09:17 +00:00
dimensions = scene.currentDesignResolution
2019-03-10 05:28:28 +00:00
scene.backgroundColor = "#101010"
scene.backgroundURI = ""
2019-03-13 02:09:17 +00:00
footer_background = scene.findNode("footerBackdrop")
if footer_background <> invalid
footer_background.color = scene.backgroundColor
footer_background.width = dimensions.width
2019-03-14 17:11:05 +00:00
height = footer_background.height
if height = invalid or height = 0 then height = 115
footer_background.height = height
footer_background.translation = [0, dimensions.height - height]
2019-03-13 02:09:17 +00:00
end if
overhang = scene.findNode("overhang")
if overhang <> invalid
overhang.logoUri = "pkg:/images/logo.png"
end if
end sub
2019-03-14 03:01:05 +00:00
function leftPad(base as string, fill as string, length as integer) as string
while len(base) < length
base = fill + base
end while
return base
end function