JBWOPR
Loading...
Searching...
No Matches
JBWoprXmasSecondsDisplayEffect Class Reference

Display effect for showing seconds un til Xmas. More...

#include <jbwopreffects.h>

Inheritance diagram for JBWoprXmasSecondsDisplayEffect:
JBWoprScrollTextDisplayEffect JBWoprEffectBase

Public Member Functions

 JBWoprXmasSecondsDisplayEffect (JBWoprDevice *woprBoard, uint32_t scrollSpeed=200, uint32_t duration=-1, const std::string &name=JBWOPR_EFFECT_NAME_XMAS_SECONDS)
 Constructor.
 
void start () override
 Start effect.
 
- Public Member Functions inherited from JBWoprScrollTextDisplayEffect
 JBWoprScrollTextDisplayEffect (JBWoprDevice *woprDevice, const std::string &text, uint32_t scrollSpeed=200, uint32_t duration=-1, const std::string &name=JBWOPR_EFFECT_NAME_SCROLLTEXT)
 Constructor.
 
void loop () override
 Run loop.
 
virtual void setText (const std::string &text)
 Set text to display.
 
void setScrollSpeed (uint32_t scrollSpeed)
 Set scroll speed.
 
- Public Member Functions inherited from JBWoprEffectBase
 JBWoprEffectBase (JBWoprDevice *woprDevice, uint32_t duration=-1, std::string name=JBWOPR_EFFECT_NAME_BASE)
 Constructor.
 
virtual std::string getName ()
 Get name of effect.
 
virtual void stop ()
 Stop effect.
 
bool isRunning () const
 Check if effect is running.
 
uint32_t getDuration () const
 Set duration of effect.
 

Additional Inherited Members

- Protected Member Functions inherited from JBWoprEffectBase
void _displayText (const std::string &text, JBTextAlignment alignment=JBTextAlignment::LEFT)
 Display text on raw display.
 
- Protected Attributes inherited from JBWoprScrollTextDisplayEffect
std::string _text
 Text to display.
 
uint32_t _scrollSpeed = 200
 Scroll speed in milliseconds.
 
size_t _currentIndex = 0
 Current character index.
 
size_t _totalLength = 0
 Total length of text.
 
size_t _endIndex = 0
 End index of text.
 
- Protected Attributes inherited from JBWoprEffectBase
JBWoprDevice_woprDevice
 JBWoprDevice instance.
 
std::string _name
 Name of effect.
 
bool _isRunning = false
 True if effect is running.
 
bool _done = true
 True if effect is done, waiting for duration to end.
 
uint32_t _duration = -1
 Duration of effect in milliseconds.
 
uint32_t _startTime = 0
 Start time of effect in milliseconds.
 
uint32_t _nextTick = 0
 Next tick time in milliseconds.
 

Detailed Description

Display effect for showing seconds un til Xmas.

Constructor & Destructor Documentation

◆ JBWoprXmasSecondsDisplayEffect()

JBWoprXmasSecondsDisplayEffect::JBWoprXmasSecondsDisplayEffect ( JBWoprDevice woprBoard,
uint32_t  scrollSpeed = 200,
uint32_t  duration = -1,
const std::string &  name = JBWOPR_EFFECT_NAME_XMAS_SECONDS 
)
explicit

Constructor.

Parameters
woprBoardJBWoprDevice instance

Member Function Documentation

◆ start()

void JBWoprXmasSecondsDisplayEffect::start ( )
overridevirtual

Start effect.

Parameters
durationDuration of effect (after it is done) in milliseconds

Reimplemented from JBWoprScrollTextDisplayEffect.


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