12#ifndef MALENA_ANIMATIONMANAGER_H
13#define MALENA_ANIMATIONMANAGER_H
28 using Step = std::function<bool(
float)>;
31 static void add(
const void* owner,
Step step);
37 static void cancel(
const void* owner);
48 const void* owner =
nullptr;
53 static std::vector<Track>& tracks();
54 static std::vector<Track>& pending();
55 static bool& advancing();
static void cancel(const void *owner)
Remove every animation belonging to owner (called on owner destruction).
std::function< bool(float)> Step
A per-frame step. Receives dt (seconds); returns true when finished.
static void advance(float dt)
Advance every active animation by dt seconds (called once per frame).
static bool hasActive(const void *owner)
True if owner has any live animation.
static void add(const void *owner, Step step)
Register an animation step owned by owner (used for cancellation).
static std::size_t activeCount()
Total number of live animations (test/introspection helper).