Increased fade speed for the fade transition style.

This commit is contained in:
Leon Styhre 2020-07-19 12:23:30 +02:00
parent 6c79224eea
commit ebc6aabe93
2 changed files with 6 additions and 6 deletions

View file

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

View file

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