diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-23 18:31:01 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-05-23 18:31:01 (GMT) |
| commit | 26eeb40541659a42507fcb444904f15dc19d54db (patch) | |
| tree | 142200541d419cad3df98ba367a7332303f69a2c /src/interface | |
| parent | 2b2531a62a12e977e6f7f64afed2c4a8d242c7c5 (diff) | |
| download | powder-26eeb40541659a42507fcb444904f15dc19d54db.zip powder-26eeb40541659a42507fcb444904f15dc19d54db.tar.gz | |
Extra callback for just mouse hover
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/Button.cpp | 5 | ||||
| -rw-r--r-- | src/interface/Button.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 32d8ef6..a7aa387 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -136,7 +136,10 @@ void Button::OnMouseClick(int x, int y, unsigned int button) void Button::OnMouseEnter(int x, int y) { - isMouseInside = true; + if(!Enabled) + return; + if(actionCallback) + actionCallback->MouseEnterCallback(this); } void Button::OnMouseLeave(int x, int y) diff --git a/src/interface/Button.h b/src/interface/Button.h index 61430ad..19f7fe7 100644 --- a/src/interface/Button.h +++ b/src/interface/Button.h @@ -20,6 +20,7 @@ class ButtonAction { public: virtual void ActionCallback(ui::Button * sender) {} + virtual void MouseEnterCallback(ui::Button * sender) {} virtual ~ButtonAction() {} }; |
