From 8c0fc20eced8fa244e865c4820bf1aa3f49eb387 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sat, 28 Oct 2023 22:36:35 -0400 Subject: [PATCH] add quickplay support to search results --- components/search/SearchResults.brs | 6 ++++++ source/ShowScenes.brs | 1 + 2 files changed, 7 insertions(+) diff --git a/components/search/SearchResults.brs b/components/search/SearchResults.brs index 8427232d..f8f18e7b 100644 --- a/components/search/SearchResults.brs +++ b/components/search/SearchResults.brs @@ -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 diff --git a/source/ShowScenes.brs b/source/ShowScenes.brs index ebac0c58..e8664378 100644 --- a/source/ShowScenes.brs +++ b/source/ShowScenes.brs @@ -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)