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/iconbutton.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/ui/iconbutton.h') diff --git a/src/ui/iconbutton.h b/src/ui/iconbutton.h index c9a7c5b..a7aee39 100644 --- a/src/ui/iconbutton.h +++ b/src/ui/iconbutton.h @@ -51,14 +51,15 @@ public: /// print button description virtual void print(const size_t indent) const; - /// called when the mouse enters the widget + /** + * @brief mouse over event handler + * */ virtual void on_mouseover(const math::Vector2f &cursor); - /// called when the widget receives a key press - virtual bool on_keypress(const int key, const unsigned int modifier); - - /// called when the widget receives a key release - virtual bool on_keyrelease(const int key, const unsigned int modifier); + /** + * @brief mouse button press event handler + * */ + virtual bool on_mousepress(const unsigned int button); protected: /// draw the button border -- cgit v1.2.3