Skip to content

Commit

Permalink
Fix GUI scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon3055 committed Nov 12, 2024
1 parent 883120f commit 05da429
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05da429

Please sign in to comment.