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

Runs a void callback once, then completes. More...

#include <UICallbackAnimation.hpp>

Inheritance diagram for UICallbackAnimation:
Collaboration diagram for UICallbackAnimation:

Public Member Functions

 UICallbackAnimation (std::function< void()> f)
Public Member Functions inherited from UIAnimation
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

bool onUpdate (ae::q20_12_t) override
 Per-frame update.
Protected Member Functions inherited from UIAnimation
 UIAnimation ()=default
bool applyRepeat ()
 Applies repeat policy after a completed cycle.

Private Attributes

std::function< void()> fn

Additional Inherited Members

Protected Attributes inherited from UIAnimation
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

Runs a void callback once, then completes.

Definition at line 16 of file UICallbackAnimation.hpp.

Constructor & Destructor Documentation

◆ UICallbackAnimation()

UICallbackAnimation::UICallbackAnimation ( std::function< void()> f)
inlineexplicit

Definition at line 19 of file UICallbackAnimation.hpp.

Member Function Documentation

◆ onUpdate()

bool UICallbackAnimation::onUpdate ( ae::q20_12_t dt)
inlineoverrideprotectedvirtual

Per-frame update.

Returns
true when this cycle has completed.

Implements UIAnimation.

Definition at line 24 of file UICallbackAnimation.hpp.

Member Data Documentation

◆ fn

std::function<void()> UICallbackAnimation::fn
private

Definition at line 34 of file UICallbackAnimation.hpp.


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