diff options
Diffstat (limited to 'src/main/java')
3 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java index 078a2d7..0558799 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java @@ -40,6 +40,10 @@ public class SideBar { buttons.get(2).setClickAction(new ModsPage()); HUDButton.setClickAction(() -> GuiUtils.displayScreen(new HudGui())); CloseButton.setClickAction(GuiUtils::closeScreen); + for (int i = 0; i < buttons.size(); i++) { + if (i == 0 || i == 2) continue; + buttons.get(i).disable(true); + } } public void draw(long vg, int x, int y) { diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java b/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java index df0ad68..14e802f 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java @@ -17,7 +17,7 @@ public class EaseInOutQuad extends Animation{ */ @Override protected float animate(long timePassed, int duration, float start, float change) { - if ((timePassed /= (double) duration / 2) < 1) return change / 2 * timePassed * timePassed + start;; + if ((timePassed /= duration / 2) < 1) return change / 2 * timePassed * timePassed + start;; return -change / 2 * ((--timePassed) * (timePassed - 2) - 1) + start; } } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuart.java b/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuart.java index cb69e64..55c1cad 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuart.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuart.java @@ -17,7 +17,7 @@ public class EaseInOutQuart extends Animation{ */ @Override protected float animate(long timePassed, int duration, float start, float change) { - if ((timePassed /= (double) duration / 2) < 1) return change / 2 * timePassed * timePassed * timePassed * timePassed + start; + if ((timePassed /= duration / 2) < 1) return change / 2 * timePassed * timePassed * timePassed * timePassed + start; return -change / 2 * ((timePassed -= 2) * timePassed * timePassed * timePassed - 2) + start; } } |