This commit is contained in:
parent
8afd259e75
commit
8bd5220423
1 changed files with 7 additions and 7 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue