Display effect for showing text.
More...
#include <jbwopreffects.h>
|
std::string | _text |
| Text to display.
|
|
JBTextAlignment | _alignment |
| True if text should be centered.
|
|
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 showing text.
◆ JBWoprTextDisplayEffect()
JBWoprTextDisplayEffect::JBWoprTextDisplayEffect |
( |
JBWoprDevice * |
woprDevice, |
|
|
const std::string & |
text, |
|
|
JBTextAlignment |
alignment = JBTextAlignment::LEFT , |
|
|
uint32_t |
duration = -1 , |
|
|
const std::string & |
name = JBWOPR_EFFECT_NAME_TEXT |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
woprDevice | JBWoprDevice instance |
text | Text to display |
alignment | (optional) Text alignment, default is LEFT |
duration | (optional) Duration of effect in milliseconds, default is -1 (infinite) |
name | (optional) Name of effect |
◆ loop()
void JBWoprTextDisplayEffect::loop |
( |
| ) |
|
|
overridevirtual |
◆ setAlignment()
void JBWoprTextDisplayEffect::setAlignment |
( |
JBTextAlignment |
alignment | ) |
|
|
virtual |
Set center text.
- Parameters
-
value | True if text should be centered |
◆ setText()
void JBWoprTextDisplayEffect::setText |
( |
const std::string & |
text | ) |
|
|
virtual |
Set text to display.
- Parameters
-
◆ start()
void JBWoprTextDisplayEffect::start |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: