jf-roku/components/config/JFServer.brs

35 lines
752 B
Plaintext
Raw Normal View History

2021-07-09 19:16:43 +00:00
sub init() as void
2021-07-09 10:12:19 +00:00
m.poster = m.top.findNode("poster")
m.name = m.top.findNode("name")
m.baseUrl = m.top.findNode("baseUrl")
m.labels = m.top.findNode("labels")
setTextColor(0)
2021-07-09 19:16:43 +00:00
end sub
2021-07-09 10:12:19 +00:00
2021-07-09 19:16:43 +00:00
sub itemContentChanged() as void
2021-07-09 10:12:19 +00:00
server = m.top.itemContent
m.poster.uri = server.iconUrl
m.name.text = server.name
m.baseUrl.text = server.baseUrl
2021-07-09 19:16:43 +00:00
end sub
2021-07-09 10:12:19 +00:00
2021-07-09 19:16:43 +00:00
sub onFocusPercentChange(event)
2021-07-09 10:12:19 +00:00
setTextColor(event.getData())
2021-07-09 19:16:43 +00:00
end sub
2021-07-09 10:12:19 +00:00
2021-07-09 19:16:43 +00:00
sub setTextColor(percentFocused)
2021-07-09 10:12:19 +00:00
white = "0xffffffff"
black = "0x00000099"
2021-07-09 19:16:43 +00:00
if percentFocused > .4
2021-07-09 10:12:19 +00:00
color = black
else
color = white
end if
children = m.labels.getChildren(-1, 0)
for each child in children
child.color = color
end for
2021-07-09 19:16:43 +00:00
end sub