From 53ef1e5be7c8e0427189eed2861a4535aeddc3a5 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 15 Jun 2020 22:55:47 +0200 Subject: [PATCH] Added navigation sounds to left and right triggers. Also added left and right trigger navigation to grid view, to jump to the first and last game of the gamelist. --- es-app/src/views/gamelist/GridGameListView.cpp | 10 ++++++++++ es-core/src/components/IList.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index acb04d5c6..d93c774e5 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -187,6 +187,16 @@ bool GridGameListView::input(InputConfig* config, Input input) (config->isMappedLike("down", input)) )) NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); + if (input.value != 0 && config->isMappedLike("righttrigger", input)) { + NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); + mGrid.setCursor(mGrid.getLast()); + } + + if (input.value != 0 && config->isMappedLike("lefttrigger", input)) { + NavigationSounds::getInstance()->playThemeNavigationSound(SCROLLSOUND); + mGrid.setCursor(mGrid.getFirst()); + } + if (config->isMappedLike("left", input) || config->isMappedLike("right", input)) return GuiComponent::input(config, input); diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index 4d1699886..4a1b2424b 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -202,6 +202,7 @@ protected: { mCursor = 0; onCursorChanged(CURSOR_STOPPED); + onScroll(); return true; } @@ -209,6 +210,7 @@ protected: { mCursor = mEntries.size() - 1; onCursorChanged(CURSOR_STOPPED); + onScroll(); return true; }