From 05da429433a4df2c2eb3ad42d2eb8c45c3fe9cb5 Mon Sep 17 00:00:00 2001 From: brandon3055 Date: Tue, 12 Nov 2024 20:02:30 +1100 Subject: [PATCH] Fix GUI scrolling --- .../java/codechicken/lib/gui/modular/elements/GuiSlider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/codechicken/lib/gui/modular/elements/GuiSlider.java b/src/main/java/codechicken/lib/gui/modular/elements/GuiSlider.java index 23f24d46..13abc8c5 100644 --- a/src/main/java/codechicken/lib/gui/modular/elements/GuiSlider.java +++ b/src/main/java/codechicken/lib/gui/modular/elements/GuiSlider.java @@ -256,7 +256,7 @@ private void handleDrag(double mouseX, double mouseY) { public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, double scrollY) { if (isMouseOver() || (scrollableElement != null && scrollableElement.isMouseOver())) { if (!state.canScroll(axis)) return false; - state.setPos(MathHelper.clip(state.getPos() + (state.scrollSpeed() * -scrollX), 0, 1)); + state.setPos(MathHelper.clip(state.getPos() + (state.scrollSpeed() * -scrollY), 0, 1)); return true; } return false;