diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-27 11:53:57 -0500 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-27 11:53:57 -0500 |
| commit | b09f774d422263ce15b97d6d0804beddf856176d (patch) | |
| tree | e542258481d7496b15679f3c329ef9e087c7d8fc /src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java | |
| parent | 22cb02adbeb24b7ec98f843bcaba99cebe3e4f03 (diff) | |
| download | notenoughupdates-b09f774d422263ce15b97d6d0804beddf856176d.tar.gz notenoughupdates-b09f774d422263ce15b97d6d0804beddf856176d.tar.bz2 notenoughupdates-b09f774d422263ce15b97d6d0804beddf856176d.zip | |
feat: improve formating :)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java index 3ea4d15d..75b66770 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/ScrollableInfoPane.java @@ -6,28 +6,28 @@ import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; import org.lwjgl.input.Mouse; public abstract class ScrollableInfoPane extends InfoPane { - private static final int SCROLL_AMOUNT = 50; - protected LerpingInteger scrollHeight = new LerpingInteger(0); + private static final int SCROLL_AMOUNT = 50; + protected LerpingInteger scrollHeight = new LerpingInteger(0); - public ScrollableInfoPane(NEUOverlay overlay, NEUManager manager) { - super(overlay, manager); - } + public ScrollableInfoPane(NEUOverlay overlay, NEUManager manager) { + super(overlay, manager); + } - public void tick() { - scrollHeight.tick(); - if (scrollHeight.getValue() < 0) scrollHeight.setValue(0); - } + public void tick() { + scrollHeight.tick(); + if (scrollHeight.getValue() < 0) scrollHeight.setValue(0); + } - @Override - public void mouseInput(int width, int height, int mouseX, int mouseY, boolean mouseDown) { - int dWheel = Mouse.getEventDWheel(); + @Override + public void mouseInput(int width, int height, int mouseX, int mouseY, boolean mouseDown) { + int dWheel = Mouse.getEventDWheel(); - if (dWheel < 0) { - scrollHeight.setTarget(scrollHeight.getTarget() + SCROLL_AMOUNT); - scrollHeight.resetTimer(); - } else if (dWheel > 0) { - scrollHeight.setTarget(scrollHeight.getTarget() - SCROLL_AMOUNT); - scrollHeight.resetTimer(); - } - } + if (dWheel < 0) { + scrollHeight.setTarget(scrollHeight.getTarget() + SCROLL_AMOUNT); + scrollHeight.resetTimer(); + } else if (dWheel > 0) { + scrollHeight.setTarget(scrollHeight.getTarget() - SCROLL_AMOUNT); + scrollHeight.resetTimer(); + } + } } |
