babuhari123
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2012
02:31 AM
how to handle Remote keys left/right in poster screen
Hi,
Friend one small dout can we handle Remote keys left/right buttons in roposterscreen. if possible tell me how to do it
with one small example
please help me
Thanks in advance
Friend one small dout can we handle Remote keys left/right buttons in roposterscreen. if possible tell me how to do it
with one small example
please help me
Thanks in advance
5 REPLIES 5

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2012
09:14 AM
Re: how to handle Remote keys left/right in poster screen
Handle them for what, specifically? They are not exposed to BrightScript on the poster screen, because they're used internally to provide navigation. You can listen for the isListFocused() and isListItemFocused() events to find out when the selection is changed, if that's your goal.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Trevor
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2012
12:39 PM
Re: how to handle Remote keys left/right in poster screen
"TheEndless" wrote:
You can listen for the isListFocused() and isListItemFocused() events to find out when the selection is changed, if that's your goal.
Just watch the index when you listen for those and you can deduce the movement direction the user is going on the list, so you'll know what key press, left or right, the roPosterScreen just processed.
*** Trevor Anderson - bloggingwordpress.com - moviemavericks.com ***
babuhari123
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2012
11:06 PM
Re: how to handle Remote keys left/right in poster screen
hai friends i can listen when itemlistfocused()
but task is when the last index is chnaged in listitemfocused() i want to display another few more data in roposterscreen
but it going again first item list
can any one tell me please.....................
but task is when the last index is chnaged in listitemfocused() i want to display another few more data in roposterscreen
but it going again first item list
can any one tell me please.....................
Trevor
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2012
12:38 AM
Re: how to handle Remote keys left/right in poster screen
This isn't fully functioning code, just an example which I haven't tested. You may need to do a little more to get the poster screen to update after setting the new content list, I'm not sure, but it would go something like this:
The real hack to do here is add a special list item at the very end of the list that says "Next" or something similar with a similar graphic, then just check to see if the msg.GetIndex() is equal to the list.Count() - 1 which means the user has set focus to the last list item and then load the new list content. That way it doesn't move back to the first list item before loading the next content list, and it appears more natural to the end user. The other thing might be to load the new content list when the user selects the last "Next" list item instead of just setting focus there (which could be a little jarring and unexpected), that would be more inline with how the rest of the Roku interface behaves.
port = CreateObject("roMessagePort")
poster = CreateObject("roPosterScreen")
poster.SetMessagePort(port)
poster.SetContentList(list)
poster.SetFocusedListItem(0)
poster.Show()
LastIndex = 0
ListCount = list.Count() - 1
While True
msg = wait(0, port)
If msg.isScreenClosed() Then
return -1
ElseIf msg.isListItemFocused()
If msg.GetIndex = 0 And LastIndex = ListCount Then
poster.SetContentList(newlist)
poster.SetFocusedListItem(0)
ListCount = newlist.Count() - 1
LastIndex = 0
Else
LastIndex = msg.GetIndex()
End If
End If
End While
The real hack to do here is add a special list item at the very end of the list that says "Next" or something similar with a similar graphic, then just check to see if the msg.GetIndex() is equal to the list.Count() - 1 which means the user has set focus to the last list item and then load the new list content. That way it doesn't move back to the first list item before loading the next content list, and it appears more natural to the end user. The other thing might be to load the new content list when the user selects the last "Next" list item instead of just setting focus there (which could be a little jarring and unexpected), that would be more inline with how the rest of the Roku interface behaves.
*** Trevor Anderson - bloggingwordpress.com - moviemavericks.com ***
babuhari123
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2012
04:05 AM
Re: how to handle Remote keys left/right in poster screen
thanks for reply i will try similarly with example
thanq once again
thanq once again