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

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

#include <animation.h>

Inheritance diagram for AnimationDelay:
Inheritance graph
[legend]

Public Member Functions

 AnimationDelay ()=delete
 
 AnimationDelay (std::chrono::milliseconds duration) noexcept
 
bool next () override
 Periodic call to the animation.
 
void resume () override
 Resume the animation.
 
void start () override
 Start the animation.
 
void stop () override
 Stop the animation.
 
- 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.
 
void clear_callbacks ()
 Clear all callbacks.
 
AnimationBaseoperator= (AnimationBase &&) noexcept=default
 
AnimationBaseoperator= (const AnimationBase &)=delete
 
virtual EGT_NODISCARD bool running () const
 Returns true if the animation is currently running.
 

Protected Attributes

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

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 ( )
delete

◆ AnimationDelay() [2/2]

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

Member Function Documentation

◆ next()

bool next ( )
inlineoverridevirtual

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 ( )
inlineoverridevirtual

Resume the animation.

Implements AnimationBase.

◆ start()

void start ( )
inlineoverridevirtual

Start the animation.

Implements AnimationBase.

◆ stop()

void stop ( )
inlineoverridevirtual

Stop the animation.

Implements AnimationBase.

Member Data Documentation

◆ m_timer

Timer m_timer
protected

One-shot timer.