2019-05-03 12:48:59 +00:00
|
|
|
sub init()
|
2021-07-09 20:08:32 +00:00
|
|
|
m.top.itemComponentName = "TVListDetails"
|
|
|
|
m.top.content = setData()
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
m.top.vertFocusAnimationStyle = "fixedFocusWrap"
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
m.top.showRowLabel = [false]
|
|
|
|
|
|
|
|
updateSize()
|
|
|
|
|
|
|
|
m.top.setFocus(true)
|
2019-05-03 12:48:59 +00:00
|
|
|
end sub
|
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
sub updateSize()
|
2022-06-09 20:51:04 +00:00
|
|
|
m.top.translation = [450, 180]
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2022-06-09 20:51:04 +00:00
|
|
|
itemWidth = 1360
|
2022-06-11 14:04:53 +00:00
|
|
|
itemHeight = 300
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
m.top.visible = true
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
' Size of the individual rows
|
2022-06-09 20:51:04 +00:00
|
|
|
m.top.itemSize = [itemWidth, itemHeight]
|
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
' Spacing between Rows
|
|
|
|
m.top.itemSpacing = [0, 40]
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
' Size of items in the row
|
|
|
|
m.top.rowItemSize = [itemWidth, itemHeight]
|
|
|
|
' Spacing between items in the row
|
|
|
|
m.top.rowItemSpacing = [20, 0]
|
2020-02-23 04:47:00 +00:00
|
|
|
end sub
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-06-26 10:18:09 +00:00
|
|
|
sub setupRows()
|
2021-07-09 20:08:32 +00:00
|
|
|
updateSize()
|
|
|
|
objects = m.top.objects
|
|
|
|
m.top.numRows = objects.items.count()
|
|
|
|
m.top.content = setData()
|
2021-06-26 10:18:09 +00:00
|
|
|
end sub
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2020-02-23 04:47:00 +00:00
|
|
|
function setData()
|
2021-07-09 20:08:32 +00:00
|
|
|
data = CreateObject("roSGNode", "ContentNode")
|
|
|
|
if m.top.objects = invalid
|
|
|
|
' Return an empty node just to return something; we'll update once we have data
|
|
|
|
return data
|
|
|
|
end if
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
for each item in m.top.objects.items
|
|
|
|
row = data.CreateChild("ContentNode")
|
|
|
|
row.appendChild(item)
|
|
|
|
end for
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2022-04-24 03:49:42 +00:00
|
|
|
m.top.doneLoading = true
|
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
return data
|
2020-02-23 04:47:00 +00:00
|
|
|
end function
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2020-02-23 04:47:00 +00:00
|
|
|
function onKeyEvent(key as string, press as boolean) as boolean
|
2021-07-09 20:08:32 +00:00
|
|
|
if not press then return false
|
2019-05-03 12:48:59 +00:00
|
|
|
|
2021-07-09 20:08:32 +00:00
|
|
|
return false
|
2019-07-23 03:11:13 +00:00
|
|
|
end function
|