diff options
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java index c08e141..0eb7818 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java @@ -10,6 +10,8 @@ import io.github.cottonmc.cotton.gui.widget.data.Axis; import io.github.cottonmc.cotton.gui.widget.data.InputResult; public class WScrollBar extends WWidget { + private static final int SCROLLING_SPEED = 4; + protected Axis axis = Axis.HORIZONTAL; protected int value; protected int maxValue = 100; @@ -219,7 +221,7 @@ public class WScrollBar extends WWidget { @Environment(EnvType.CLIENT) @Override public InputResult onMouseScroll(int x, int y, double amount) { - setValue(getValue() + (int) -amount); + setValue(getValue() + (int) -amount * SCROLLING_SPEED); return InputResult.PROCESSED; } |