diff options
author | crupest <crupest@outlook.com> | 2018-09-22 22:26:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-22 22:26:56 +0800 |
commit | dc293cef8f25ba70c5d99d73aa472277484ca879 (patch) | |
tree | 2351ba305d9a472716a55ef8488c83b5cd9048c8 /CruUI/ui/ui_base.h | |
parent | 9e66244ee15aff263716441c54d3cc53f27cddc4 (diff) | |
download | cru-dc293cef8f25ba70c5d99d73aa472277484ca879.tar.gz cru-dc293cef8f25ba70c5d99d73aa472277484ca879.tar.bz2 cru-dc293cef8f25ba70c5d99d73aa472277484ca879.zip |
Add MarginContainer.
Diffstat (limited to 'CruUI/ui/ui_base.h')
-rw-r--r-- | CruUI/ui/ui_base.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CruUI/ui/ui_base.h b/CruUI/ui/ui_base.h index 17e1bda9..c9ae6017 100644 --- a/CruUI/ui/ui_base.h +++ b/CruUI/ui/ui_base.h @@ -108,11 +108,19 @@ namespace cru struct Thickness { + constexpr static Thickness Zero() + { + return Thickness(0); + } + constexpr Thickness() : Thickness(0) { } constexpr explicit Thickness(const float width) : left(width), top(width), right(width), bottom(width) { } + constexpr explicit Thickness(const float horizontal, const float vertical) + : left(horizontal), top(vertical), right(horizontal), bottom(vertical) { } + constexpr Thickness(const float left, const float top, const float right, const float bottom) : left(left), top(top), right(right), bottom(bottom) { } |