diff options
author | crupest <crupest@outlook.com> | 2020-03-19 19:45:26 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-03-19 19:45:26 +0800 |
commit | 507de8c6a931d0784c8f740d41db610d3ed8db68 (patch) | |
tree | 9f77d8e2b1b0955ff669677b4d5913a08075946a /src/ui/control.cpp | |
parent | 5da4f511e85de9e79bee40e3c5e04f899a48723c (diff) | |
download | cru-507de8c6a931d0784c8f740d41db610d3ed8db68.tar.gz cru-507de8c6a931d0784c8f740d41db610d3ed8db68.tar.bz2 cru-507de8c6a931d0784c8f740d41db610d3ed8db68.zip |
...
Diffstat (limited to 'src/ui/control.cpp')
-rw-r--r-- | src/ui/control.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/ui/control.cpp b/src/ui/control.cpp index 04d89b5f..e3b7b967 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -16,11 +16,15 @@ using platform::native::IUiApplication; using platform::native::SystemCursorType; Control::Control() { - MouseEnterEvent()->Direct()->AddHandler( - [this](event::MouseEventArgs&) { this->is_mouse_over_ = true; }); - - MouseLeaveEvent()->Direct()->AddHandler( - [this](event::MouseEventArgs&) { this->is_mouse_over_ = false; }); + MouseEnterEvent()->Direct()->AddHandler([this](event::MouseEventArgs&) { + this->is_mouse_over_ = true; + this->OnMouseHoverChange(true); + }); + + MouseLeaveEvent()->Direct()->AddHandler([this](event::MouseEventArgs&) { + this->is_mouse_over_ = false; + this->OnMouseHoverChange(true); + }); } void Control::_SetParent(Control* parent) { |