17#include <etl/vector.h>
69 std::shared_ptr<UIAnimation>
call(std::function<
void()> fn)
71 return std::make_shared<UICallbackAnimation>(std::move(fn));
74 std::shared_ptr<UIAnimation>
delay(
int ms)
76 return std::make_shared<UIDelayAnimation>(ms);
114 if (!
active.full() && anim !=
nullptr && !anim->isCancelled() && !anim->isDone())
148 if (
owner ==
nullptr)
157 if (
owner ==
nullptr)
Non-copyable wrapper around a value that UI tweens can target.
Weak handle used by callers to cancel/pause/query a running UI animation.
Base class for one UI animation step (property, delay, callback, sequence).
One-shot animation that invokes a callback on its first tick.
Animation that waits for a fixed duration before completing.
Tweens a single target value over time with easing and optional repeat.
Ordered groups of UI animations (sequential steps, parallel joins).
Owns a value of type T that property animations may write to.
Non-owning control handle for a UIAnimation managed by UIAnimator.
Owns and ticks active UI animations. Safe against cancel-during-tick.
std::shared_ptr< UIAnimation > delay(int ms)
UISequenceBuilder sequence()
void update(ae::q20_12_t dt)
Advances all active animations by dt seconds (Q20.12).
etl::vector< std::shared_ptr< UIAnimation >, MAX_ACTIVE_ANIMATIONS > active
std::shared_ptr< UIAnimation > call(std::function< void()> fn)
UIAnimationHandle play(std::shared_ptr< UIAnimation > anim)
UIPropertyAnimationBuilder< T > animate(UIAnimated< T > &target)
UIPropertyAnimationBuilder< T > animate(T &target)
static constexpr std::size_t MAX_ACTIVE_ANIMATIONS
etl::vector< std::shared_ptr< UIAnimation >, MAX_ACTIVE_ANIMATIONS > pendingPlay
Fluent builder for UIPropertyAnimation. Must be started via a UIAnimator owner.
UIAnimationHandle start()
std::shared_ptr< UIAnimation > build() const
Fluent builder for UISequenceAnimation. Requires a UIAnimator to start.
std::shared_ptr< UISequenceAnimation > seq
UIAnimationHandle start()