Fix slight issues when clicking on menu section buttons and missing isMouseInside in MouseEnter action for buttons
This commit is contained in:
parent
f1953603c0
commit
f41ab864ef
@ -242,6 +242,10 @@ public:
|
|||||||
{
|
{
|
||||||
v->c->SetActiveMenu(menu);
|
v->c->SetActiveMenu(menu);
|
||||||
}
|
}
|
||||||
|
void ActionCallback(ui::Button * sender)
|
||||||
|
{
|
||||||
|
MouseEnterCallback(sender);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class GameView::ToolAction: public ui::ButtonAction
|
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)
|
void Button::OnMouseEnter(int x, int y)
|
||||||
{
|
{
|
||||||
|
isMouseInside = true;
|
||||||
if(!Enabled)
|
if(!Enabled)
|
||||||
return;
|
return;
|
||||||
if(actionCallback)
|
if(actionCallback)
|
||||||
actionCallback->MouseEnterCallback(this);
|
actionCallback->MouseEnterCallback(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Button::OnMouseLeave(int x, int y)
|
void Button::OnMouseLeave(int x, int y)
|
||||||
{
|
{
|
||||||
isMouseInside = false;
|
isMouseInside = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user