mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-13 02:51:33 +01:00
Slider Fix
This commit is contained in:
parent
81f4ff0fd5
commit
f39e97c6cb
@ -176,7 +176,7 @@ public class ModSettings extends SilentScreen {
|
|||||||
|
|
||||||
if (Slider.isDrag(mouseX, mouseY, x, settingY - 1, width) && (System.currentTimeMillis() - initTime) > 500) {
|
if (Slider.isDrag(mouseX, mouseY, x, settingY - 1, width) && (System.currentTimeMillis() - initTime) > 500) {
|
||||||
double diff = setting.getMax() - setting.getMin();
|
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;
|
double newVal = setting.getMin() + mouse * diff;
|
||||||
if(newVal != setting.getValDouble()) {
|
if(newVal != setting.getValDouble()) {
|
||||||
setting.setValDouble(newVal);
|
setting.setValDouble(newVal);
|
||||||
|
Loading…
Reference in New Issue
Block a user