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.
This commit is contained in:
Leon Styhre 2020-06-15 22:55:47 +02:00
parent b0ec97007f
commit 53ef1e5be7
2 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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;
}