remove the MinecraftFont toggle and always draw text shadows

the toggle existed to switch back to the vanilla font, but disabling it
left every label without a shadow which read as a bug. the setting,
its visibility hooks and FrosFont's vanilla-mode read are gone; Font
and FontSize now always apply, and every label draws its shadow in both
the custom font and the vanilla fallback path. a stale MinecraftFont key
in old configs is ignored by the loader and disappears on next save.
chat and command output keep the untouched vanilla font without shadows
This commit is contained in:
froslanz
2026-10-22 13:23:25 -04:00
parent 7fc42b34d8
commit f0398c7011
2 changed files with 4 additions and 13 deletions
@@ -16,7 +16,6 @@ import static cc.fros.features.commands.MessageSignatures.GENERAL;
public class ClickGuiModule extends Module {
private static ClickGuiModule INSTANCE;
public final Setting<Boolean> minecraftFont = bool("MinecraftFont", false);
public final Setting<String> font = str("Font", "SansSerif");
public final Setting<Integer> fontSize = num("FontSize", 10, 6, 24);
public final Setting<Float> guiScale = num("GUIScale", 1.0f, 0.5f, 2.0f);
@@ -31,8 +30,7 @@ public class ClickGuiModule extends Module {
public ClickGuiModule() {
super("ClickGui", "Opens the ClickGui", Module.Category.CLIENT);
setBind(GLFW.GLFW_KEY_RIGHT_SHIFT);
font.setVisibility(v -> !minecraftFont.getValue());
fontSize.setVisibility(v -> !minecraftFont.getValue() && !font.getValue().isEmpty());
fontSize.setVisibility(v -> !font.getValue().isEmpty());
rainbowHue.setVisibility(v -> rainbow.getValue());
rainbowBrightness.setVisibility(v -> rainbow.getValue());
rainbowSaturation.setVisibility(v -> rainbow.getValue());
@@ -126,13 +126,7 @@ public final class FrosFont {
}
public static void draw(GuiGraphics context, String text, int x, int y, int color) {
draw(context, text, x, y, color, shadows());
}
/** text shadows only while the custom font is active; the vanilla font renders flat */
public static boolean shadows() {
sync();
return awtFont != null;
draw(context, text, x, y, color, true);
}
public static void draw(GuiGraphics context, String text, int x, int y, int color, boolean shadow) {
@@ -150,7 +144,7 @@ public final class FrosFont {
if (component == null) return;
sync();
if (awtFont == null) {
context.drawString(mc.font, component, x, y, color, shadows());
context.drawString(mc.font, component, x, y, color, true);
return;
}
draw(context, toCodeString(component), x, y, color);
@@ -160,8 +154,7 @@ public final class FrosFont {
private static void sync() {
ClickGuiModule gui = ClickGuiModule.getInstance();
boolean vanilla = gui != null && gui.minecraftFont.getValue();
String name = gui == null || vanilla ? "" : gui.font.getValue();
String name = gui == null ? "" : gui.font.getValue();
int size = gui == null ? 10 : gui.fontSize.getValue();
if (name == null) name = "";
float scale = currentScale();