diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-09-10 22:18:18 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-09-10 22:18:18 +0200 |
commit | cb3ed21d9891a67f477b3bd62fa9be706941295f (patch) | |
tree | b3e5d1b2cc33a73db3847cd70d182216d750bab1 /include | |
parent | e16c6ed3dad61ad9b25344d5133c2223da422f6e (diff) |
Add Text::set_max_width and Text::set_max_rows
Diffstat (limited to 'include')
-rw-r--r-- | include/mglpp/graphics/Text.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mglpp/graphics/Text.hpp b/include/mglpp/graphics/Text.hpp index 5126eab..84782e8 100644 --- a/include/mglpp/graphics/Text.hpp +++ b/include/mglpp/graphics/Text.hpp @@ -22,9 +22,14 @@ namespace mgl { ~Text(); void set_position(vec2f position) override; - void set_color(Color color) override; vec2f get_position() const override; + void set_color(Color color) override; + // If |max_width| is 0 then the text has no max width + void set_max_width(float max_width); + // If |max_rows| is 0 then the text can display an unlimited amount of rows + void set_max_rows(unsigned int max_rows); + FloatRect get_bounds(); void set_string(std::string str); const std::string& get_string() const; |