Skip to content

Commit

Permalink
Yeet sideways scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Nov 25, 2024
1 parent daba822 commit 43ecfe4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ public boolean charTyped(char codePoint, int modifiers) {
@Override
public boolean mouseScrolled(double mouseX, double mouseY, double xScroll, double yScroll) {
var multiplier = Screen.hasShiftDown() ? 10.0f : 1.0f;
if (allowScrolling && (xScroll > 0 || yScroll > 0)) {
if (allowScrolling && yScroll > 0) {
//Add 1 to the value
if (rotationTextField.canConsumeInput()) {
float nextValue = (rotationTextField.getFloat() + multiplier * rotationTextField.scrollMultiplier) % rotationTextField.modValue;
Expand Down Expand Up @@ -667,7 +667,7 @@ public boolean mouseScrolled(double mouseX, double mouseY, double xScroll, doubl
return true;
}
}
} else if (allowScrolling && (xScroll < 0 || yScroll < 0)) {
} else if (allowScrolling && yScroll < 0) {
//Remove 1 to the value
if (rotationTextField.canConsumeInput()) {
float previousValue = (rotationTextField.getFloat() - multiplier * rotationTextField.scrollMultiplier) % rotationTextField.modValue;
Expand Down

0 comments on commit 43ecfe4

Please # to comment.