From e48cd4479f832cdd341ab0a289d1b4a88ab21a3c Mon Sep 17 00:00:00 2001 From: nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> Date: Wed, 1 Jun 2022 17:37:49 +0100 Subject: OC-53 should be done but had to push + color utils changed again --- .../polyfrost/oneconfig/gui/elements/BasicElement.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java') diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java index 8b86827..93e2c07 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicElement.java @@ -1,27 +1,29 @@ package cc.polyfrost.oneconfig.gui.elements; import cc.polyfrost.oneconfig.lwjgl.RenderManager; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; +import cc.polyfrost.oneconfig.utils.color.ColorUtils; import cc.polyfrost.oneconfig.utils.InputUtils; +import org.jetbrains.annotations.NotNull; public class BasicElement { protected int width, height; - protected int colorPalette; + protected ColorPalette colorPalette; protected int hitBoxX, hitBoxY; protected boolean hoverFx; protected boolean hovered = false; protected boolean clicked = false; protected boolean toggled = false; protected boolean disabled = false; - protected int currentColor; + public int currentColor; protected final float radius; private boolean block = false; - public BasicElement(int width, int height, int colorPalette, boolean hoverFx) { + public BasicElement(int width, int height, @NotNull ColorPalette colorPalette, boolean hoverFx) { this(width, height, colorPalette, hoverFx, 12f); } - public BasicElement(int width, int height, int colorPalette, boolean hoverFx, float radius) { + public BasicElement(int width, int height, @NotNull ColorPalette colorPalette, boolean hoverFx, float radius) { this.height = height; this.width = width; this.colorPalette = colorPalette; @@ -30,7 +32,7 @@ public class BasicElement { } public BasicElement(int width, int height, boolean hoverFx) { - this(width, height, ColorUtils.TRANSPARENT, hoverFx, 12f); + this(width, height, ColorPalette.TRANSPARENT, hoverFx, 12f); } @@ -80,7 +82,7 @@ public class BasicElement { this.height = height; } - public void setColorPalette(int colorPalette) { + public void setColorPalette(ColorPalette colorPalette) { this.colorPalette = colorPalette; } -- cgit