This commit is contained in:
IlyaShurupov 2024-10-08 14:23:49 +03:00 committed by Ilya Shurupov
parent 279cf58dff
commit 4b6e7da994
18 changed files with 592 additions and 203 deletions

View file

@ -13,7 +13,7 @@ void AnimationTestWidget::process(const EventHandler& events) {
mTestSpring.updateCurrentRect();
if (mTestSpring.checkAnimationShouldEnd()) {
if (mTestSpring.shouldEndTransition()) {
mTestSpring.endAnimation();
}
}
@ -23,7 +23,6 @@ void AnimationTestWidget::draw(Canvas& canvas) {
canvas.rect(mTestSpring.getCurrentRect(), RGBA(1.f), 10);
}
bool AnimationTestWidget::needUpdate() const {
if (Widget::needUpdate()) return true;
return !mTestSpring.checkAnimationShouldEnd();
bool AnimationTestWidget::needsNextFrame() const {
return Widget::needsNextFrame() || !mTestSpring.shouldEndTransition();
}