aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu/text.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/menu/text.cpp b/src/menu/text.cpp
index 9cfc8218..3c95b42b 100644
--- a/src/menu/text.cpp
+++ b/src/menu/text.cpp
@@ -74,6 +74,8 @@ namespace usdx
bbox.get_point1().set_y(font->Ascender());
bbox.get_point2().set_y(font->Descender());
valign->align(offset, bbox, get_size());
+
+ // TODO: handle autosize (required for sensitive area)
}
void Text::draw(void)
@@ -132,5 +134,18 @@ namespace usdx
DrawableControl::set_size(width, height);
realign();
}
+
+ void Text::set_auto_size(const bool value)
+ {
+ auto_size = value;
+
+ set_clipping_required(!auto_size);
+ realign();
+ }
+
+ bool Text::get_auto_size(void) const
+ {
+ return auto_size;
+ }
};