diff --git a/src/main/java/cc/fros/features/gui/Widget.java b/src/main/java/cc/fros/features/gui/Widget.java index 6c904cd..601ddd7 100644 --- a/src/main/java/cc/fros/features/gui/Widget.java +++ b/src/main/java/cc/fros/features/gui/Widget.java @@ -215,6 +215,6 @@ public class Widget } protected void drawString(String text, double x, double y, int color) { - FrosFont.draw(context, text, (int) x, (int) y, color, true); + FrosFont.draw(context, text, (int) x, (int) y, color); } } \ No newline at end of file diff --git a/src/main/java/cc/fros/features/gui/items/Item.java b/src/main/java/cc/fros/features/gui/items/Item.java index 6713921..52d1832 100644 --- a/src/main/java/cc/fros/features/gui/items/Item.java +++ b/src/main/java/cc/fros/features/gui/items/Item.java @@ -80,7 +80,7 @@ public class Item } protected void drawString(GuiGraphics context, String text, double x, double y, int color) { - FrosFont.draw(context, text, (int) x, (int) y, color, true); + FrosFont.draw(context, text, (int) x, (int) y, color); } public boolean isHovering(int mouseX, int mouseY) { diff --git a/src/main/java/cc/fros/features/modules/client/HudModule.java b/src/main/java/cc/fros/features/modules/client/HudModule.java index e29f5d2..8f49bc1 100644 --- a/src/main/java/cc/fros/features/modules/client/HudModule.java +++ b/src/main/java/cc/fros/features/modules/client/HudModule.java @@ -120,7 +120,7 @@ public abstract class HudModule extends Module { textX = x - 5 - textWidth; } FrosFont.draw(e.getContext(), getName(), - (int) textX, (int) (y + height / 2f - textHeight / 2f), -1, true); + (int) textX, (int) (y + height / 2f - textHeight / 2f), -1); HudEditorScreen.getInstance().anyHover = true; } diff --git a/src/main/java/cc/fros/util/render/FrosFont.java b/src/main/java/cc/fros/util/render/FrosFont.java index dcf3be5..85fb454 100644 --- a/src/main/java/cc/fros/util/render/FrosFont.java +++ b/src/main/java/cc/fros/util/render/FrosFont.java @@ -124,7 +124,13 @@ public final class FrosFont { } public static void draw(GuiGraphics context, String text, int x, int y, int color) { - draw(context, text, x, y, color, false); + 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; } public static void draw(GuiGraphics context, String text, int x, int y, int color, boolean shadow) { @@ -142,10 +148,10 @@ public final class FrosFont { if (component == null) return; sync(); if (awtFont == null) { - context.drawString(mc.font, component, x, y, color); + context.drawString(mc.font, component, x, y, color, shadows()); return; } - draw(context, toCodeString(component), x, y, color, false); + draw(context, toCodeString(component), x, y, color); } // --- loading ---