Fixed an issue where carousel shoulder button navigation was a bit inconsistent.

This commit is contained in:
Leon Styhre 2022-03-25 23:38:04 +01:00
parent e7aeb8e2b4
commit 8ce820e001

View file

@ -294,14 +294,26 @@ template <typename T> bool CarouselComponent<T>::input(InputConfig* config, Inpu
if (config->isMappedLike("leftshoulder", input)) {
if (mCancelTransitionsCallback)
mCancelTransitionsCallback();
List::listInput(-10);
return true;
if (mEntries.size() < 10 && getCursor() != 0) {
mTriggerJump = true;
return this->listFirstRow();
}
else {
List::listInput(-10);
return true;
}
}
if (config->isMappedLike("rightshoulder", input)) {
if (mCancelTransitionsCallback)
mCancelTransitionsCallback();
List::listInput(10);
return true;
if (mEntries.size() < 10 && getCursor() != static_cast<int>(mEntries.size()) - 1) {
mTriggerJump = true;
return this->listLastRow();
}
else {
List::listInput(10);
return true;
}
}
if (config->isMappedLike("lefttrigger", input)) {
if (getCursor() == 0)