From 72ee43e9470c6fdbc6ed7ff92b85dfa5062c5762 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 6 Jan 2015 18:51:37 +0000 Subject: Added separate event handlers for mouse button clicks and mouse wheel movement. --- src/ui/listitem.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/listitem.cc') diff --git a/src/ui/listitem.cc b/src/ui/listitem.cc index d7c3f1e..ad821ed 100644 --- a/src/ui/listitem.cc +++ b/src/ui/listitem.cc @@ -70,9 +70,9 @@ void ListItem::on_mouseover(const math::Vector2f &cursor) } } -bool ListItem::on_keypress(const int key, const unsigned int modifier) +bool ListItem::on_mousepress(const unsigned int button) { - if (key == 512 + SDL_BUTTON_LEFT) { + if (button == SDL_BUTTON_LEFT) { //audio::play("ui/button"); emit(EventListItemClicked); -- cgit v1.2.3