mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
Fix slider scroll via UI buttons
This commit is contained in:
parent
85655d5534
commit
41755c9d87
@ -138,6 +138,10 @@ void CSlider::clickLeft(tribool down, bool previousState)
|
||||
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());
|
||||
scrollTo((int)(rw * positions + 0.5));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user