|
NasNas
An intuitive and beginner friendly 2D game framework for C++
|
A BitmapText is a Drawable that uses a BitmapFont to display text. More...
#include <BitmapText.hpp>
Public Member Functions | |
| BitmapText (const sf::String &string, const ns::BitmapFont &font) | |
| Creates a BitmapText. More... | |
| void | setString (const sf::String &string) |
| Set the text's string. More... | |
| auto | getString () -> const sf::String & |
| void | setFont (const BitmapFont &font) |
| Set the text's BitmapFont. More... | |
| auto | getFont () const -> const BitmapFont * |
| void | setColor (const sf::Color &color) |
| Set the font color. More... | |
| auto | getColor () const -> const sf::Color & |
| void | setLetterSpacing (float factor) |
| auto | getLetterSpacing () const -> float |
| void | setLineSpacing (float factor) |
| auto | getLineSpacing () const -> float |
| auto | getCharacterIndexAt (float position) const -> std::size_t |
| auto | getPosition () const -> sf::Vector2f |
| Get BitmapText position. More... | |
| auto | getLocalBounds () const -> ns::FloatRect |
| Get BitmapText local bounds. More... | |
| auto | getGlobalBounds () const -> ns::FloatRect |
| Get BitmapText global bounds. More... | |
A BitmapText is a Drawable that uses a BitmapFont to display text.
Definition at line 28 of file BitmapText.hpp.
| ns::BitmapText::BitmapText | ( | const sf::String & | string, |
| const ns::BitmapFont & | font | ||
| ) |
Creates a BitmapText.
| string | String to display |
| font | Font used to draw the string |
| auto ns::BitmapText::getGlobalBounds | ( | ) | const -> ns::FloatRect |
Get BitmapText global bounds.
| auto ns::BitmapText::getLocalBounds | ( | ) | const -> ns::FloatRect |
Get BitmapText local bounds.
| auto ns::BitmapText::getPosition | ( | ) | const -> sf::Vector2f |
Get BitmapText position.
| void ns::BitmapText::setColor | ( | const sf::Color & | color | ) |
Set the font color.
| color | The color |
| void ns::BitmapText::setFont | ( | const BitmapFont & | font | ) |
Set the text's BitmapFont.
| font | New bitmapfont |
| void ns::BitmapText::setString | ( | const sf::String & | string | ) |
Set the text's string.
| string | New string |
1.8.13