diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-01 17:37:49 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-06-01 17:37:49 +0100 |
commit | e48cd4479f832cdd341ab0a289d1b4a88ab21a3c (patch) | |
tree | 01f38d4575287612f1720b6f1f294ea91d15e617 /src/main/java/cc/polyfrost/oneconfig/gui/elements | |
parent | d109fac644fb9be7424f35fa24eb0ad32331e799 (diff) | |
download | OneConfig-e48cd4479f832cdd341ab0a289d1b4a88ab21a3c.tar.gz OneConfig-e48cd4479f832cdd341ab0a289d1b4a88ab21a3c.tar.bz2 OneConfig-e48cd4479f832cdd341ab0a289d1b4a88ab21a3c.zip |
OC-53 should be done but had to push + color utils changed again
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements')
12 files changed, 59 insertions, 54 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 f8edf78..8166883 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/BasicButton.java @@ -6,7 +6,9 @@ import cc.polyfrost.oneconfig.gui.pages.Page; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; +import cc.polyfrost.oneconfig.utils.color.ColorUtils; +import org.jetbrains.annotations.NotNull; import org.lwjgl.input.Mouse; @@ -14,7 +16,7 @@ public class BasicButton extends BasicElement { protected String text; protected SVGs icon1, icon2; - private final int alignment, colorPalette; + private final int alignment; private final float fontSize, cornerRadius; private final int xSpacing, xPadding; private final int iconSize; @@ -29,15 +31,17 @@ public class BasicButton extends BasicElement { public static final int SIZE_36 = 36; public static final int SIZE_40 = 40; public static final int SIZE_48 = 48; + + public static final int CUSTOM_COLOR = -100; private boolean toggleable = false; private Page page; private Runnable runnable; - public BasicButton(int width, int size, String text, int align, int colorPalette) { + public BasicButton(int width, int size, String text, int align, @NotNull ColorPalette colorPalette) { this(width, size, text, null, null, align, colorPalette); } - public BasicButton(int width, int size, String text, SVGs icon1, SVGs icon2, int align, int colorPalette) { + public BasicButton(int width, int size, String text, SVGs icon1, SVGs icon2, int align, @NotNull ColorPalette colorPalette) { super(width, 32, colorPalette, true); if (text != null) this.text = text; if (icon1 != null) this.icon1 = icon1; @@ -54,7 +58,7 @@ public class BasicButton extends BasicElement { this.fontSize = size == SIZE_48 ? 20 : (float) (size / 2 - 4); } - public BasicButton(int width, int size, SVGs icon, int align, int colorPalette) { + public BasicButton(int width, int size, SVGs icon, int align, @NotNull ColorPalette colorPalette) { this(width, size, null, icon, null, align, colorPalette); } @@ -74,19 +78,16 @@ public class BasicButton extends BasicElement { public void draw(long vg, int x, int y) { this.x = x; this.y = y; - RenderManager.drawRoundedRect(vg, x, y, this.width, this.height, currentColor, this.cornerRadius); + RenderManager.drawRoundedRect(vg, x, y, this.width, this.height, colorPalette == ColorPalette.TERTIARY || colorPalette == ColorPalette.TERTIARY_DESTRUCTIVE ? OneConfigConfig.TRANSPARENT : currentColor, this.cornerRadius); float contentWidth = 0f; int color = -1; + if(colorPalette == ColorPalette.TERTIARY || colorPalette == ColorPalette.TERTIARY_DESTRUCTIVE) { + color = currentColor; + } final float middle = x + width / 2f; final float middleYIcon = y + height / 2f - iconSize / 2f; final float middleYText = y + height / 2f + fontSize / 8f; if (this.text != null) { - if (this.colorPalette == ColorUtils.TERTIARY) { - color = OneConfigConfig.WHITE_80; - if (hovered) color = OneConfigConfig.WHITE; - if (clicked) color = OneConfigConfig.WHITE_80; - if (page == null) color = OneConfigConfig.WHITE_50; - } contentWidth += RenderManager.getTextWidth(vg, text, fontSize, Fonts.MEDIUM); } if (alignment == ALIGNMENT_CENTER) { @@ -177,10 +178,6 @@ public class BasicButton extends BasicElement { public void update(int x, int y) { super.update(x, y); if (hoverFx) { - if (colorPalette == ColorUtils.TERTIARY) { - currentColor = OneConfigConfig.TRANSPARENT; - return; - } if (!toggleable) { currentColor = ColorUtils.getColor(currentColor, colorPalette, hovered, hovered && Mouse.isButtonDown(0)); } else { 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; } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java index edd145e..8cc8165 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java @@ -11,7 +11,7 @@ import cc.polyfrost.oneconfig.lwjgl.image.Images; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; import cc.polyfrost.oneconfig.utils.InputUtils; import cc.polyfrost.oneconfig.utils.MathUtils; import cc.polyfrost.oneconfig.utils.NetworkUtils; @@ -31,11 +31,11 @@ public class ColorSelector { private final ArrayList<BasicElement> buttons = new ArrayList<>(); private final BasicElement closeBtn = new BasicElement(32, 32, false); - private final BasicButton copyBtn = new BasicButton(32, 32, SVGs.COPY, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY); - private final BasicButton pasteBtn = new BasicButton(32, 32, SVGs.PASTE, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY); - private final BasicButton guideBtn = new BasicButton(112, 32, "Guide", SVGs.HELP_CIRCLE, SVGs.POP_OUT, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY); - private final BasicButton faveBtn = new BasicButton(32, 32, SVGs.HEART_OUTLINE, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY); - private final BasicButton recentBtn = new BasicButton(32, 32, SVGs.HISTORY, BasicButton.ALIGNMENT_CENTER, ColorUtils.SECONDARY); + private final BasicButton copyBtn = new BasicButton(32, 32, SVGs.COPY, BasicButton.ALIGNMENT_CENTER, ColorPalette.SECONDARY); + private final BasicButton pasteBtn = new BasicButton(32, 32, SVGs.PASTE, BasicButton.ALIGNMENT_CENTER, ColorPalette.SECONDARY); + private final BasicButton guideBtn = new BasicButton(112, 32, "Guide", SVGs.HELP_CIRCLE, SVGs.POP_OUT, BasicButton.ALIGNMENT_CENTER, ColorPalette.SECONDARY); + private final BasicButton faveBtn = new BasicButton(32, 32, SVGs.HEART_OUTLINE, BasicButton.ALIGNMENT_CENTER, ColorPalette.SECONDARY); + private final BasicButton recentBtn = new BasicButton(32, 32, SVGs.HISTORY, BasicButton.ALIGNMENT_CENTER, ColorPalette.SECONDARY); private final NumberInputField hueInput = new NumberInputField(90, 32, 0, 0, 360, 1); private final NumberInputField saturationInput = new NumberInputField(90, 32, 100, 0, 100, 1); @@ -56,9 +56,9 @@ public class ColorSelector { public ColorSelector(OneColor color, int mouseX, int mouseY) { this.color = color; - buttons.add(new BasicElement(124, 28, ColorUtils.SECONDARY, true, 10f)); - buttons.add(new BasicElement(124, 28, ColorUtils.SECONDARY, true, 10f)); - buttons.add(new BasicElement(124, 28, ColorUtils.SECONDARY, true, 10f)); + buttons.add(new BasicElement(124, 28, ColorPalette.SECONDARY, true, 10f)); + buttons.add(new BasicElement(124, 28, ColorPalette.SECONDARY, true, 10f)); + buttons.add(new BasicElement(124, 28, ColorPalette.SECONDARY, true, 10f)); hueInput.setCurrentValue(color.getHue()); saturationInput.setCurrentValue(color.getSaturation()); brightnessInput.setCurrentValue(color.getBrightness()); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java index 410f98f..d5e8895 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java @@ -9,7 +9,8 @@ import cc.polyfrost.oneconfig.libs.universal.wrappers.UPlayer; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -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 net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.fml.common.ModMetadata; @@ -19,7 +20,7 @@ import java.util.ArrayList; public class ModCard extends BasicElement { private final Mod modData; - private final BasicElement favoriteHitbox = new BasicElement(32, 32, ColorUtils.PRIMARY, true); + private final BasicElement favoriteHitbox = new BasicElement(32, 32, ColorPalette.PRIMARY, true); private boolean active, disabled, favorite; private int colorGray = OneConfigConfig.GRAY_600; private int colorPrimary = OneConfigConfig.PRIMARY_600; @@ -62,11 +63,11 @@ public class ModCard extends BasicElement { super.update(x, y); isHoveredMain = InputUtils.isAreaHovered(x, y, width, 87); boolean isHoveredSecondary = InputUtils.isAreaHovered(x, y + 87, width - 32, 32) && !disabled; - colorGray = ColorUtils.getColor(colorGray, ColorUtils.SECONDARY, isHoveredMain, clicked && isHoveredMain); + colorGray = ColorUtils.getColor(colorGray, ColorPalette.SECONDARY, isHoveredMain, clicked && isHoveredMain); if (active && !disabled) { - colorPrimary = ColorUtils.getColor(colorPrimary, ColorUtils.PRIMARY, isHoveredSecondary, clicked && isHoveredSecondary); + colorPrimary = ColorUtils.getColor(colorPrimary, ColorPalette.PRIMARY, isHoveredSecondary, clicked && isHoveredSecondary); } else { - colorPrimary = ColorUtils.getColor(colorPrimary, ColorUtils.SECONDARY, isHoveredSecondary, false); + colorPrimary = ColorUtils.getColor(colorPrimary, ColorPalette.SECONDARY, isHoveredSecondary, false); } if (clicked && isHoveredMain) { if (!active) toggled = false; diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java index a10e3a0..d58852f 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigButton.java @@ -5,7 +5,7 @@ import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.gui.elements.BasicButton; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; import java.lang.reflect.Field; @@ -14,13 +14,13 @@ public class ConfigButton extends BasicOption { public ConfigButton(Runnable runnable, Object parent, String name, int size, String text) { super(null, parent, name, size); - this.button = new BasicButton(size == 1 ? 128 : 256, 32, text, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY); + this.button = new BasicButton(size == 1 ? 128 : 256, 32, text, BasicButton.ALIGNMENT_CENTER, ColorPalette.PRIMARY); this.button.setClickAction(runnable); } public ConfigButton(Field field, Object parent, String name, int size, String text) { super(field, parent, name, size); - this.button = new BasicButton(size == 1 ? 128 : 256, 32, text, BasicButton.ALIGNMENT_CENTER, ColorUtils.PRIMARY); + this.button = new BasicButton(size == 1 ? 128 : 256, 32, text, BasicButton.ALIGNMENT_CENTER, ColorPalette.PRIMARY); this.button.setClickAction(getRunnableFromField(field, parent)); } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java index 0f1a2bb..543a8e0 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigCheckbox.java @@ -5,7 +5,8 @@ import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -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 cc.polyfrost.oneconfig.utils.MathUtils; @@ -40,7 +41,7 @@ public class ConfigCheckbox extends BasicOption { e.printStackTrace(); } } - color = ColorUtils.getColor(color, ColorUtils.SECONDARY, hover, false); + color = ColorUtils.getColor(color, ColorPalette.SECONDARY, hover, false); if (percentOn != 1f) { // performance RenderManager.drawRoundedRect(vg, x, y + 4, 24, 24, color, 6f); RenderManager.drawHollowRoundRect(vg, x, y + 4, 23.5f, 23.5f, OneConfigConfig.GRAY_300, 6f, 1f); // the 0.5f is to make it look better ok diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java index 4a986d7..51d3fec 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java @@ -5,7 +5,8 @@ import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -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.lwjgl.input.Mouse; @@ -40,7 +41,7 @@ public class ConfigDropdown extends BasicOption { // TODO: remove dividers and f } if (opened) return; - backgroundColor = ColorUtils.getColor(backgroundColor, ColorUtils.SECONDARY, hovered, false); + backgroundColor = ColorUtils.getColor(backgroundColor, ColorPalette.SECONDARY, hovered, false); int selected = 0; try { selected = (int) get(); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java index 78ef0b3..b10cf2c 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigKeyBind.java @@ -9,7 +9,7 @@ import cc.polyfrost.oneconfig.libs.universal.UKeyboard; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; import java.lang.reflect.Field; @@ -19,7 +19,7 @@ public class ConfigKeyBind extends BasicOption { public ConfigKeyBind(Field field, Object parent, String name, int size) { super(field, parent, name, size); - button = new BasicButton(256, 32, "", SVGs.KEYSTROKE, null, BasicButton.ALIGNMENT_LEFT, ColorUtils.SECONDARY); + button = new BasicButton(256, 32, "", SVGs.KEYSTROKE, null, BasicButton.ALIGNMENT_LEFT, ColorPalette.SECONDARY); button.setToggleable(true); } diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java index ec13566..a68370a 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigPageButton.java @@ -8,7 +8,8 @@ import cc.polyfrost.oneconfig.gui.pages.ModConfigPage; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -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.lwjgl.input.Mouse; @@ -30,7 +31,7 @@ public class ConfigPageButton extends BasicOption { int height = description.equals("") ? 64 : 96; boolean hovered = InputUtils.isAreaHovered(x - 2, y, 1024, height) && isEnabled(); boolean clicked = hovered && InputUtils.isClicked(); - backgroundColor = ColorUtils.getColor(backgroundColor, ColorUtils.SECONDARY, hovered, false); + backgroundColor = ColorUtils.getColor(backgroundColor, ColorPalette.SECONDARY, hovered, false); if (hovered && Mouse.isButtonDown(0)) RenderManager.setAlpha(vg, 0.8f); if (!isEnabled()) RenderManager.setAlpha(vg, 0.5f); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigSwitch.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigSwitch.java index 61c0dd5..8a0d85e 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigSwitch.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigSwitch.java @@ -4,7 +4,8 @@ import cc.polyfrost.oneconfig.config.OneConfigConfig; import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; -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 cc.polyfrost.oneconfig.utils.MathUtils; @@ -28,7 +29,7 @@ public class ConfigSwitch extends BasicOption { } int x2 = x + 3 + (int) (percentOn * 18); boolean hovered = InputUtils.isAreaHovered(x, y, 42, 32); - colorDisabled = ColorUtils.getColor(colorDisabled, ColorUtils.SECONDARY, hovered, false); + colorDisabled = ColorUtils.getColor(colorDisabled, ColorPalette.SECONDARY, hovered, false); colorEnabled = ColorUtils.smoothColor(colorEnabled, OneConfigConfig.PRIMARY_600, OneConfigConfig.PRIMARY_500, hovered, 40f); if (!isEnabled()) RenderManager.setAlpha(vg, 0.5f); RenderManager.drawRoundedRect(vg, x, y + 4, 42, 24, colorDisabled, 12f); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java index ce048c9..698d04b 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java @@ -7,7 +7,7 @@ import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorUtils; import cc.polyfrost.oneconfig.utils.InputUtils; import cc.polyfrost.oneconfig.utils.MathUtils; diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java index 925f61d..bdf3dfa 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java @@ -4,7 +4,8 @@ import cc.polyfrost.oneconfig.config.OneConfigConfig; import cc.polyfrost.oneconfig.gui.elements.BasicElement; import cc.polyfrost.oneconfig.lwjgl.RenderManager; import cc.polyfrost.oneconfig.lwjgl.image.SVGs; -import cc.polyfrost.oneconfig.utils.ColorUtils; +import cc.polyfrost.oneconfig.utils.color.ColorPalette; +import cc.polyfrost.oneconfig.utils.color.ColorUtils; public class NumberInputField extends TextInputField { private final BasicElement upArrow = new BasicElement(12, 14, false); @@ -47,8 +48,8 @@ public class NumberInputField extends TextInputField { if (current == max) colorTop = OneConfigConfig.GRAY_500_80; if (current == min) colorBottom = OneConfigConfig.GRAY_500_80; - colorTop = ColorUtils.getColor(colorTop, ColorUtils.SECONDARY, upArrow.isHovered(), upArrow.isClicked()); - colorBottom = ColorUtils.getColor(colorBottom, ColorUtils.SECONDARY, downArrow.isHovered(), downArrow.isClicked()); + colorTop = ColorUtils.getColor(colorTop, ColorPalette.SECONDARY, upArrow.isHovered(), upArrow.isClicked()); + colorBottom = ColorUtils.getColor(colorBottom, ColorPalette.SECONDARY, downArrow.isHovered(), downArrow.isClicked()); if (upArrow.isClicked()) { current += step; if (current > max) current = max; |