Display effect for scrolling text.
More...
#include <jbwopreffects.h>
|
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.
|
|
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.
|
|
|
void | _displayText (const std::string &text, JBTextAlignment alignment=JBTextAlignment::LEFT) |
| Display text on raw display.
|
|
Display effect for scrolling text.
◆ JBWoprScrollTextDisplayEffect()
JBWoprScrollTextDisplayEffect::JBWoprScrollTextDisplayEffect |
( |
JBWoprDevice * |
woprDevice, |
|
|
const std::string & |
text, |
|
|
uint32_t |
scrollSpeed = 200 , |
|
|
uint32_t |
duration = -1 , |
|
|
const std::string & |
name = JBWOPR_EFFECT_NAME_SCROLLTEXT |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
woprDevice | JBWoprDevice instance |
text | Text to display |
scrollSpeed | (optional) Scroll speed in milliseconds, default is 200 |
duration | (optional) Duration after scrolling in milliseconds, default is -1 (infinite) |
name | (optional) Name of effect |
◆ loop()
void JBWoprScrollTextDisplayEffect::loop |
( |
| ) |
|
|
overridevirtual |
◆ setScrollSpeed()
void JBWoprScrollTextDisplayEffect::setScrollSpeed |
( |
uint32_t |
scrollSpeed | ) |
|
Set scroll speed.
- Parameters
-
scrollSpeed | Scroll speed in milliseconds |
◆ setText()
void JBWoprScrollTextDisplayEffect::setText |
( |
const std::string & |
text | ) |
|
|
virtual |
Set text to display.
- Parameters
-
◆ start()
void JBWoprScrollTextDisplayEffect::start |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: