From 5a79ff410eb64e906c555751b32bef87cc7caee9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sat, 4 Mar 2023 03:03:33 +0100 Subject: I hate FontRenderer. (#612) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../notenoughupdates/util/NotificationHandler.java | 23 +++------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java index d373ef2c..99a39d0a 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java @@ -83,10 +83,7 @@ public class NotificationHandler { int xLen = Minecraft.getMinecraft().fontRendererObj.getStringWidth("[X] Close"); Minecraft.getMinecraft().fontRendererObj.drawString( "[X] Close", - midX + width / 2f - 3 - xLen, - topY + 3, - 0xFFFF5555, - false + midX + width / 2f - 3 - xLen, topY + 3, 0xFFFF5555, false ); if (notificationDisplayMillis > 0) { @@ -99,24 +96,10 @@ public class NotificationHandler { ); } - Utils.drawStringCentered( - notificationLines.get(0), - Minecraft.getMinecraft().fontRendererObj, - midX, - topY + 4 + 5, - false, - -1 - ); + Utils.drawStringCentered(notificationLines.get(0), midX, topY + 4 + 5, false, -1); for (int i = 1; i < notificationLines.size(); i++) { String line = notificationLines.get(i); - Utils.drawStringCentered( - line, - Minecraft.getMinecraft().fontRendererObj, - midX, - topY + 4 + 5 + 2 + i * 10, - false, - -1 - ); + Utils.drawStringCentered(line, midX, topY + 4 + 5 + 2 + i * 10, false, -1); } Utils.pushGuiScale(-1); -- cgit