diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java | 4 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java index 169aef0..6e9c1a5 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java @@ -127,14 +127,14 @@ public class OneConfigGui extends UScreen { if (backArrow.isClicked() && previousPages.size() > 0) { try { nextPages.add(0, currentPage); - openPage(previousPages.get(0), new EaseInOutQuad(300, 224, 2128, false), true); + openPage(previousPages.get(0), false); previousPages.remove(0); } catch (Exception ignored) { } } else if (forwardArrow.isClicked() && nextPages.size() > 0) { try { previousPages.add(0, currentPage); - openPage(nextPages.get(0), false); + openPage(nextPages.get(0), new EaseInOutQuad(300, 224, 2128, true), false); nextPages.remove(0); } catch (Exception ignored) { } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java index d8d672d..ebb9145 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java @@ -16,9 +16,13 @@ public abstract class Animation { */ public Animation(float duration, float start, float end, boolean reverse) { this.duration = duration; + if (reverse) { + float temp = start; + start = end; + end = temp; + } this.start = start; - if (!reverse) this.change = end - start; - else this.change = start - end; + this.change = end - start; } /** |