mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Fix weird behaviour of options menu sliders when value was changed out of bounds via cfg file
This commit is contained in:
parent
dec9ffdb6c
commit
d3554084ad
@ -136,6 +136,7 @@ namespace MWGui
|
||||
float min,max;
|
||||
getSettingMinMax(scroll, min, max);
|
||||
float value = Settings::Manager::getFloat(getSettingName(current), getSettingCategory(current));
|
||||
value = std::max(min, std::min(value, max));
|
||||
value = (value-min)/(max-min);
|
||||
|
||||
scroll->setScrollPosition( value * (scroll->getScrollRange()-1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user