diff options
Diffstat (limited to 'src/ui/ui_base.hpp')
-rw-r--r-- | src/ui/ui_base.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/ui_base.hpp b/src/ui/ui_base.hpp index c20d44b6..d9c9d0b2 100644 --- a/src/ui/ui_base.hpp +++ b/src/ui/ui_base.hpp @@ -91,6 +91,21 @@ namespace cru::ui return top + bottom; } + void SetLeftRight(const float value) + { + left = right = value; + } + + void SetTopBottom(const float value) + { + top = bottom = value; + } + + void SetAll(const float value) + { + left = top = right = bottom = value; + } + float Validate() const { return left >= 0.0 && top >= 0.0 && right >= 0.0 && bottom >= 0.0; |