Skip to content

Commit

Permalink
fix stuff up
Browse files Browse the repository at this point in the history
  • Loading branch information
BasiqueEvangelist committed Oct 4, 2023
1 parent 92ef210 commit d6bdcb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/io/wispforest/owo/ui/window/OwoWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/testmod/java/io/wispforest/uwu/client/UwuTestWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit d6bdcb0

Please sign in to comment.