"RokuChris" wrote:
"bobbydharrell" wrote:
I dont mind Hard coding the menus to make things easier .. so if some one could just tell me how to add the filter list menu above the poster menus and it call the different poster menus that would be great! Thanks
Setup a filter bar with SetListNames(), then handle the focus of a filter bar item within your event loop by checking for isListFocused(). These are both documented in the roPosterScreen section of the Component Reference.
Thanks RokuChris, I am going through that pdf now.
Here is what I have . I am having trouble figuring out what to heck and where to put the isListFocused()
' HDPosterUrl As String - URI to HD Icon Image
' SDPosterUrl As String - URI to SD Icon Image
' ShortDescriptionLine1 As String - the text name of the menu item
' ShortDescriptionLine1 As String - more text
' Type as String - Old or New
'
' ******************************************************
function uitkPreShowPosterMenu(breadA=invalid, breadB=invalid) As Object
port=CreateObject("roMessagePort")
screen = CreateObject("roPosterScreen")
screen.SetMessagePort(port)
screen.SetListNames(["Old Testement", "New Testement"])
if breadA<>invalid and breadB<>invalid then
screen.SetBreadcrumbText(breadA, breadB)
end if
'screen.SetListStyle("flat-category")
screen.SetListStyle( "arced-landscape" )
screen.SetListDisplayMode( "scale-to-fit" )
screen.Show()
return screen
end function
function uitkDoPosterMenu(posterdata, screen, onselect_callback=invalid) As Integer
if type(screen)<>"roPosterScreen" then
print "illegal type/value for screen passed to uitkDoPosterMenu()"
return -1
end if
screen.SetContentList(posterdata)
while true
msg = wait(0, screen.GetMessagePort())
'print "uitkDoPosterMenu | msg type = ";type(msg)
if type(msg) = "roPosterScreenEvent" then
' print "Event.GetType()=";msg.GetType(); " Event.GetMessage()="; msg.GetMessage()
if msg.isListItemSelected() then
if onselect_callback<>invalid then
selecttype = onselect_callback[0]
if selecttype=0 then
this = onselect_callback[1]
this[onselect_callback[msg.GetIndex()+2]]()
else if selecttype=1 then
userdata1=onselect_callback[1]
userdata2=onselect_callback[2]
f=onselect_callback[3]
f(userdata1, userdata2, msg.GetIndex())
end if
else
return msg.GetIndex()
end if
else if msg.isScreenClosed() then
return -1
end if
end If
end while
end function
and this is what I have in my list:
mainmenudata = [
{ShortDescriptionLine1:"Story01", ShortDescriptionLine2:"Stuff 1", HDPosterUrl:"HDimgURL1", SDPosterUrl:"SDimgURL1", Type:"old"}
{ShortDescriptionLine1:"Story02", ShortDescriptionLine2:"Stuff 2", HDPosterUrl:"HDimgURL2", SDPosterUrl:"SDimgURL2", Type:"new"}
{ShortDescriptionLine1:"Story03", ShortDescriptionLine2:"Stuff 3", HDPosterUrl:"HDimgURL3", SDPosterUrl:"SDimgURL3", Type:"old"}
{ShortDescriptionLine1:"Story04", ShortDescriptionLine2:"Stuff 4", HDPosterUrl:"HDimgURL4", SDPosterUrl:"SDimgURL4", Type:"new"}]
onselect = [0, rss, "Story01", "Story02","Story03", "Story04"]
I am wanting to filter the list by type, old and new
Thanks