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: 
xoceunder
Roku Guru

Help to create a poster menu

Helps to create a poster menu to be able to select with the new functions of CreateScene
0 Kudos
4 REPLIES 4
destruk
Binge Watcher

Re: Help to create a poster menu

It would be a good start to download the sample channel here:
https://github.com/rokudev/videoplayer-channel

The green button "clone or download"
If you want to convert poster screens to scenegraph.
0 Kudos
xoceunder
Roku Guru

Re: Help to create a poster menu

I had seen that one but my script works like this

' ********************************************************************
' ********************************************************************
' **  Creador APP - XoceUnder
' **
' ********************************************************************
' ********************************************************************


Function Main() as void

    InitTheme()

    print "Starting up "
    m.menuFunctions = [
        showMovies,
        showSeries,
showEvents,
showSport,
showSettings
    ]

screen = CreateObject("roPosterScreen")
    port = CreateObject("roMessagePort")
    screen.SetMessagePort(port)
    screen.SetListStyle("arced-square")
    contentList = InitContent()
    screen.SetContentList(contentList)
screen.SetFocusedListItem(3)
    screen.show()

    while (true)
        msg = wait(0, port)

        if (type(msg) = "roPosterScreenEvent")
            if (msg.isListItemFocused())

            else if (msg.isListItemSelected())
   print msg.GetIndex()
                m.menuFunctions[msg.GetIndex()]()
            else if msg.isRemoteKeyPressed() then
                print "Remote key pressed"
            else if msg.isScreenClosed()
                print "Shutting down"
   exit while
            endif
        endif

    end while

End Function

Function InitContent() as object
     list = []
        list.Push({
            Title: tr("Movies"),
            ID: "2",           
            ShortDescriptionLine1: tr("Movies"),
SDPosterUrl: "pkg:/images/menu/Movie.png",
HDPosterUrl: "pkg:/images/menu/Movie.png", 
        })
        list.Push({
            Title: tr("Tv Series"),
            ID: "3",            
            ShortDescriptionLine1: tr("Tv Series"),
SDPosterUrl: "pkg:/images/menu/Series.png",
HDPosterUrl: "pkg:/images/menu/Series.png",
        })
        list.Push({
            Title: tr("Eventos"),
            ID: "5",           
            ShortDescriptionLine1: tr("Eventos"),
SDPosterUrl: "pkg:/images/menu/Eventos.png",
HDPosterUrl: "pkg:/images/menu/Eventos.png",
        })
        list.Push({
            Title: tr("Sport"),

            ID: "8",          
            ShortDescriptionLine1: tr("Sport"),
SDPosterUrl: "pkg:/images/menu/Adults.png",
HDPosterUrl: "pkg:/images/menu/Adults.png",

        })
        list.Push({
            Title: tr("Settings"),

            ID: "9",            
            ShortDescriptionLine1: tr("Settings"),
SDPosterUrl: "pkg:/images/menu/Settings.png",
HDPosterUrl: "pkg:/images/menu/Settings.png",

        })
    
    return list
End Function

0 Kudos
destruk
Binge Watcher

Re: Help to create a poster menu

Your script isn't using scenegraph -- for that version you'll need the older SDK packages.
Click on "Download Snapshot" to get the non-scenegraph sample apps.

https://sourceforge.net/p/rokusdkexampl ... ree/trunk/

Mixing SDK3.0 code with the new scenegraph code hasn't worked out very well for me - it's better to go all or nothing.
0 Kudos
xoceunder
Roku Guru

Re: Help to create a poster menu

I want to be able to change to scenegraph
0 Kudos