Stellarium  HEAD
Public Member Functions
LinearFader Class Reference

Implementation of StelFader which implements a linear transition. More...

#include <StelFader.hpp>

Public Member Functions

 LinearFader (int _duration=1000, bool initialState=false)
 
void update (int deltaMs) override
 Increments the internal counter of deltaMs milliseconds.
 
float getInterstate () const override
 Gets current value (between 0 and 1)
 
StelFaderoperator= (bool s) override
 
void setDuration (int _duration) override
 
float getDuration () const override
 
- Public Member Functions inherited from StelFader
 StelFader (bool initialState)
 
bool operator== (bool s) const
 
 operator bool () const
 

Additional Inherited Members

- Protected Member Functions inherited from StelFader
float getTargetValue () const
 
float getStartValue () const
 
- Protected Attributes inherited from StelFader
bool state
 

Detailed Description

Implementation of StelFader which implements a linear transition.

Please note that state is updated instantaneously, so if you need to draw something fading in and out, you need to check the interstate value (!=0) to know to draw when on AND during transitions.