aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphics/Text.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/graphics/Text.cpp b/src/graphics/Text.cpp
index a30cdf3..e138a28 100644
--- a/src/graphics/Text.cpp
+++ b/src/graphics/Text.cpp
@@ -47,12 +47,20 @@ namespace mgl {
mgl_text_set_position(&text, {position.x, position.y});
}
+ vec2f Text::get_position() const {
+ return { text.position.x, text.position.y };
+ }
+
void Text::set_color(Color color) {
mgl_text_set_color(&text, {color.r, color.g, color.b, color.a});
}
- vec2f Text::get_position() const {
- return { text.position.x, text.position.y };
+ void Text::set_max_width(float max_width) {
+ mgl_text_set_max_width(&text, max_width);
+ }
+
+ void Text::set_max_rows(unsigned int max_rows) {
+ mgl_text_set_max_rows(&text, max_rows);
}
FloatRect Text::get_bounds() {