Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
armagedon79
Visitor

roListScreen help

I want to make to text display of content in a vertical list within a single screen roListScreen basic, need demo file to see? Thanks
0 Kudos
2 REPLIES 2
RokuMarkn
Visitor

Re: roListScreen help


function TestList() as Void
content = [
{ Title: "one", ShortDescriptionLine1: "First description" }
{ Title: "two", ShortDescriptionLine1: "Second description" }
{ Title: "three", ShortDescriptionLine1: "Third description" }
{ Title: "four", ShortDescriptionLine1: "Fourth description" }
]
screen = CreateObject("roListScreen")
screen.SetMessagePort(CreateObject("roMessagePort"))
screen.SetContent(content)
screen.Show()
while true
msg = Wait(0, screen.GetMessagePort())
if type(msg) = "roListScreenEvent") then
if msg.IsScreenClosed() then return
if msg.IsListItemFocused() then print "focus " msg.GetIndex()
if msg.IsRemoteKeyPressed() then print "key " msg.GetIndex()
if msg.IsListItemSelected() then print "select " msg.GetIndex()
endif
end while
end function
0 Kudos
armagedon79
Visitor

Re: roListScreen help

where put this code in simpleplayer
0 Kudos