diff --git a/src/main/java/io/wispforest/owo/mixin/ui/HandledScreenMixin.java b/src/main/java/io/wispforest/owo/mixin/ui/HandledScreenMixin.java index 435b2f95..8fc57f01 100644 --- a/src/main/java/io/wispforest/owo/mixin/ui/HandledScreenMixin.java +++ b/src/main/java/io/wispforest/owo/mixin/ui/HandledScreenMixin.java @@ -92,14 +92,4 @@ private void closeIt(int keyCode, int scanCode, int modifiers, CallbackInfoRetur cir.setReturnValue(true); } } - - // Fixes issues with scrolling with screens extending Handled and using UIAdapter - @WrapMethod(method = "mouseScrolled") - private boolean owo$useSuperMouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount, Operation original){ - var bl = original.call(mouseX, mouseY, horizontalAmount, verticalAmount); - - if (bl) return true; - - return super.mouseScrolled(mouseX, mouseY, horizontalAmount, verticalAmount); - } } diff --git a/src/main/java/io/wispforest/owo/ui/base/BaseOwoHandledScreen.java b/src/main/java/io/wispforest/owo/ui/base/BaseOwoHandledScreen.java index 2eaaf5bb..84932278 100644 --- a/src/main/java/io/wispforest/owo/ui/base/BaseOwoHandledScreen.java +++ b/src/main/java/io/wispforest/owo/ui/base/BaseOwoHandledScreen.java @@ -205,6 +205,11 @@ public boolean mouseDragged(double mouseX, double mouseY, int button, double del return this.uiAdapter.mouseDragged(mouseX, mouseY, button, deltaX, deltaY) || super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY); } + @Override + public boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) { + return this.uiAdapter.mouseScrolled(mouseX, mouseY, horizontalAmount, verticalAmount) || super.mouseScrolled(mouseX, mouseY, horizontalAmount, verticalAmount); + } + @Nullable @Override public Element getFocused() {