add MinecraftFont setting to switch back to the vanilla font

toggling it on hides Font/FontSize and routes all client ui text back
through Minecraft's font renderer
This commit is contained in:
froslanz
2026-10-22 11:37:15 -04:00
parent 7b4fc41dba
commit b682961856
2 changed files with 5 additions and 2 deletions
@@ -16,6 +16,7 @@ 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<String> prefix = str("Prefix", ".");
@@ -29,7 +30,8 @@ public class ClickGuiModule extends Module {
public ClickGuiModule() {
super("ClickGui", "Opens the ClickGui", Module.Category.CLIENT);
setBind(GLFW.GLFW_KEY_RIGHT_SHIFT);
fontSize.setVisibility(v -> !font.getValue().isEmpty());
font.setVisibility(v -> !minecraftFont.getValue());
fontSize.setVisibility(v -> !minecraftFont.getValue() && !font.getValue().isEmpty());
rainbowHue.setVisibility(v -> rainbow.getValue());
rainbowBrightness.setVisibility(v -> rainbow.getValue());
rainbowSaturation.setVisibility(v -> rainbow.getValue());
@@ -136,7 +136,8 @@ public final class FrosFont {
private static void sync() {
ClickGuiModule gui = ClickGuiModule.getInstance();
String name = gui == null ? "" : gui.font.getValue();
boolean vanilla = gui != null && gui.minecraftFont.getValue();
String name = gui == null || vanilla ? "" : gui.font.getValue();
int size = gui == null ? 10 : gui.fontSize.getValue();
if (name == null) name = "";