mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Extra callback for just mouse hover
This commit is contained in:
@@ -136,7 +136,10 @@ void Button::OnMouseClick(int x, int y, unsigned int button)
|
|||||||
|
|
||||||
void Button::OnMouseEnter(int x, int y)
|
void Button::OnMouseEnter(int x, int y)
|
||||||
{
|
{
|
||||||
isMouseInside = true;
|
if(!Enabled)
|
||||||
|
return;
|
||||||
|
if(actionCallback)
|
||||||
|
actionCallback->MouseEnterCallback(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::OnMouseLeave(int x, int y)
|
void Button::OnMouseLeave(int x, int y)
|
||||||
|
@@ -20,6 +20,7 @@ class ButtonAction
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void ActionCallback(ui::Button * sender) {}
|
virtual void ActionCallback(ui::Button * sender) {}
|
||||||
|
virtual void MouseEnterCallback(ui::Button * sender) {}
|
||||||
virtual ~ButtonAction() {}
|
virtual ~ButtonAction() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user