![]() |
xyginext
0.2.0
Second generation of xygine game creation framework
|
BitmapText class. BitmapText components are used to render text with a BitmapFont. BitmapText work similarly to Text components, in that they require a reference to a BitmapFont that exists at least as long as the BitmapText instance. Entities with a BitmapText component also require a Drawable component and a Transform component. More...
#include <BitmapText.hpp>
Public Member Functions | |
| BitmapText () | |
| Default constructor. | |
| BitmapText (const BitmapFont &) | |
| Constructs a BitmapText component with the given BitmapFont. | |
| void | setFont (const BitmapFont &) |
| Sets the font used with this text. | |
| void | setString (const std::string &) |
| void | setColour (sf::Color) |
| Set the text colour. As with other drawable items, this colour is multiplied with the base colour of the texture used by the current font. | |
| const BitmapFont * | getFont () const |
| Returns a pointer to the currently active font. | |
| const std::string & | getString () const |
| Returns a reference to the active string used by the BitmapText component. | |
| sf::Color | getColour () const |
| Returns the current colour of the BitmapText. | |
Static Public Member Functions | |
| static sf::FloatRect | getLocalBounds (Entity) |
| Helper function to get the local bounds of the BitmapText. The passed entity should have at least a BitmapText component and Drawable component attached to it. | |
Friends | |
| class | BitmapTextSystem |
BitmapText class. BitmapText components are used to render text with a BitmapFont. BitmapText work similarly to Text components, in that they require a reference to a BitmapFont that exists at least as long as the BitmapText instance. Entities with a BitmapText component also require a Drawable component and a Transform component.
BitmapText components also require a BitmapTextSystem active in the current scene to render them.
1.8.18