add module coloring thanks to tud's previous changes
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m11s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m11s
This commit is contained in:
parent
fb0e2f5033
commit
697043f848
2 changed files with 24 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
|||
package de.com.baseband.client.feature;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
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.feature.modules.render.HUD;
|
||||
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;
|
||||
|
@ -299,6 +301,17 @@ public abstract class Feature extends ToggleButton implements SetCommand {
|
|||
}
|
||||
|
||||
public String getHUDText() {
|
||||
return text + (meta != null ? " §7[" + meta + "]" : "");
|
||||
HUD.ModuleMetaColor moduleMetaColor;
|
||||
moduleMetaColor = Features.getFeature(HUD.class).moduleMetaColor;
|
||||
switch (moduleMetaColor) {
|
||||
case Future:
|
||||
return text + (meta != null ? ChatFormatting.GRAY + " [" + ChatFormatting.WHITE + meta + ChatFormatting.GRAY + "]" : "");
|
||||
case Colored:
|
||||
return text + (meta != null ? " [" + meta + "]" : "");
|
||||
case Bracketless:
|
||||
return text + (meta != null ? ChatFormatting.GRAY + " " + meta : "");
|
||||
default: //Normal
|
||||
return text + (meta != null ? ChatFormatting.GRAY + " [" + meta + "]" : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,6 +72,13 @@ public class HUD extends Feature {
|
|||
notifs.add(new Notification(text, time));
|
||||
}
|
||||
|
||||
public enum ModuleMetaColor {
|
||||
Normal,
|
||||
Bracketless,
|
||||
Colored,
|
||||
Future
|
||||
}
|
||||
|
||||
|
||||
public enum NotificationLocation {
|
||||
Left, Center, Right
|
||||
|
@ -135,6 +142,9 @@ public class HUD extends Feature {
|
|||
@Description("By default, status (greyed out information tucked on the end of module names) is not factored into the sorting. This setting lets you change that.")
|
||||
public boolean includeStatus = false;
|
||||
|
||||
@Config("Module Status Color")
|
||||
public ModuleMetaColor moduleMetaColor = ModuleMetaColor.Normal;
|
||||
|
||||
@Config("HUD background")
|
||||
@Description("Renders a slightly transparent background below the HUD")
|
||||
public boolean background = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue