mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-05 22:40:44 +09:00
Change text renderer to pango (supports all languages and loads font automatically), start on game detection
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
namespace gsr {
|
||||
class Label : public Widget {
|
||||
public:
|
||||
// TODO: Allow specifying max width, at which either a line-break should occur or elipses should show
|
||||
Label(mgl::Font *font, const char *text, mgl::Color color);
|
||||
Label(const char *font_desc, const char *text, mgl::Color color);
|
||||
Label(const Label&) = delete;
|
||||
Label& operator=(const Label&) = delete;
|
||||
|
||||
@@ -18,8 +17,14 @@ namespace gsr {
|
||||
|
||||
mgl::vec2f get_size() override;
|
||||
|
||||
void set_text(std::string str);
|
||||
const std::string& get_text() const;
|
||||
void set_text(std::string_view str);
|
||||
std::string_view get_text() const;
|
||||
|
||||
// Set to 0 to disable
|
||||
void set_wrap_width(int width);
|
||||
|
||||
// Set to 0 to disable
|
||||
void set_max_rows(int max_rows);
|
||||
private:
|
||||
mgl::Text text;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user