Slider Fix

This commit is contained in:
kirillsaint 2023-08-15 02:03:09 +06:00
parent 81f4ff0fd5
commit f39e97c6cb

View File

@ -176,7 +176,7 @@ public class ModSettings extends SilentScreen {
if (Slider.isDrag(mouseX, mouseY, x, settingY - 1, width) && (System.currentTimeMillis() - initTime) > 500) {
double diff = setting.getMax() - setting.getMin();
double mouse = MathHelper.clamp_double((mouseX - Slider.getLeft(x, width)) / 100D, 0, 1);
double mouse = MathHelper.clamp_double((mouseX - Slider.getLeft(x, width)) / 90D, 0, 1);
double newVal = setting.getMin() + mouse * diff;
if(newVal != setting.getValDouble()) {
setting.setValDouble(newVal);