aboutsummaryrefslogtreecommitdiff
path: root/CruUI/ui/events/ui_event.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-01 23:28:28 +0800
committercrupest <crupest@outlook.com>2018-09-01 23:28:28 +0800
commit956a401f9c955f26b7e661dc80f76bfc43fc4124 (patch)
tree8af088933c7bc08942478daddd55c92de8668359 /CruUI/ui/events/ui_event.cpp
downloadcru-956a401f9c955f26b7e661dc80f76bfc43fc4124.tar.gz
cru-956a401f9c955f26b7e661dc80f76bfc43fc4124.tar.bz2
cru-956a401f9c955f26b7e661dc80f76bfc43fc4124.zip
Initial commit
Diffstat (limited to 'CruUI/ui/events/ui_event.cpp')
-rw-r--r--CruUI/ui/events/ui_event.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/CruUI/ui/events/ui_event.cpp b/CruUI/ui/events/ui_event.cpp
new file mode 100644
index 00000000..59623bab
--- /dev/null
+++ b/CruUI/ui/events/ui_event.cpp
@@ -0,0 +1,19 @@
+#include "ui_event.h"
+
+#include "ui/control.h"
+
+namespace cru
+{
+ namespace ui
+ {
+ namespace events
+ {
+ Point MouseEventArgs::GetPoint(Control* control) const
+ {
+ if (point_.has_value())
+ return control->AbsoluteToLocal(point_.value());
+ return Point();
+ }
+ }
+ }
+}