aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/helper/ClickDetector.h
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 /include/cru/ui/helper/ClickDetector.h
parent38b1268028d4d631de15ca85826c241e39c82675 (diff)
downloadcru-6315e654ce0be2d2cc148e9ff80f611ac1176348.tar.gz
cru-6315e654ce0be2d2cc148e9ff80f611ac1176348.tar.bz2
cru-6315e654ce0be2d2cc148e9ff80f611ac1176348.zip
Refactor Event.
Diffstat (limited to 'include/cru/ui/helper/ClickDetector.h')
-rw-r--r--include/cru/ui/helper/ClickDetector.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/cru/ui/helper/ClickDetector.h b/include/cru/ui/helper/ClickDetector.h
index eaf1f4af..2eb453d9 100644
--- a/include/cru/ui/helper/ClickDetector.h
+++ b/include/cru/ui/helper/ClickDetector.h
@@ -57,7 +57,7 @@ class ClickDetector : public Object {
// deactivated.
void SetTriggerButton(MouseButton trigger_button);
- IEvent<ClickEventArgs>* ClickEvent() { return &event_; }
+ IEvent<const ClickEventArgs&>* ClickEvent() { return &event_; }
IEvent<ClickState>* StateChangeEvent() { return &state_change_event_; }
@@ -72,10 +72,10 @@ class ClickDetector : public Object {
bool enable_ = true;
MouseButton trigger_button_ = MouseButtons::Left | MouseButtons::Right;
- Event<ClickEventArgs> event_;
+ Event<const ClickEventArgs&> event_;
Event<ClickState> state_change_event_;
- std::vector<EventRevokerGuard> event_rovoker_guards_;
+ std::vector<EventHandlerRevokerGuard> event_rovoker_guards_;
Point down_point_;
MouseButton button_;