Skip to content

Commit

Permalink
Fix sliders accepting clicks from anywhere
Browse files Browse the repository at this point in the history
Broken by 69e0a8b where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders.
  • Loading branch information
LBPHacker committed Mar 3, 2024
1 parent a7e71db commit ab28f93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui/interface/Slider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab28f93

Please sign in to comment.