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