Fix panels forwarding clicks from anywhere
Very similar toab28f93753
. Broken by69e0a8b0aa
where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders AND apparently panels, great.
This commit is contained in:
parent
4b866c409a
commit
bb471e63e1
@ -113,6 +113,8 @@ void Panel::OnMouseClick(int localx, int localy, unsigned button)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Panel::OnMouseDown(int x, int y, unsigned button)
|
void Panel::OnMouseDown(int x, int y, unsigned button)
|
||||||
|
{
|
||||||
|
if (MouseDownInside)
|
||||||
{
|
{
|
||||||
auto localx = x - Position.X;
|
auto localx = x - Position.X;
|
||||||
auto localy = y - Position.Y;
|
auto localy = y - Position.Y;
|
||||||
@ -142,6 +144,7 @@ void Panel::OnMouseDown(int x, int y, unsigned button)
|
|||||||
children[i]->OnMouseDown(x - Position.X - ViewportPosition.X, y - Position.Y - ViewportPosition.Y, button);
|
children[i]->OnMouseDown(x - Position.X - ViewportPosition.X, y - Position.Y - ViewportPosition.Y, button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Panel::OnMouseHover(int localx, int localy)
|
void Panel::OnMouseHover(int localx, int localy)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user