From a077b7a92e87a3edd1cebb9bdd4c4fa3ec3d7bb7 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sat, 5 Aug 2023 23:29:33 +0200 Subject: animationmgr: avoid redundant ticks --- src/managers/AnimationManager.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/managers/AnimationManager.hpp') diff --git a/src/managers/AnimationManager.hpp b/src/managers/AnimationManager.hpp index 6d2830fd..cf1f19b3 100644 --- a/src/managers/AnimationManager.hpp +++ b/src/managers/AnimationManager.hpp @@ -13,6 +13,8 @@ class CAnimationManager { CAnimationManager(); void tick(); + bool shouldTickForNext(); + void scheduleTick(); void addBezierWithName(std::string, const Vector2D&, const Vector2D&); void removeAllBeziers(); @@ -42,6 +44,8 @@ class CAnimationManager { std::unordered_map m_mBezierCurves; + bool m_bTickScheduled = false; + // Anim stuff void animationPopin(CWindow*, bool close = false, float minPerc = 0.f); void animationSlide(CWindow*, std::string force = "", bool close = false); -- cgit v1.2.3