diff options
author | crupest <crupest@outlook.com> | 2018-12-10 23:29:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-12-10 23:29:54 +0800 |
commit | 769a4db24b64a2baf20960858ae24461328e5b7a (patch) | |
tree | ffdd7e84d820dae71fe2af801d5f8d57e93072b1 /src/ui/ui_base.hpp | |
parent | 4219992207b524e23a426e753589001b6f7a24d0 (diff) | |
download | cru-769a4db24b64a2baf20960858ae24461328e5b7a.tar.gz cru-769a4db24b64a2baf20960858ae24461328e5b7a.tar.bz2 cru-769a4db24b64a2baf20960858ae24461328e5b7a.zip |
...
Diffstat (limited to 'src/ui/ui_base.hpp')
-rw-r--r-- | src/ui/ui_base.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/ui_base.hpp b/src/ui/ui_base.hpp index b898b2ed..5350e4e9 100644 --- a/src/ui/ui_base.hpp +++ b/src/ui/ui_base.hpp @@ -188,6 +188,20 @@ namespace cru::ui float height = 0.0f; }; + constexpr bool operator==(const Rect& left, const Rect& right) + { + return left.left == right.left && + left.top == right.top && + left.width == right.width && + left.height == right.height; + } + + constexpr bool operator!=(const Rect& left, const Rect& right) + { + return !(left == right); + } + + enum class MouseButton { Left, |