diff options
author | crupest <crupest@outlook.com> | 2018-11-13 22:24:17 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-13 22:24:17 +0800 |
commit | 38a523be0085a9b529043bddc61e4aee04a6768d (patch) | |
tree | 4003c4795f111631f1df07e0b1fdd1c2b626b608 /src/ui/window.cpp | |
parent | 91dda866a0919f9e6cfb5e7857ac0466572d96d8 (diff) | |
download | cru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.gz cru-38a523be0085a9b529043bddc61e4aee04a6768d.tar.bz2 cru-38a523be0085a9b529043bddc61e4aee04a6768d.zip |
Add enhanced bound check.
Diffstat (limited to 'src/ui/window.cpp')
-rw-r--r-- | src/ui/window.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/window.cpp b/src/ui/window.cpp index 862267fc..39b574bd 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -473,6 +473,11 @@ namespace cru::ui } + bool Window::IsPointInside(const Point& point) + { + return Rect(Point::Zero(), GetClientSize()).IsPointInside(point); + } + void Window::WindowInvalidateLayout() { if (is_layout_invalid_) |