The Endless supplied a link to an example for creating a selectable list but this leads to another questions. According to the example, each time the remote button is clicked, the code cycles thru each item in the list checking a value which in turn changes the color of the text depending on the value returned. It then pushes the list back to the canvas for show. My question is, doesn't this seem cumbersome to redraw the list each time? I have my channel following this code pretty much now but seems like there should be an easier way other than having to push the entire list each time. The code from the example looks like the following:
if m.drawtext
textArr = m.create_playlist_text()
yTxt = 100
color = "#00000000"
index = 0
for each str in textArr
if index = m.playing
textColor = "#00ff00"
else
textColor = "#dddddd"
endif
list.Push({
Text: str
TextAttrs: {color: textColor, font: "medium"}
TargetRect: {x:200, y:yTxt, w: 500, h: 100}
})
yTxt = yTxt + 100
index = index + 1
end for
else
color = "#00000000"
list.Push({
Text: ""
TextAttrs: {font: "medium"}
TargetRect: {x:100, y:600, w: 300, h: 100}
})
endif