Since the videoplayer example is pretty much completely XML data driven, you would need to add or hijack an XML tag (and a line to parse it) to define a search item, probably in categories.xml - for example <category title="Search"
Then you would modify the brightscript code to trigger a different behavior from the norm when that item is selected, for example to show a search screen and of course you will need to create a search function that will run the search.
For example something like the modified ShowHomeScreen function below (which looks for the word "Search" in the title of the currently selected item and if it finds it, should launch a search screen function):
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
if m.categories.kids[msg.getindex()].title="Search" then
ShowMySearchScreen()
else
print "list item selected | index = "; msg.GetIndex()
kid = m.Categories.Kids[msg.GetIndex()]
if kid.type = "special_category" then
displaySpecialCategoryScreen()
else
displayCategoryPosterScreen(kid)
end if
end if
else if msg.isScreenClosed() then
return -1
end if
end If
end while
return 0
End Function