persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIAnimation Class Referenceabstract

Abstract UI animation advanced once per frame by UIAnimator. More...

#include <UIAnimation.hpp>

Inheritance diagram for UIAnimation:

Public Member Functions

virtual ~UIAnimation ()=default
 UIAnimation (const UIAnimation &)=delete
UIAnimation & operator= (const UIAnimation &)=delete
 UIAnimation (UIAnimation &&)=delete
UIAnimation & operator= (UIAnimation &&)=delete
bool tick (ae::q20_12_t dt)
 Advances the animation by dt seconds (Q20.12).
virtual void reverse ()
virtual void reset ()
 Resets runtime state so the animation can play again (used by Loop).
void pause ()
void resume ()
void cancel ()
bool isCancelled () const
bool isPaused () const
bool isDone () const
void setRepeat (UIRepeatMode mode, int count=-1)

Protected Member Functions

 UIAnimation ()=default
virtual bool onUpdate (ae::q20_12_t dt)=0
 Per-frame update.
bool applyRepeat ()
 Applies repeat policy after a completed cycle.

Protected Attributes

bool paused = false
bool cancelled = false
bool done = false
ae::q20_12_t elapsed {0}
UIRepeatMode repeatMode = UIRepeatMode::Once
int remainingRepeats = -1
 -1 = infinite when mode is not Once.

Detailed Description

Abstract UI animation advanced once per frame by UIAnimator.

Definition at line 24 of file UIAnimation.hpp.

Constructor & Destructor Documentation

◆ ~UIAnimation()

virtual UIAnimation::~UIAnimation ( )
virtualdefault

◆ UIAnimation() [1/3]

UIAnimation::UIAnimation ( const UIAnimation & )
delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UIAnimation() [2/3]

UIAnimation::UIAnimation ( UIAnimation && )
delete
Here is the call graph for this function:

◆ UIAnimation() [3/3]

UIAnimation::UIAnimation ( )
protecteddefault

Member Function Documentation

◆ applyRepeat()

bool UIAnimation::applyRepeat ( )
inlineprotected

Applies repeat policy after a completed cycle.

Returns
true if the animation should continue playing.

Definition at line 119 of file UIAnimation.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cancel()

void UIAnimation::cancel ( )
inline

Definition at line 80 of file UIAnimation.hpp.

◆ isCancelled()

bool UIAnimation::isCancelled ( ) const
inline

Definition at line 85 of file UIAnimation.hpp.

◆ isDone()

bool UIAnimation::isDone ( ) const
inline

Definition at line 95 of file UIAnimation.hpp.

◆ isPaused()

bool UIAnimation::isPaused ( ) const
inline

Definition at line 90 of file UIAnimation.hpp.

◆ onUpdate()

virtual bool UIAnimation::onUpdate ( ae::q20_12_t dt)
protectedpure virtual

Per-frame update.

Returns
true when this cycle has completed.

Implemented in UICallbackAnimation, UIDelayAnimation, UIPropertyAnimation< T >, and UISequenceAnimation.

Here is the caller graph for this function:

◆ operator=() [1/2]

UIAnimation & UIAnimation::operator= ( const UIAnimation & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

UIAnimation & UIAnimation::operator= ( UIAnimation && )
delete
Here is the call graph for this function:

◆ pause()

void UIAnimation::pause ( )
inline

Definition at line 70 of file UIAnimation.hpp.

◆ reset()

virtual void UIAnimation::reset ( )
inlinevirtual

Resets runtime state so the animation can play again (used by Loop).

Reimplemented in UIDelayAnimation, UIPropertyAnimation< T >, and UISequenceAnimation.

Definition at line 62 of file UIAnimation.hpp.

Here is the caller graph for this function:

◆ resume()

void UIAnimation::resume ( )
inline

Definition at line 75 of file UIAnimation.hpp.

◆ reverse()

virtual void UIAnimation::reverse ( )
inlinevirtual

Reimplemented in UIPropertyAnimation< T >, and UISequenceAnimation.

Definition at line 55 of file UIAnimation.hpp.

Here is the caller graph for this function:

◆ setRepeat()

void UIAnimation::setRepeat ( UIRepeatMode mode,
int count = -1 )
inline

Definition at line 100 of file UIAnimation.hpp.

◆ tick()

bool UIAnimation::tick ( ae::q20_12_t dt)
inline

Advances the animation by dt seconds (Q20.12).

Returns
true if the animation is finished and may be removed.

Definition at line 38 of file UIAnimation.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ cancelled

bool UIAnimation::cancelled = false
protected

Definition at line 150 of file UIAnimation.hpp.

◆ done

bool UIAnimation::done = false
protected

Definition at line 151 of file UIAnimation.hpp.

◆ elapsed

ae::q20_12_t UIAnimation::elapsed {0}
protected

Definition at line 152 of file UIAnimation.hpp.

◆ paused

bool UIAnimation::paused = false
protected

Definition at line 149 of file UIAnimation.hpp.

◆ remainingRepeats

int UIAnimation::remainingRepeats = -1
protected

-1 = infinite when mode is not Once.

Definition at line 154 of file UIAnimation.hpp.

◆ repeatMode

UIRepeatMode UIAnimation::repeatMode = UIRepeatMode::Once
protected

Definition at line 153 of file UIAnimation.hpp.


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