aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 20:13:36 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 20:13:36 +0200
commitf77c856cdde7ec365be7c448f2dd8cc18d0f1f32 (patch)
tree8b39255f6af3c55a4ea5b93b9591da5c0011abcb /src/main/java/cc/polyfrost
parentef98c272d57161ea1de222fe4ee04ee701877b4f (diff)
downloadOneConfig-f77c856cdde7ec365be7c448f2dd8cc18d0f1f32.tar.gz
OneConfig-f77c856cdde7ec365be7c448f2dd8cc18d0f1f32.tar.bz2
OneConfig-f77c856cdde7ec365be7c448f2dd8cc18d0f1f32.zip
better reverse maybe idk
Diffstat (limited to 'src/main/java/cc/polyfrost')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java4
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/animations/Animation.java8
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;
}
/**