A static utility class for loading and drawing textures.
A component that renders a string of text on the screen.
Definition Text.h:16
void setTex(const char *text)
Creates a new texture from a string of text.
Definition Text.cpp:62
void draw() override
Draws the text texture to the screen.
Definition Text.cpp:41
void changeText(std::string text)
Changes the text content and regenerates the texture.
Definition Text.cpp:48
void centreText(SDL_Rect &parentRect)
Adjusts the text's position to be centered within a parent rectangle.
Definition Text.cpp:52
void update() override
Updates the destination rectangle for rendering.
Definition Text.cpp:36