aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-01 12:44:35 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-01 12:44:35 +0100
commit08c0d21db67f27aef7b3c03ec4ad05a78b932670 (patch)
tree1c5a8d2d93414c3b60e1589cd9ddb87fe08e8c29 /src/main/java/io/polyfrost/oneconfig
parent2f80fd07d3d6863c26bca21b46bd71cb467a2b1a (diff)
downloadOneConfig-08c0d21db67f27aef7b3c03ec4ad05a78b932670.tar.gz
OneConfig-08c0d21db67f27aef7b3c03ec4ad05a78b932670.tar.bz2
OneConfig-08c0d21db67f27aef7b3c03ec4ad05a78b932670.zip
-1 steps is not good
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig')
-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);