aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-26 18:05:16 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-05-26 18:05:16 +0100
commitc1010e9c2c6d82bd3f40c246e45cfe8e9b039d7b (patch)
treed634326c96182929c417225c1311005d5e195543 /src/main/java/cc/polyfrost/oneconfig/gui/elements/ModCard.java
parent6160224ebc584194526f1f31b9a0d63c0ba017d4 (diff)
downloadOneConfig-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.java10
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;
}