jf-roku/components/tvshows/TVSeasonRow.brs

49 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-05-03 12:48:59 +00:00
sub init()
m.top.itemComponentName = "ListPoster"
m.top.content = getData()
2020-11-29 04:02:19 +00:00
m.top.rowFocusAnimationStyle = "fixedFocusWrap"
2019-05-03 12:48:59 +00:00
m.top.showRowLabel = [false]
m.top.showRowCounter = [true]
m.top.rowLabelOffset = [0, 0]
2019-05-03 12:48:59 +00:00
updateSize()
m.top.setfocus(true)
end sub
sub updateSize()
itemWidth = 200
itemHeight = 320 ' width * 1.5 + text
2019-05-03 12:48:59 +00:00
m.top.visible = true
' size of the whole row
m.top.itemSize = [1800, (itemHeight+40)]
2019-05-03 12:48:59 +00:00
' spacing between rows
2021-07-09 20:08:32 +00:00
m.top.itemSpacing = [0, 0]
2019-05-03 12:48:59 +00:00
' size of the item in the row
m.top.rowItemSize = [itemWidth, itemHeight ]
2019-05-03 12:48:59 +00:00
' spacing between items in a row
2021-07-09 20:08:32 +00:00
m.top.rowItemSpacing = [0, 0]
2019-05-03 12:48:59 +00:00
end sub
function getData()
if m.top.TVSeasonData = invalid
2019-05-03 12:48:59 +00:00
data = CreateObject("roSGNode", "ContentNode")
return data
end if
seasonData = m.top.TVSeasonData
data = CreateObject("roSGNode", "ContentNode")
row = data.CreateChild("ContentNode")
row.title = "Seasons"
for each item in seasonData.items
row.appendChild(item)
end for
m.top.content = data
return data
end function