Fix sliders accepting clicks from anywhere

Broken by 69e0a8b0aa where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders.
This commit is contained in:
Tamás Bálint Misius 2024-03-03 19:35:10 +01:00
parent a7e71db9a0
commit ab28f93753
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -50,8 +50,11 @@ void Slider::OnMouseMoved(int x, int y)
void Slider::OnMouseDown(int x, int y, unsigned button)
{
isMouseDown = true;
updatePosition(x - Position.X);
if (MouseDownInside)
{
isMouseDown = true;
updatePosition(x - Position.X);
}
}
void Slider::OnMouseUp(int x, int y, unsigned button)