function Init() m.titleLabel = m.top.findNode("TitleLabel") m.titleLabelFocused = m.top.findNode("TitleLabelFocused") m.iconPoster = m.top.findNode("IconPoster") m.profileIcon = m.top.findNode("ProfileIcon") end function function OnContentSet() as void content = m.top.itemContent if content = invalid return end if m.titleLabel.text = content.text m.titleLabelFocused.text = content.text isProfile = content.isProfile if isProfile m.iconPoster.visible = false m.profileIcon.visible = true else m.iconPoster.visible = true m.profileIcon.visible = false m.iconPoster.uri = content.icon end if OnListHasFocusChange() end function function OnItemHasFocusChange() as void itemHasFocus = m.top.itemHasFocus m.titleLabelFocused.visible = itemHasFocus m.titleLabel.visible = not itemHasFocus end function function OnListHasFocusChange() listHasFocus = m.top.listHasFocus if not listHasFocus m.titleLabelFocused.visible = false m.titleLabel.visible = false else OnItemHasFocusChange() end if end function