mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed a GridComponent slide transition issue when used in the system view.
Also fixed a general navigation issue.
This commit is contained in:
parent
0cd814a4d1
commit
dfcf041efc
|
@ -318,6 +318,11 @@ void SystemView::onCursorChanged(const CursorState& state)
|
|||
Animation* anim;
|
||||
|
||||
float animTime {380.0f};
|
||||
|
||||
if (mGrid != nullptr) {
|
||||
animTime = 250.0f;
|
||||
}
|
||||
else {
|
||||
float timeDiff {1.0f};
|
||||
|
||||
// If startPos is inbetween two positions then reduce the time slightly as the distance will
|
||||
|
@ -330,6 +335,7 @@ void SystemView::onCursorChanged(const CursorState& state)
|
|||
if (timeDiff != 1.0f)
|
||||
animTime =
|
||||
glm::clamp(std::fabs(glm::mix(0.0f, animTime, timeDiff * 1.5f)), 200.0f, animTime);
|
||||
}
|
||||
|
||||
if (transitionStyle == "fade") {
|
||||
float startFade {mFadeOpacity};
|
||||
|
|
|
@ -348,9 +348,10 @@ template <typename T> bool GridComponent<T>::input(InputConfig* config, Input in
|
|||
return true;
|
||||
}
|
||||
if (config->isMappedLike("down", input)) {
|
||||
if (mCursor >= (mColumns * mRowCount) - mColumns &&
|
||||
static_cast<int>(mEntries.size()) - mCursor <= mColumns &&
|
||||
mEntries.size() % mColumns == 0)
|
||||
if (mCursor >= (mColumns * mRowCount) - mColumns && size() - mCursor <= mColumns &&
|
||||
size() % mColumns == 0)
|
||||
return true;
|
||||
if (size() < mColumns)
|
||||
return true;
|
||||
if (mCancelTransitionsCallback)
|
||||
mCancelTransitionsCallback();
|
||||
|
|
Loading…
Reference in a new issue