mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-19 22:51:30 +02:00
Fix slight issues when clicking on menu section buttons and missing isMouseInside in MouseEnter action for buttons
This commit is contained in:
@@ -242,6 +242,10 @@ public:
|
||||
{
|
||||
v->c->SetActiveMenu(menu);
|
||||
}
|
||||
void ActionCallback(ui::Button * sender)
|
||||
{
|
||||
MouseEnterCallback(sender);
|
||||
}
|
||||
};
|
||||
|
||||
class GameView::ToolAction: public ui::ButtonAction
|
||||
|
@@ -136,12 +136,14 @@ 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)
|
||||
{
|
||||
isMouseInside = false;
|
||||
|
Reference in New Issue
Block a user