mirror of
https://github.com/Maschell/libgui-sdl.git
synced 2025-02-23 03:07:16 +01:00
Add getText to GuiText
This commit is contained in:
parent
b686ad53f8
commit
c726432a07
@ -61,6 +61,8 @@ public:
|
|||||||
|
|
||||||
void setColor(SDL_Color c);
|
void setColor(SDL_Color c);
|
||||||
|
|
||||||
|
[[nodiscard]] const std::string getText() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GuiImage texture;
|
GuiImage texture;
|
||||||
GuiTextureData *textureData = nullptr;
|
GuiTextureData *textureData = nullptr;
|
||||||
|
@ -54,6 +54,10 @@ void GuiText::setColor(SDL_Color c) {
|
|||||||
this->color = c;
|
this->color = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string GuiText::getText() const {
|
||||||
|
return this->text;
|
||||||
|
}
|
||||||
|
|
||||||
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