diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-03-04 03:03:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-04 13:03:33 +1100 |
| commit | 5a79ff410eb64e906c555751b32bef87cc7caee9 (patch) | |
| tree | f2c2e40a7cca305959b04d2dfba99ebc3e822949 /src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java | |
| parent | 5dd063fbba6bde64806a7620541dc2d9bdf42871 (diff) | |
| download | notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.tar.gz notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.tar.bz2 notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.zip | |
I hate FontRenderer. (#612)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java | 23 |
1 files changed, 3 insertions, 20 deletions
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); |
