mirror of
https://github.com/Maschell/libgui-sdl.git
synced 2025-02-22 18:57:14 +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;
|
[[nodiscard]] const std::string getText() const;
|
||||||
|
|
||||||
|
void setText(const std::string& t);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GuiImage texture;
|
GuiImage texture;
|
||||||
GuiTextureData *textureData = nullptr;
|
GuiTextureData *textureData = nullptr;
|
||||||
|
@ -58,6 +58,12 @@ const std::string GuiText::getText() const {
|
|||||||
return this->text;
|
return this->text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuiText::setText(const std::string& t) {
|
||||||
|
this->text = t;
|
||||||
|
this->updateSize();
|
||||||
|
this->doUpdateTexture = true;
|
||||||
|
}
|
||||||
|
|
||||||
void GuiText::setFontSize(int32_t size) {
|
void GuiText::setFontSize(int32_t size) {
|
||||||
this->fc_font = this->gFont->getFont(size);
|
this->fc_font = this->gFont->getFont(size);
|
||||||
updateSize();
|
updateSize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user