From 8bd52204235c9c070b84fe5877faea57816d252f Mon Sep 17 00:00:00 2001 From: Jess Date: Sat, 15 Jun 2024 01:11:13 +0100 Subject: [PATCH] i reckon --- .../de/com/baseband/client/feature/Feature.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Client/src/main/java/de/com/baseband/client/feature/Feature.java b/Client/src/main/java/de/com/baseband/client/feature/Feature.java index c733b04..867cfff 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/Feature.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Feature.java @@ -3,9 +3,9 @@ package de.com.baseband.client.feature; import de.com.baseband.client.BaseBand; import de.com.baseband.client.event.KeyManager; import de.com.baseband.client.feature.category.Command; +import de.com.baseband.client.gui.lib.component.*; import de.com.baseband.client.gui.lib.component.Button; import de.com.baseband.client.gui.lib.component.Component; -import de.com.baseband.client.gui.lib.component.*; import de.com.baseband.client.registry.AnyGate; import de.com.baseband.client.registry.ConfigHandle; import de.com.baseband.client.registry.Configuration; @@ -48,12 +48,6 @@ public abstract class Feature extends ToggleButton implements SetCommand { this.setLambda(this::updateEnabled); } - public final int color = getHashColor(); - - private int getHashColor() { - return Color.decode("#"+Hasher.sha256hex(toString()).substring(0,6)).getRGB(); - } - // feature methods protected boolean defaultEnable() { @@ -78,6 +72,12 @@ public abstract class Feature extends ToggleButton implements SetCommand { public abstract String toString(); + public final int color = getHashColor(); + + public int getHashColor() { + return Color.decode("#"+ Hasher.sha256hex(getIDName()).substring(0,6)).getRGB(); + } + protected void setup() {} public boolean displayOnClickGUI() {