|
| Text (const dl::TextBuffer &textBuffer) |
|
void | updateDynamicText () |
| reparses and reoptimizes the text. This should be used if you call TextBuffer::flushBuffer beforehand.
|
|
void | setString (std::string str) |
| Sets the text's string.
|
|
void | setScale (const dl::Vector2f &scale) |
| Sets the scale of the text.
|
|
void | setAlignment (TextAlignment alignment) |
| Sets the alignment of the text.
|
|
void | setOrigin (const dl::Vector2f &origin) |
| Sets the origin of the shape. The default origin is (0,0) and is the top left pixel of the shape bounds. Setting the origin can affect where the shape is drawn. For instance, setting the origin to be half the shape size will cause the shape to be centered on its position.
|
|
void | setOrigin (float x, float y) |
| Sets the origin of the shape. The default origin is (0,0) and is the top left pixel of the shape bounds. Setting the origin can affect where the shape is drawn. For instance, setting the origin to be half the shape size will cause the shape to be centered on its position.
|
|
void | setColor (const dl::Color &color) |
| Sets the color of the text.
|
|
const std::string & | getString () |
|
const dl::Vector2f & | getOrigin () |
|
const dl::Vector2f & | getScale () |
|
void | draw (const dl::Vector2f &viewOffset) override |
| Draws the drawable to the screen.
|
|
virtual void | setPosition (const dl::Vector2f &position) |
| Sets the position of the transformable.
|
|
void | setPosition (float x, float y) |
| Sets the position of the transformable.
|
|
virtual void | move (const dl::Vector2f &offset) |
| Moves the transformable offset number of pixels.
|
|
void | move (float xOffset, float yOffset) |
| Moves the transformable offset number of pixels.
|
|
const dl::Vector2f & | getPosition () const |
|
void | viewShouldAffect (bool effective) |
| Set whether the current view should affect the position of the drawable. Otherwise, its position on the screen will be absolute.
|
|
void | setDepth (float depth) |
| Sets the depth of the drawable for 3d. This simply corresponds to the X offset calculated for the 2 separate top screens. Larger objects will require a deeper depth for the 3d effect to be noticable. A positive value will cause the drawable to sink into the screen, while a negative value will cause it to pop out.
|
|
const float & | getDepth () const |
|
A class used to handle the transformation and drawing of visible text.