Created
August 22, 2014 21:03
-
-
Save peterbe/af88056fc47c9caf4680 to your computer and use it in GitHub Desktop.
some brightscript syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'****************************************************** | |
'** Display the home screen and wait for events from | |
'** the screen. The screen will show retreiving while | |
'** we fetch and parse the feeds for the game posters | |
'****************************************************** | |
Function showHomeScreen(screen) As Integer | |
if validateParam(screen, "roPosterScreen", "showHomeScreen") = false return -1 | |
initCategoryList() | |
screen.SetContentList(m.Categories.Kids) | |
screen.SetFocusedListItem(3) | |
screen.Show() | |
while true | |
msg = wait(0, screen.GetMessagePort()) | |
if type(msg) = "roPosterScreenEvent" then | |
print "showHomeScreen | msg = "; msg.GetMessage() " | index = "; msg.GetIndex() | |
if msg.isListFocused() then | |
print "list focused | index = "; msg.GetIndex(); " | category = "; m.curCategory | |
else if msg.isListItemSelected() then | |
print "list item selected | index = "; msg.GetIndex() | |
kid = m.Categories.Kids[msg.GetIndex()] | |
print "Kid=="; kid | |
if kid.type = "special_category" then | |
displaySpecialCategoryScreen() | |
else | |
displayCategoryPosterScreen(kid) | |
end if | |
else if msg.isScreenClosed() then | |
return -1 | |
end if | |
end If | |
end while | |
return 0 | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment