Public Member Functions | Protected Attributes | List of all members
AnimationDelay Class Reference

Simple delay, useful to insert a delay in an AnimationSequence. More...

Inheritance diagram for AnimationDelay:
Inheritance graph

Public Member Functions

 AnimationDelay ()=delete
 AnimationDelay (std::chrono::milliseconds duration) noexcept
bool next () override
 Periodic call to the animation. More...
void resume () override
 Resume the animation. More...
void start () override
 Start the animation. More...
void stop () override
 Stop the animation. More...
- Public Member Functions inherited from AnimationBase
 AnimationBase ()=default
 AnimationBase (AnimationBase &&) noexcept=default
 AnimationBase (const AnimationBase &)=delete
virtual ~AnimationBase () noexcept=default
void add_callback (AnimationCallback callback)
 Register a callback for the animation. More...
void clear_callbacks ()
 Clear all callbacks. More...
AnimationBaseoperator= (AnimationBase &&) noexcept=default
AnimationBaseoperator= (const AnimationBase &)=delete
virtual EGT_NODISCARD bool running () const
 Returns true if the animation is currently running. More...

Protected Attributes

Timer m_timer
 One-shot timer. More...
- Protected Attributes inherited from AnimationBase
std::vector< AnimationCallbackm_callbacks
 Registered callbacks for the animation. More...
bool m_running {false}
 The running state of the animation. More...

Detailed Description

Simple delay, useful to insert a delay in an AnimationSequence.

This basically established as one-shot timer to create a delay. It performs no easing curve function evaluation.

Constructor & Destructor Documentation

◆ AnimationDelay() [1/2]

AnimationDelay ( )

◆ AnimationDelay() [2/2]

AnimationDelay ( std::chrono::milliseconds  duration)
durationThe delay time for the animation.

Member Function Documentation

◆ next()

bool next ( )

Periodic call to the animation.

This must be called until it returns false. When it returns false, the animation is done.

Implements AnimationBase.

◆ resume()

void resume ( )

Resume the animation.

Implements AnimationBase.

◆ start()

void start ( )

Start the animation.

Implements AnimationBase.

◆ stop()

void stop ( )

Stop the animation.

Implements AnimationBase.

Member Data Documentation

◆ m_timer

Timer m_timer

One-shot timer.