2021-06-26 10:18:09 +00:00
|
|
|
sub init()
|
2020-10-24 13:56:33 +00:00
|
|
|
m.title = m.top.findNode("title")
|
|
|
|
m.description = m.top.findNode("description")
|
|
|
|
m.selectedIcon = m.top.findNode("selectedIcon")
|
2021-06-26 10:18:09 +00:00
|
|
|
end sub
|
2020-10-24 13:56:33 +00:00
|
|
|
|
2021-06-26 10:18:09 +00:00
|
|
|
sub itemContentChanged()
|
2020-10-24 13:56:33 +00:00
|
|
|
m.title.text = m.top.itemContent.title
|
|
|
|
m.description.text = m.top.itemContent.description
|
|
|
|
|
2021-06-26 13:52:16 +00:00
|
|
|
if m.top.itemContent.description = ""
|
2020-10-24 13:56:33 +00:00
|
|
|
m.title.translation = [50, 20]
|
|
|
|
end if
|
|
|
|
|
2021-06-26 13:52:16 +00:00
|
|
|
if m.top.itemContent.selected
|
2020-10-24 13:56:33 +00:00
|
|
|
m.selectedIcon.uri = m.global.constants.icons.check_white
|
|
|
|
else
|
|
|
|
m.selectedIcon.uri = ""
|
|
|
|
end if
|
|
|
|
|
2021-06-26 10:18:09 +00:00
|
|
|
end sub
|
2020-10-24 13:56:33 +00:00
|
|
|
|
|
|
|
'
|
|
|
|
'Scroll description if focused
|
|
|
|
sub focusChanged()
|
|
|
|
|
2021-06-26 13:52:16 +00:00
|
|
|
if m.top.itemHasFocus = true
|
2021-07-09 20:08:32 +00:00
|
|
|
m.description.repeatCount = -1
|
2020-10-24 13:56:33 +00:00
|
|
|
else
|
2021-07-09 20:08:32 +00:00
|
|
|
m.description.repeatCount = 0
|
2020-10-24 13:56:33 +00:00
|
|
|
end if
|
2021-07-09 20:08:32 +00:00
|
|
|
|
2022-05-30 12:57:40 +00:00
|
|
|
end sub
|