aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WScrollBar.java6
1 files changed, 6 insertions, 0 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 cfcdfc1..500f312 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
@@ -214,6 +214,12 @@ public class WScrollBar extends WWidget {
}
}
+ @Environment(EnvType.CLIENT)
+ @Override
+ public void onMouseScroll(int x, int y, double amount) {
+ setValue(getValue() + (int) -amount);
+ }
+
public int getValue() {
return value;
}