Text rendered with TrueTypeFonts.
More...
#include <Text.h>
|
std::string | GetVar (std::string key) |
|
Text rendered with TrueTypeFonts.
◆ Render()
The render method of a component.
During the render phase of the program, this function is what draws the component to the screen. This should be overridden for any UIComponents and actually be used to draw to the screen using one of the many SDL_Render functions available.
Implements dengine_UI::UIComponent.
Referenced by SetDrawColor().
◆ SetDrawColor()
void dengine_UI::Text::SetDrawColor |
( |
SDL_Color |
color | ) |
|
|
inline |
◆ Setup()
void Text::Setup |
( |
std::string |
font, |
|
|
std::string |
text, |
|
|
SDL_Rect |
rect |
|
) |
| |
Initializes Text to be displayed on screen
- Parameters
-
font | The name of the font registered with the FontManager |
text | The text to display |
rect | A rect denoting the position of the text |
- See also
- FontManager
◆ Update()
The update method of a component.
During the update phase of the program, this function is what updates and performs any logic within the component. This should be overridden for any UIComponents and actually be used to Update the internal logic of the component. This is called prior to the update anywhere else within the engine.
Implements dengine_UI::UIComponent.
Referenced by SetDrawColor().
◆ displayText
std::string dengine_UI::Text::displayText |
|
protected |
◆ drawColor
SDL_Color dengine_UI::Text::drawColor |
|
protected |
◆ fontName
std::string dengine_UI::Text::fontName |
|
protected |
◆ textRect
SDL_Rect dengine_UI::Text::textRect |
|
protected |