diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-26 18:05:16 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-05-26 18:05:16 +0100 |
commit | c1010e9c2c6d82bd3f40c246e45cfe8e9b039d7b (patch) | |
tree | d634326c96182929c417225c1311005d5e195543 /src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java | |
parent | 6160224ebc584194526f1f31b9a0d63c0ba017d4 (diff) | |
download | OneConfig-c1010e9c2c6d82bd3f40c246e45cfe8e9b039d7b.tar.gz OneConfig-c1010e9c2c6d82bd3f40c246e45cfe8e9b039d7b.tar.bz2 OneConfig-c1010e9c2c6d82bd3f40c246e45cfe8e9b039d7b.zip |
Color Utils fixes and more
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java | 10 |
1 files changed, 5 insertions, 5 deletions
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 5853585..c60286d 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java @@ -63,12 +63,12 @@ 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, 0, isHoveredMain, clicked && isHoveredMain); + colorGray = ColorUtils.getColor(colorGray, ColorUtils.SECONDARY, isHoveredMain, clicked && isHoveredMain); if (active && !disabled) { - colorPrimary = ColorUtils.getColor(colorPrimary, 1, isHoveredSecondary, clicked && isHoveredSecondary); - } else - colorPrimary = ColorUtils.smoothColor(colorPrimary, OneConfigConfig.GRAY_500, OneConfigConfig.GRAY_400, isHoveredSecondary, 20f); - + colorPrimary = ColorUtils.getColor(colorPrimary, ColorUtils.PRIMARY, isHoveredSecondary, clicked && isHoveredSecondary); + } else { + colorPrimary = ColorUtils.getColor(colorPrimary, ColorUtils.SECONDARY, isHoveredSecondary, false); + } if (clicked && isHoveredMain) { if (!active) toggled = false; } |