From cb3ed21d9891a67f477b3bd62fa9be706941295f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 10 Sep 2024 22:18:18 +0200 Subject: Add Text::set_max_width and Text::set_max_rows --- include/mglpp/graphics/Text.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3