diff options
author | crupest <crupest@outlook.com> | 2021-02-28 00:22:34 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-28 00:22:34 +0800 |
commit | 4b78e0b74f70bca2e24dc89b4fdca4dc9222c8b9 (patch) | |
tree | 257971a08ccb6bba0fa30857e0fcbd07902a0c91 /src/ui/events | |
parent | 4a0c86d94a06e72be0988062d49a19c05142434a (diff) | |
download | cru-4b78e0b74f70bca2e24dc89b4fdca4dc9222c8b9.tar.gz cru-4b78e0b74f70bca2e24dc89b4fdca4dc9222c8b9.tar.bz2 cru-4b78e0b74f70bca2e24dc89b4fdca4dc9222c8b9.zip |
...
Diffstat (limited to 'src/ui/events')
-rw-r--r-- | src/ui/events/UiEvent.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/events/UiEvent.cpp b/src/ui/events/UiEvent.cpp index b35f15a7..4c75f690 100644 --- a/src/ui/events/UiEvent.cpp +++ b/src/ui/events/UiEvent.cpp @@ -3,6 +3,10 @@ #include "cru/ui/render/RenderObject.hpp" namespace cru::ui::event { +Point MouseEventArgs::GetPoint(render::RenderObject* render_object) const { + return GetPoint() - render_object->GetTotalOffset(); +} + Point MouseEventArgs::GetPointToContent( render::RenderObject* render_object) const { return render_object->FromRootToContent(GetPoint()); |