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: 
dragonfly77
Visitor

Help on Grid Screen Menu

A little help please, im pulling my hair on this, i know its just simple, but ive already spent 4 hours trying to figure it out.

I basically am trying to modify the screen grid style menu that is posted here : http://blog.roku.com/developer/2012/08/09/getting-started-with-brightscript-screen-navigation/

I do get the part where it shows the different rows by these two lines below
   screen.SetContentList(0,GetLunchMenuOptions_Healthy())    
screen.SetContentList(1,GetLunchMenuOptions_Tasty())


and that it calls these two Functions to display the two categories on the screen (ive removed some of the items just for clarity:

Function GetLunchMenuOptions_Healthy() as object
m.options = [
{ Title: "Fruit"
Description: "A Variety of Fresh Fruit"
}
{ Title: "Salad"
Description: "Straight from Local Growers"
]
return m.options
End Function

Function GetLunchMenuOptions_Tasty() as object
m.options = [
{ Title: "American Burger"
Description: "Tasty Burger"
}
{ Title: "Spaghetti"
Description: "Red"
}
]
return m.options
End Function



What i dont get is how to return the specific Title or Description that was chosen from the Grid Menu when the "ShowLunchItemDetails(msg.GetIndex())" is called.
I did a telnet on the Roku and that i can see it only either prints zero(0) as the value of the index if any of the items in the first top row is selected (either Fruits or Salad) and it returns one(1) if either American Burger or Spaghetti is chosen.

How can i return the title of the chosen menu?

   ShowLunchItemDetails( msg.GetIndex() )


Function ShowLunchItemDetails(index as integer) as integer
print "Selected Index: " + Stri(index)
print "Description: " + m.options[index].Description
End Function



Im sorry if this a newbie question.. a little help please..
0 Kudos
1 REPLY 1
RokuMarkn
Visitor

Re: Help on Grid Screen Menu

See http://sdkdocs.roku.com/display/sdkdoc/ ... creenEvent.
GetIndex returns the row, GetData returns the column.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.