Adjusted the system view and carousel transition animation times slightly.

This commit is contained in:
Leon Styhre 2022-12-16 17:25:57 +01:00
parent db14491380
commit 5581103642
3 changed files with 4 additions and 3 deletions

View file

@ -352,7 +352,7 @@ void SystemView::onCursorChanged(const CursorState& state)
Animation* anim;
float animTime {380.0f};
float animTime {400.0f};
float timeMin {200.0f};
float timeDiff {1.0f};

View file

@ -1480,7 +1480,7 @@ template <typename T> void CarouselComponent<T>::onCursorChanged(const CursorSta
mPositiveDirection = false;
mEntryCamTarget = endPos;
float animTime {380.0f};
float animTime {400.0f};
float timeDiff {1.0f};
// If startPos is inbetween two positions then reduce the time slightly as the distance will

View file

@ -707,7 +707,7 @@ template <typename T> void TextListComponent<T>::onCursorChanged(const CursorSta
float posMax {static_cast<float>(mEntries.size())};
float endPos {static_cast<float>(mCursor)};
float animTime {380.0f};
float animTime {400.0f};
float timeDiff {1.0f};
// If startPos is inbetween two positions then reduce the time slightly as the distance will
@ -726,6 +726,7 @@ template <typename T> void TextListComponent<T>::onCursorChanged(const CursorSta
// Non-linear interpolation.
t = 1.0f - (1.0f - t) * (1.0f - t);
float f {(endPos * t) + (startPos * (1.0f - t))};
if (f < 0)
f += posMax;
if (f >= posMax)