mirror of
https://github.com/Maschell/libgui-sdl.git
synced 2025-02-21 10:32:03 +01:00
Add GuiText:setText
This commit is contained in:
parent
c726432a07
commit
e61d10c828
@ -63,6 +63,8 @@ public:
|
||||
|
||||
[[nodiscard]] const std::string getText() const;
|
||||
|
||||
void setText(const std::string& t);
|
||||
|
||||
protected:
|
||||
GuiImage texture;
|
||||
GuiTextureData *textureData = nullptr;
|
||||
|
@ -58,6 +58,12 @@ const std::string GuiText::getText() const {
|
||||
return this->text;
|
||||
}
|
||||
|
||||
void GuiText::setText(const std::string& t) {
|
||||
this->text = t;
|
||||
this->updateSize();
|
||||
this->doUpdateTexture = true;
|
||||
}
|
||||
|
||||
void GuiText::setFontSize(int32_t size) {
|
||||
this->fc_font = this->gFont->getFont(size);
|
||||
updateSize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user