1.9
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
[legend]

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