diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-03-25 21:42:57 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:52 +0100 |
commit | 49f0201931d39c10bcca7c61c44d3880d6e92d52 (patch) | |
tree | aed8f07a71747a0ad67b594d5b362c1744da9c20 /src | |
parent | 7f84fb7d973610efcac140053c41582bb0bca02d (diff) | |
download | usdx-49f0201931d39c10bcca7c61c44d3880d6e92d52.tar.gz usdx-49f0201931d39c10bcca7c61c44d3880d6e92d52.tar.xz usdx-49f0201931d39c10bcca7c61c44d3880d6e92d52.zip |
menu/text: realign on size change of control
Diffstat (limited to 'src')
-rw-r--r-- | src/menu/text.cpp | 12 | ||||
-rw-r--r-- | src/menu/text.hpp | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/menu/text.cpp b/src/menu/text.cpp index 301cc62b..39df2e06 100644 --- a/src/menu/text.cpp +++ b/src/menu/text.cpp @@ -106,5 +106,17 @@ namespace usdx { return text; } + + void Text::set_size(const Dimension<int>& size) + { + DrawableControl::set_size(size); + realign(); + } + + void Text::set_size(int width, int height) + { + DrawableControl::set_size(width, height); + realign(); + } }; diff --git a/src/menu/text.hpp b/src/menu/text.hpp index 7ec0dade..b172b2c3 100644 --- a/src/menu/text.hpp +++ b/src/menu/text.hpp @@ -97,6 +97,9 @@ namespace usdx void set_text(const std::string value); std::string get_text(void) const; + + virtual void set_size(const Dimension<int>& size); + virtual void set_size(int width, int height); }; }; |