From ebc6aabe93759c2ee52c67c96b5b3a5c74b32e1a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 19 Jul 2020 12:23:30 +0200 Subject: [PATCH] Increased fade speed for the fade transition style. --- es-app/src/views/SystemView.cpp | 8 ++++---- es-app/src/views/ViewController.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index a95926f36..169ab6b21 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -282,8 +282,8 @@ void SystemView::onCursorChanged(const CursorState& /*state*/) mSystemInfo.setOpacity((unsigned char)(Math::lerp(0.f, 1.f, t) * 255)); }, goFast ? 10 : 300); - // Wait 600ms to fade in. - setAnimation(infoFadeIn, goFast ? 0 : 2000, nullptr, false, 2); + // Wait 150ms to fade in. + setAnimation(infoFadeIn, goFast ? 0 : 500, nullptr, false, 2); // No need to animate transition, we're not going anywhere (probably mEntries.size() == 1). if (endPos == mCamOffset && endPos == mExtrasCamOffset) @@ -306,11 +306,11 @@ void SystemView::onCursorChanged(const CursorState& /*state*/) t += 1; if (t < 0.3f) - this->mExtrasFadeOpacity = Math::lerp(0.0f, 1.0f, t / 0.3f + startExtrasFade); + this->mExtrasFadeOpacity = Math::lerp(0.0f, 1.0f, t / 0.2f + startExtrasFade); else if (t < 0.7f) this->mExtrasFadeOpacity = 1.0f; else - this->mExtrasFadeOpacity = Math::lerp(1.0f, 0.0f, (t - 0.7f) / 0.3f); + this->mExtrasFadeOpacity = Math::lerp(1.0f, 0.0f, (t - 0.6f) / 0.3f); if (t > 0.5f) this->mExtrasCamOffset = endPos; diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index fa7115a59..1225f7e0e 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -200,8 +200,8 @@ void ViewController::playViewTransition() mFadeOpacity = Math::lerp(0, 1, t); }; - const static int FADE_DURATION = 240; // Fade in/out time. - const static int FADE_WAIT = 320; // Time to wait between in/out. + const static int FADE_DURATION = 120; // Fade in/out time. + const static int FADE_WAIT = 200; // Time to wait between in/out. setAnimation(new LambdaAnimation(fadeFunc, FADE_DURATION), 0, [this, fadeFunc, target] { this->mCamera.translation() = -target; updateHelpPrompts();