2022-03-13 00:36:11 +00:00
|
|
|
sub init()
|
|
|
|
m.title = m.top.findNode("title")
|
|
|
|
m.description = m.top.findNode("description")
|
|
|
|
m.selectedIcon = m.top.findNode("selectedIcon")
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub itemContentChanged()
|
|
|
|
m.title.text = m.top.itemContent.title
|
|
|
|
m.description.text = m.top.itemContent.description
|
|
|
|
|
|
|
|
if m.top.itemContent.description = ""
|
|
|
|
m.title.translation = [50, 20]
|
|
|
|
end if
|
|
|
|
|
|
|
|
if m.top.itemContent.selected
|
|
|
|
m.selectedIcon.uri = m.global.constants.icons.check_white
|
|
|
|
else
|
|
|
|
m.selectedIcon.uri = ""
|
|
|
|
end if
|
|
|
|
|
|
|
|
end sub
|
|
|
|
|
|
|
|
'
|
|
|
|
'Scroll description if focused
|
|
|
|
sub focusChanged()
|
|
|
|
|
|
|
|
if m.top.itemHasFocus = true
|
|
|
|
m.description.repeatCount = -1
|
|
|
|
else
|
|
|
|
m.description.repeatCount = 0
|
|
|
|
end if
|
|
|
|
|
2022-05-30 12:57:40 +00:00
|
|
|
end sub
|