Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
armagedon79
Level 7

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
RokuMarkn
Level 7

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
Level 7

Re: roListScreen help

where put this code in simpleplayer
0 Kudos