Change text renderer to pango (supports all languages and loads font automatically), start on game detection

This commit is contained in:
dec05eba
2026-04-18 00:37:16 +02:00
parent 72c8c79896
commit 010787854e
39 changed files with 636 additions and 886 deletions

View File

@@ -12,7 +12,7 @@ namespace gsr {
public:
// If width is 0 then the width of the text is used instead (with padding).
// If height is 0 then the height of the text is used instead (with padding).
Button(mgl::Font *font, const char *text, mgl::vec2f size, mgl::Color bg_color);
Button(const char *font_desc, const char *text, mgl::vec2f size, mgl::Color bg_color);
Button(const Button&) = delete;
Button& operator=(const Button&) = delete;
@@ -25,8 +25,8 @@ namespace gsr {
void set_bg_hover_color(mgl::Color color);
void set_icon(mgl::Texture *texture);
const std::string& get_text() const;
void set_text(std::string str);
std::string_view get_text() const;
void set_text(std::string_view str);
std::function<void()> on_click;
private: