aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java4
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 ea23953..e4738f6 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;
@@ -221,7 +223,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;
}