2022-05-14 02:35:50 +00:00
|
|
|
sub init()
|
|
|
|
m.top.itemComponentName = "ListPoster"
|
|
|
|
m.top.rowFocusAnimationStyle = "fixedFocusWrap"
|
|
|
|
m.top.showRowLabel = [false]
|
|
|
|
m.top.showRowCounter = [true]
|
|
|
|
|
2022-05-14 21:14:15 +00:00
|
|
|
getData()
|
2022-05-14 02:35:50 +00:00
|
|
|
updateSize()
|
|
|
|
|
|
|
|
m.top.setfocus(true)
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub updateSize()
|
|
|
|
itemWidth = 200
|
|
|
|
itemHeight = 320 ' width * 1.5 + text
|
|
|
|
|
|
|
|
m.top.visible = true
|
|
|
|
|
|
|
|
' size of the whole row
|
2022-05-14 21:14:15 +00:00
|
|
|
m.top.itemSize = [1700, (itemHeight + 40)]
|
2022-05-14 23:25:17 +00:00
|
|
|
|
2022-05-14 02:35:50 +00:00
|
|
|
' spacing between rows
|
|
|
|
m.top.itemSpacing = [0, 0]
|
|
|
|
|
|
|
|
' size of the item in the row
|
|
|
|
m.top.rowItemSize = [itemWidth, itemHeight]
|
2022-05-14 21:14:15 +00:00
|
|
|
|
2022-05-14 02:35:50 +00:00
|
|
|
' spacing between items in a row
|
2022-05-14 21:14:15 +00:00
|
|
|
m.top.rowItemSpacing = [10, 0]
|
2022-05-14 02:35:50 +00:00
|
|
|
end sub
|
|
|
|
|
|
|
|
function getData()
|
2022-05-14 21:14:15 +00:00
|
|
|
' If we have no album data, return a blank node
|
2022-05-14 02:35:50 +00:00
|
|
|
if m.top.MusicArtistAlbumData = invalid
|
|
|
|
data = CreateObject("roSGNode", "ContentNode")
|
|
|
|
return data
|
|
|
|
end if
|
|
|
|
|
2022-05-14 21:14:15 +00:00
|
|
|
albumData = m.top.MusicArtistAlbumData
|
2022-05-14 02:35:50 +00:00
|
|
|
data = CreateObject("roSGNode", "ContentNode")
|
|
|
|
row = data.CreateChild("ContentNode")
|
2022-05-14 21:14:15 +00:00
|
|
|
|
|
|
|
for each album in albumData.items
|
|
|
|
row.appendChild(album)
|
2022-05-14 02:35:50 +00:00
|
|
|
end for
|
2022-05-14 21:14:15 +00:00
|
|
|
|
2022-05-14 02:35:50 +00:00
|
|
|
m.top.content = data
|
2022-05-14 21:14:15 +00:00
|
|
|
|
2022-05-14 02:35:50 +00:00
|
|
|
return data
|
|
|
|
end function
|