add quickplay support to search results

This commit is contained in:
Charles Ewert 2023-10-28 22:36:35 -04:00
parent dded75f307
commit 8c0fc20ece
2 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,12 @@ function onKeyEvent(key as string, press as boolean) as boolean
else if key = "right"
m.searchSelect.setFocus(true)
return true
else if key = "play"
print "play was pressed from search results"
if m.searchSelect.rowItemFocused <> invalid
m.top.quickPlayNode = m.searchSelect.content.getChild(m.searchSelect.rowItemFocused[0]).getChild(m.searchSelect.rowItemFocused[1])
return true
end if
end if
return false

View File

@ -855,6 +855,7 @@ end function
function CreateSearchPage()
' Search + Results Page
group = CreateObject("roSGNode", "searchResults")
group.observeField("quickPlayNode", m.port)
options = group.findNode("searchSelect")
options.observeField("itemSelected", m.port)