aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 20:06:36 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-01 20:06:36 +0200
commitef98c272d57161ea1de222fe4ee04ee701877b4f (patch)
tree368d63b62b0cd04b179350d7477eacedf19917be /src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
parent18ddce4242a5a68bef111f9bce43b6c3f3a45ce6 (diff)
downloadOneConfig-ef98c272d57161ea1de222fe4ee04ee701877b4f.tar.gz
OneConfig-ef98c272d57161ea1de222fe4ee04ee701877b4f.tar.bz2
OneConfig-ef98c272d57161ea1de222fe4ee04ee701877b4f.zip
sidebar and animation stuff
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
index 7ca3e31..02cb5de 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/SideBar.java
@@ -3,6 +3,7 @@ package cc.polyfrost.oneconfig.gui;
import cc.polyfrost.oneconfig.config.OneConfigConfig;
import cc.polyfrost.oneconfig.gui.animations.Animation;
import cc.polyfrost.oneconfig.gui.animations.EaseInOutQuart;
+import cc.polyfrost.oneconfig.gui.animations.EaseInQuartReversed;
import cc.polyfrost.oneconfig.gui.elements.BasicButton;
import cc.polyfrost.oneconfig.gui.pages.CreditsPage;
import cc.polyfrost.oneconfig.gui.pages.ModsPage;
@@ -34,6 +35,7 @@ public class SideBar {
private int selected = 2;
private Animation moveAnimation = null;
+ private Animation sizeAnimation = null;
public SideBar() {
buttons.get(0).setClickAction(new CreditsPage());
@@ -52,10 +54,11 @@ public class SideBar {
if (button.equals(buttons.get(selected))) break;
buttons.get(selected).setColorPalette(ColorPalette.TERTIARY);
moveAnimation = new EaseInOutQuart(300, buttons.get(selected).y, button.y, false);
+ sizeAnimation = new EaseInQuartReversed(300, 36, 54, false);
selected = buttons.indexOf(button);
}
if (moveAnimation != null) {
- RenderManager.drawRoundedRect(vg, x + 16, moveAnimation.get(), 192, 36, OneConfigConfig.PRIMARY_600, 12);
+ RenderManager.drawRoundedRect(vg, x + 16, moveAnimation.get(), 192, sizeAnimation.get(), OneConfigConfig.PRIMARY_600, 12);
if (moveAnimation.isFinished()) {
moveAnimation = null;
buttons.get(selected).setColorPalette(ColorPalette.PRIMARY);