Extra callback for just mouse hover

This commit is contained in:
Simon Robertshaw 2012-05-23 19:31:01 +01:00
parent 2b2531a62a
commit 26eeb40541
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -20,6 +20,7 @@ class ButtonAction
{
public:
virtual void ActionCallback(ui::Button * sender) {}
virtual void MouseEnterCallback(ui::Button * sender) {}
virtual ~ButtonAction() {}
};