persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIAnimator Class Reference

Owns and ticks active UI animations. Safe against cancel-during-tick. More...

#include <UIAnimator.hpp>

Public Member Functions

template<typename T>
UIPropertyAnimationBuilder< T > animate (T &target)
template<typename T>
UIPropertyAnimationBuilder< T > animate (UIAnimated< T > &target)
UISequenceBuilder sequence ()
UIAnimationHandle play (std::shared_ptr< UIAnimation > anim)
std::shared_ptr< UIAnimation > call (std::function< void()> fn)
std::shared_ptr< UIAnimation > delay (int ms)
void update (ae::q20_12_t dt)
 Advances all active animations by dt seconds (Q20.12).
void cancelAll ()

Static Public Attributes

static constexpr std::size_t MAX_ACTIVE_ANIMATIONS = 8

Private Attributes

etl::vector< std::shared_ptr< UIAnimation >, MAX_ACTIVE_ANIMATIONS > active
etl::vector< std::shared_ptr< UIAnimation >, MAX_ACTIVE_ANIMATIONS > pendingPlay
bool updating = false
bool pendingCancelAll = false

Detailed Description

Owns and ticks active UI animations. Safe against cancel-during-tick.

Definition at line 24 of file UIAnimator.hpp.

Member Function Documentation

◆ animate() [1/2]

template<typename T>
UIPropertyAnimationBuilder< T > UIAnimator::animate ( T & target)
inline

Definition at line 29 of file UIAnimator.hpp.

◆ animate() [2/2]

template<typename T>
UIPropertyAnimationBuilder< T > UIAnimator::animate ( UIAnimated< T > & target)
inline

Definition at line 34 of file UIAnimator.hpp.

Here is the call graph for this function:

◆ call()

std::shared_ptr< UIAnimation > UIAnimator::call ( std::function< void()> fn)
inline

Definition at line 69 of file UIAnimator.hpp.

◆ cancelAll()

void UIAnimator::cancelAll ( )
inline

Definition at line 122 of file UIAnimator.hpp.

◆ delay()

std::shared_ptr< UIAnimation > UIAnimator::delay ( int ms)
inline

Definition at line 74 of file UIAnimator.hpp.

◆ play()

UIAnimationHandle UIAnimator::play ( std::shared_ptr< UIAnimation > anim)
inline

Definition at line 44 of file UIAnimator.hpp.

◆ sequence()

UISequenceBuilder UIAnimator::sequence ( )
inline

Definition at line 39 of file UIAnimator.hpp.

◆ update()

void UIAnimator::update ( ae::q20_12_t dt)
inline

Advances all active animations by dt seconds (Q20.12).

Definition at line 82 of file UIAnimator.hpp.

Member Data Documentation

◆ active

etl::vector<std::shared_ptr<UIAnimation>, MAX_ACTIVE_ANIMATIONS> UIAnimator::active
private

Definition at line 140 of file UIAnimator.hpp.

◆ MAX_ACTIVE_ANIMATIONS

std::size_t UIAnimator::MAX_ACTIVE_ANIMATIONS = 8
staticconstexpr

Definition at line 27 of file UIAnimator.hpp.

◆ pendingCancelAll

bool UIAnimator::pendingCancelAll = false
private

Definition at line 143 of file UIAnimator.hpp.

◆ pendingPlay

etl::vector<std::shared_ptr<UIAnimation>, MAX_ACTIVE_ANIMATIONS> UIAnimator::pendingPlay
private

Definition at line 141 of file UIAnimator.hpp.

◆ updating

bool UIAnimator::updating = false
private

Definition at line 142 of file UIAnimator.hpp.


The documentation for this class was generated from the following file: