aboutsummaryrefslogtreecommitdiff
path: root/src/ui/helper/ClickDetector.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-06 17:27:10 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-06 17:27:10 +0800
commit6315e654ce0be2d2cc148e9ff80f611ac1176348 (patch)
tree8232fedd7bbe87d635563e743e22781e20f83376 /src/ui/helper/ClickDetector.cpp
parent38b1268028d4d631de15ca85826c241e39c82675 (diff)
downloadcru-6315e654ce0be2d2cc148e9ff80f611ac1176348.tar.gz
cru-6315e654ce0be2d2cc148e9ff80f611ac1176348.tar.bz2
cru-6315e654ce0be2d2cc148e9ff80f611ac1176348.zip
Refactor Event.
Diffstat (limited to 'src/ui/helper/ClickDetector.cpp')
-rw-r--r--src/ui/helper/ClickDetector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/helper/ClickDetector.cpp b/src/ui/helper/ClickDetector.cpp
index 21caff35..cf219db0 100644
--- a/src/ui/helper/ClickDetector.cpp
+++ b/src/ui/helper/ClickDetector.cpp
@@ -23,7 +23,7 @@ ClickDetector::ClickDetector(controls::Control* control) {
control_ = control;
event_rovoker_guards_.push_back(
- EventRevokerGuard(control->MouseEnterEvent()->Direct()->AddHandler(
+ EventHandlerRevokerGuard(control->MouseEnterEvent()->Direct()->AddHandler(
[this](events::MouseEventArgs&) {
if (this->enable_) {
if (this->state_ == ClickState::PressInactive) {
@@ -37,7 +37,7 @@ ClickDetector::ClickDetector(controls::Control* control) {
})));
event_rovoker_guards_.push_back(
- EventRevokerGuard(control->MouseLeaveEvent()->Direct()->AddHandler(
+ EventHandlerRevokerGuard(control->MouseLeaveEvent()->Direct()->AddHandler(
[this](events::MouseEventArgs&) {
if (this->enable_) {
if (this->state_ == ClickState::Press) {
@@ -51,7 +51,7 @@ ClickDetector::ClickDetector(controls::Control* control) {
})));
event_rovoker_guards_.push_back(
- EventRevokerGuard(control->MouseDownEvent()->Direct()->AddHandler(
+ EventHandlerRevokerGuard(control->MouseDownEvent()->Direct()->AddHandler(
[this](events::MouseButtonEventArgs& args) {
const auto button = args.GetButton();
if (this->enable_ && (button & this->trigger_button_) &&
@@ -70,7 +70,7 @@ ClickDetector::ClickDetector(controls::Control* control) {
})));
event_rovoker_guards_.push_back(
- EventRevokerGuard(control->MouseUpEvent()->Direct()->AddHandler(
+ EventHandlerRevokerGuard(control->MouseUpEvent()->Direct()->AddHandler(
[this](events::MouseButtonEventArgs& args) {
const auto button = args.GetButton();
if (this->enable_ && (button & this->trigger_button_) &&