Added ability to choose type of text alignment

This commit is contained in:
2025-12-08 17:28:49 +02:00
parent 9f8a037f69
commit 82c35a6636
2 changed files with 40 additions and 4 deletions

View File

@@ -40,10 +40,19 @@ protected:
// Default - black
SDL_Color m_text_color;
// Whether to H-align via visible pixels or rendering surface
// Default - true
bool m_halign_via_visible;
// Whether to V-align via visible pixels or rendering surface
// Default - true
bool m_valign_via_visible;
public:
WidgetText(int x, int y, int width, int height, std::string text,
TextFit fit, bool should_wrap,
HorizontalAlign halign, VerticalAlign valign,
bool halign_via_visible, bool valign_via_visible,
SDL_Color text_color,
int size, std::string font = "");