jf-roku/components/home/HomeItem.brs
2020-03-07 10:39:11 -05:00

26 lines
775 B
Plaintext

sub init()
end sub
function itemContentChanged() as void
itemData = m.top.itemContent
if itemData = invalid then return
itemText = m.top.findNode("itemText")
itemText.text = itemData.name
itemPoster = m.top.findNode("itemPoster")
if itemData.type = "livetv" then
itemPoster.width = "96"
itemPoster.height = "96"
itemPoster.translation = "[192, 88]"
itemPoster.uri = "pkg:/images/baseline_live_tv_white_48dp.png"
else if itemData.type = "music" then
itemPoster.width = "96"
itemPoster.height = "96"
itemPoster.translation = "[192, 88]"
itemPoster.uri = "pkg:/images/baseline_library_music_white_48dp.png"
else
itemPoster.uri = itemData.imageURL
end if
end function