From d6bdcb00e72e4a49aa511528a5c4b3af634a7194 Mon Sep 17 00:00:00 2001 From: Basique Date: Wed, 4 Oct 2023 23:39:16 +0300 Subject: [PATCH] fix stuff up --- src/main/java/io/wispforest/owo/ui/window/OwoWindow.java | 6 ++++-- .../java/io/wispforest/uwu/client/UwuTestWindow.java | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/wispforest/owo/ui/window/OwoWindow.java b/src/main/java/io/wispforest/owo/ui/window/OwoWindow.java index 9dd77c3b..edfead01 100644 --- a/src/main/java/io/wispforest/owo/ui/window/OwoWindow.java +++ b/src/main/java/io/wispforest/owo/ui/window/OwoWindow.java @@ -53,9 +53,11 @@ public OwoWindow(int width, int height, String name, long parentContext) { } }); mouseScrolled().subscribe((xOffset, yOffset) -> { - double amount = (client.options.getDiscreteMouseScroll().getValue() ? Math.signum(yOffset) : yOffset) + double yAmount = (client.options.getDiscreteMouseScroll().getValue() ? Math.signum(yOffset) : yOffset) * client.options.getMouseWheelSensitivity().getValue(); - adapter.mouseScrolled(mouseX, mouseY, amount); + double xAmount = (client.options.getDiscreteMouseScroll().getValue() ? Math.signum(xOffset) : xOffset) + * client.options.getMouseWheelSensitivity().getValue(); + adapter.mouseScrolled(mouseX, mouseY, xAmount, yAmount); }); keyPressed().subscribe((keyCode, scanCode, modifiers, released) -> { if (released) return; diff --git a/src/testmod/java/io/wispforest/uwu/client/UwuTestWindow.java b/src/testmod/java/io/wispforest/uwu/client/UwuTestWindow.java index 44a90963..fe5c6270 100644 --- a/src/testmod/java/io/wispforest/uwu/client/UwuTestWindow.java +++ b/src/testmod/java/io/wispforest/uwu/client/UwuTestWindow.java @@ -52,6 +52,10 @@ protected void build(FlowLayout rootComponent) { component.effect(RenderEffectWrapper.RenderEffect.color(Color.BLUE)); })); + for (int i = 0; i < 100; i++) { + inner.child(Components.label(Text.of("breh!"))); + } + inner .child(textbox .margins(Insets.vertical(5)))