diff options
Diffstat (limited to 'dggui/button_base.cc')
-rw-r--r-- | dggui/button_base.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dggui/button_base.cc b/dggui/button_base.cc index 4625b55..0cd7186 100644 --- a/dggui/button_base.cc +++ b/dggui/button_base.cc @@ -40,15 +40,15 @@ ButtonBase::~ButtonBase() { } -void ButtonBase::buttonEvent(ButtonEvent* buttonEvent) +void ButtonBase::buttonEvent(const ButtonEvent& buttonEvent) { // Ignore everything except left clicks. - if(!enabled || buttonEvent->button != MouseButton::left) + if(!enabled || buttonEvent.button != MouseButton::left) { return; } - if(buttonEvent->direction == Direction::down) + if(buttonEvent.direction == Direction::down) { draw_state = State::Down; button_state = State::Down; @@ -56,7 +56,7 @@ void ButtonBase::buttonEvent(ButtonEvent* buttonEvent) redraw(); } - if(buttonEvent->direction == Direction::up) + if(buttonEvent.direction == Direction::up) { draw_state = State::Up; button_state = State::Up; |