Helper class. Cut text to widget size.
More...
#include <primitiveGui.h>
Helper class. Cut text to widget size.
This class inherits of sf::Text class from SFML. It's used by widgets which have string to display.
pText::pText |
( |
float |
marginLeft, |
|
|
float |
marginRight, |
|
|
bool |
textCentered, |
|
|
int |
cutDirection |
|
) |
| |
Default constructor.
- Parameters
-
marginLeft | |
marginRight | |
textCentered | |
cutDirection | : if 0 cut from begin of string or if 1 cut from end of string |
void pText::addSymbol |
( |
sf::String & |
symbol | ) |
|
Add new string to existing string.
- Parameters
-
void pText::removeLastSymbol |
( |
| ) |
|
Remove last symbol from string
void pText::setNewSymbol |
( |
sf::String & |
symbol | ) |
|
Set new string instead of existing string.
- Parameters
-
void pText::setParentGeom |
( |
sf::Vector2f |
position, |
|
|
sf::Vector2f |
size |
|
) |
| |
Set parent widget geometry to fill text in this rectangle.
- Parameters
-
void pText::updateText |
( |
| ) |
|
Update text ( cut to parent widget size and set parent position ).
The documentation for this class was generated from the following files: