aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 18:51:21 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 18:51:21 +0200
commit53494fad20feed812735b36dea31c6b0656bb104 (patch)
treed7323c793d960c824ae3e10396f92a2f672a1873 /src
parentb722c1eff0bda4de2c15d451423367cf2be2f15a (diff)
downloadOneConfig-53494fad20feed812735b36dea31c6b0656bb104.tar.gz
OneConfig-53494fad20feed812735b36dea31c6b0656bb104.tar.bz2
OneConfig-53494fad20feed812735b36dea31c6b0656bb104.zip
temp
Diffstat (limited to 'src')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java4
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuad.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/animations/EaseInOutQuart.java2
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;
}
}