Add getText to GuiText

This commit is contained in:
Maschell 2020-10-04 14:02:43 +02:00
parent b686ad53f8
commit c726432a07
2 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,8 @@ public:
void setColor(SDL_Color c);
[[nodiscard]] const std::string getText() const;
protected:
GuiImage texture;
GuiTextureData *textureData = nullptr;

View File

@ -54,6 +54,10 @@ void GuiText::setColor(SDL_Color c) {
this->color = c;
}
const std::string GuiText::getText() const {
return this->text;
}
void GuiText::setFontSize(int32_t size) {
this->fc_font = this->gFont->getFont(size);
updateSize();