aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/elements
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/elements
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/elements')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
index 71441e6..2ce7e98 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java
@@ -75,6 +75,7 @@ public class BasicButton extends BasicElement {
public void draw(long vg, int x, int y) {
this.x = x;
this.y = y;
+ this.update(x, y);
if (disabled) RenderManager.setAlpha(vg, 0.5f);
RenderManager.drawRoundedRect(vg, x, y, this.width, this.height, colorPalette == ColorPalette.TERTIARY || colorPalette == ColorPalette.TERTIARY_DESTRUCTIVE ? OneConfigConfig.TRANSPARENT : currentColor, this.cornerRadius);
float contentWidth = 0f;
@@ -123,7 +124,6 @@ public class BasicButton extends BasicElement {
if (icon2 != null)
RenderManager.drawSvg(vg, icon2, x + contentWidth, middleYIcon, iconSize, iconSize, color);
}
- this.update(x, y);
if (disabled) RenderManager.setAlpha(vg, 1f);
}