i reckon
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m9s

This commit is contained in:
Jess H 2024-06-15 01:11:13 +01:00
parent 8afd259e75
commit 8bd5220423
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -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() {