diff --git a/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java b/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java index eb5d41d..ceca1ef 100644 --- a/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java +++ b/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java @@ -13,6 +13,7 @@ import net.silentclient.client.gui.elements.Input; import net.silentclient.client.gui.elements.StaticButton; import net.silentclient.client.gui.font.SilentFontRenderer; import net.silentclient.client.gui.theme.button.DefaultButtonTheme; +import net.silentclient.client.gui.theme.button.RedButtonTheme; import net.silentclient.client.gui.theme.button.SelectedButtonTheme; import net.silentclient.client.gui.theme.input.DefaultInputTheme; import net.silentclient.client.mods.Mod; @@ -58,7 +59,7 @@ public class ModSettings extends SilentScreen { this.buttonList.add(new Button(1, 3, 26, 144, 15, "Back")); this.buttonList.add(new Button(2, 3, this.height - 18, mod.getCategory() == ModCategory.MODS ? 70 : 144, 15, "Reset")); if(mod.getCategory() == ModCategory.MODS) { - this.buttonList.add(new Button(3, 76, this.height - 18, 70, 15, mod.isEnabled() ? "Enabled" : "Disabled", false, mod.isEnabled() ? new SelectedButtonTheme() : new DefaultButtonTheme())); + this.buttonList.add(new Button(3, 76, this.height - 18, 70, 15, mod.isEnabled() && !mod.isForceDisabled() ? "Enabled" : "Disabled", false, mod.isForceDisabled() ? new RedButtonTheme() : mod.isEnabled() ? new SelectedButtonTheme() : new DefaultButtonTheme())); } for (Setting setting : Client.getInstance().getSettingsManager().getSettingByMod(mod)) { @@ -302,6 +303,9 @@ public class ModSettings extends SilentScreen { mod.reset(false); break; case 3: + if(mod.isForceDisabled()) { + break; + } mod.toggle(); button.displayString = mod.isEnabled() ? "Enabled" : "Disabled"; if(button instanceof Button) { diff --git a/src/main/java/net/silentclient/client/gui/theme/button/RedButtonTheme.java b/src/main/java/net/silentclient/client/gui/theme/button/RedButtonTheme.java new file mode 100644 index 0000000..a9d9159 --- /dev/null +++ b/src/main/java/net/silentclient/client/gui/theme/button/RedButtonTheme.java @@ -0,0 +1,25 @@ +package net.silentclient.client.gui.theme.button; + +import java.awt.*; + +public class RedButtonTheme implements IButtonTheme { + @Override + public Color getBorderColor() { + return new Color(229, 62, 62); + } + + @Override + public Color getBackgroundColor() { + return new Color(229, 62, 62); + } + + @Override + public Color getTextColor() { + return new Color(255, 255, 255); + } + + @Override + public Color getHoveredBackgroundColor(int opacity) { + return new Color(229, 62, 62, opacity); + } +}