Added being able to set position via JSON. Text now always wraps on newlines.

This commit is contained in:
2025-12-04 17:44:24 +02:00
parent 56e07e1080
commit 69a50b0584
4 changed files with 21 additions and 19 deletions

View File

@@ -42,17 +42,17 @@ protected:
SDL_Color m_text_color;
public:
WidgetText(int width, int height, std::string text,
WidgetText(int x, int y, int width, int height, std::string text,
TextFit fit, bool should_wrap,
HorizontalAlign halign, VerticalAlign valign,
SDL_Color text_color,
int size, std::string font = "");
WidgetText(int width, int height, std::string text,
WidgetText(int x, int y, int width, int height, std::string text,
TextFit fit, bool should_wrap,
int size, std::string font = "");
WidgetText(int width, int height, std::string text,
WidgetText(int x, int y, int width, int height, std::string text,
int size, std::string font = "");
void set_text(const std::string& text);