aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/gui')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/gui/elements/config/ConfigSlider.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/ConfigSlider.java b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/ConfigSlider.java
index 54df53e..27f2559 100644
--- a/src/main/java/io/polyfrost/oneconfig/gui/elements/config/ConfigSlider.java
+++ b/src/main/java/io/polyfrost/oneconfig/gui/elements/config/ConfigSlider.java
@@ -28,7 +28,8 @@ public class ConfigSlider extends BasicOption {
super(field, name, size);
this.min = min;
this.max = max;
- this.step = step - 1; // it adds one more step than actual
+ if(step > 0) this.step = step - 1; // it adds one more step than actual
+ else this.step = 0;
slideYBoi.setCustomHitbox(28, 8);
inputField.onlyAcceptNumbers(true);
inputField.setCentered(true);