mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix slider scroll via UI buttons
This commit is contained in:
@@ -138,6 +138,10 @@ void CSlider::clickLeft(tribool down, bool previousState)
|
|||||||
rw = pw / (pos.h-48);
|
rw = pw / (pos.h-48);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// click on area covered by buttons -> ignore, will be handled by left/right buttons
|
||||||
|
if (!vstd::iswithin(rw, 0, 1))
|
||||||
|
return;
|
||||||
|
|
||||||
slider->clickLeft(true, slider->isMouseLeftButtonPressed());
|
slider->clickLeft(true, slider->isMouseLeftButtonPressed());
|
||||||
scrollTo((int)(rw * positions + 0.5));
|
scrollTo((int)(rw * positions + 0.5));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user