From ab28f93753e36b84d94f1583543d4ec772928f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Sun, 3 Mar 2024 19:35:10 +0100 Subject: [PATCH] Fix sliders accepting clicks from anywhere Broken by 69e0a8b0aaa1 where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders. --- src/gui/interface/Slider.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/interface/Slider.cpp b/src/gui/interface/Slider.cpp index 673e6b7eb..1e42bcfa6 100644 --- a/src/gui/interface/Slider.cpp +++ b/src/gui/interface/Slider.cpp @@ -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)