Very minor code consistency fix.

This commit is contained in:
Leon Styhre 2021-10-10 18:21:42 +02:00
parent bef997420d
commit 261ad3735a

View file

@ -87,24 +87,6 @@ public:
scrollUp->setOpacity(0); scrollUp->setOpacity(0);
} }
if (downFadeIn) {
auto downFadeInFunc = [scrollDown](float t) {
scrollDown->setOpacity(
static_cast<unsigned char>(glm::mix(0.0f, 1.0f, t) * 255));
};
scrollDown->setAnimation(new LambdaAnimation(downFadeInFunc, fadeInTime), 0,
nullptr, false);
}
if (downFadeOut) {
auto downFadeOutFunc = [scrollDown](float t) {
scrollDown->setOpacity(
static_cast<unsigned char>(glm::mix(0.0f, 1.0f, t) * 255));
};
scrollDown->setAnimation(new LambdaAnimation(downFadeOutFunc, fadeInTime), 0,
nullptr, true);
}
if (upFadeIn) { if (upFadeIn) {
auto upFadeInFunc = [scrollUp](float t) { auto upFadeInFunc = [scrollUp](float t) {
scrollUp->setOpacity( scrollUp->setOpacity(
@ -123,6 +105,24 @@ public:
nullptr, true); nullptr, true);
} }
if (downFadeIn) {
auto downFadeInFunc = [scrollDown](float t) {
scrollDown->setOpacity(
static_cast<unsigned char>(glm::mix(0.0f, 1.0f, t) * 255));
};
scrollDown->setAnimation(new LambdaAnimation(downFadeInFunc, fadeInTime), 0,
nullptr, false);
}
if (downFadeOut) {
auto downFadeOutFunc = [scrollDown](float t) {
scrollDown->setOpacity(
static_cast<unsigned char>(glm::mix(0.0f, 1.0f, t) * 255));
};
scrollDown->setAnimation(new LambdaAnimation(downFadeOutFunc, fadeInTime), 0,
nullptr, true);
}
mPreviousScrollState = state; mPreviousScrollState = state;
}); });
} }