From a2f9e616ee125650dace9653855081a6e2a16507 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 30 Jul 2016 18:22:57 +0200 Subject: fixed shiftout of viewelements which were not drawn at shiftin --- coreengine/animation.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'coreengine') diff --git a/coreengine/animation.c b/coreengine/animation.c index 65fb587..558f386 100644 --- a/coreengine/animation.c +++ b/coreengine/animation.c @@ -328,8 +328,13 @@ void cShifter::Init(void) { stepYFast = (float)(end.Y() - start.Y()) * distanceFast / 100.0f / (float)stepsFast; stepYSlow = (float)(end.Y() - start.Y()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast); } - x = start.X(); - y = start.Y(); + if (shiftin) { + x = start.X(); + y = start.Y(); + } else { + x = end.X(); + y = end.Y(); + } } void cShifter::Reactivate(void) { @@ -337,6 +342,9 @@ void cShifter::Reactivate(void) { finished = false; shiftin = false; step = 0; + if (start.X() == 0 && start.Y() == 0 && end.X() == 0 && end.Y() == 0) { + Init(); + } } void cShifter::SetInitial(void) { -- cgit v1.2.3