aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 06:12:23 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 06:12:23 +0700
commitd4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 (patch)
tree9bb9b53e2823f73084780673763504f4098bae69 /src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java
parentd2b1d57120bb51e76191302a58d935afe52b89df (diff)
downloadOneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.gz
OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.bz2
OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.zip
Separate Minecraft dependant and non-dependant code
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java b/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java
index ab00139..3b74c4c 100644
--- a/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java
+++ b/src/main/java/cc/polyfrost/oneconfig/hud/TextHud.java
@@ -9,6 +9,7 @@ import cc.polyfrost.oneconfig.events.event.TickEvent;
import cc.polyfrost.oneconfig.internal.hud.HudCore;
import cc.polyfrost.oneconfig.libs.eventbus.Subscribe;
import cc.polyfrost.oneconfig.libs.universal.UMinecraft;
+import cc.polyfrost.oneconfig.platform.Platform;
import cc.polyfrost.oneconfig.renderer.RenderManager;
import java.util.ArrayList;
@@ -83,7 +84,7 @@ public abstract class TextHud extends Hud {
width = 0;
for (String line : lines) {
RenderManager.drawScaledString(line, x, textY, color.getRGB(), RenderManager.TextType.toType(textType), scale);
- width = Math.max(width, UMinecraft.getFontRenderer().getStringWidth(line));
+ width = Math.max(width, Platform.getGLPlatform().getStringWidth(line));
textY += 12 * scale;
}
height = (int) ((textY - y) / scale - 3);