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/options/NEUConfigEditor.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/options/NEUConfigEditor.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java index fe1f0af4..677e5822 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java @@ -34,7 +34,6 @@ import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils; import io.github.moulberry.notenoughupdates.core.util.render.TextRenderUtils; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.GlStateManager; @@ -289,15 +288,9 @@ public class NEUConfigEditor extends GuiElement { RenderUtils.drawFloatingRectDark(x + 5, y + 5, xSize - 10, 20, false); - FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; TextRenderUtils.drawStringCenteredScaledMaxWidth( "NotEnoughUpdates by " + EnumChatFormatting.DARK_PURPLE + "Moulberry", - fr, - x + xSize / 2, - y + 15, - false, - 200, - 0xa0a0a0 + x + xSize / 2, y + 15, false, 200, 0xa0a0a0 ); RenderUtils.drawFloatingRectDark(x + 4, y + 49 - 20, @@ -334,9 +327,7 @@ public class NEUConfigEditor extends GuiElement { } else { catName = EnumChatFormatting.GRAY + catName; } - TextRenderUtils.drawStringCenteredScaledMaxWidth(catName, - fr, x + 75, y + 70 + catY, false, 100, -1 - ); + TextRenderUtils.drawStringCenteredScaledMaxWidth(catName, x + 75, y + 70 + catY, false, 100, -1); catY += 15; if (catY > 0) { catBarSize = @@ -366,9 +357,7 @@ public class NEUConfigEditor extends GuiElement { GlScissorStack.pop(scaledResolution); - TextRenderUtils.drawStringCenteredScaledMaxWidth("Categories", - fr, x + 75, y + 44, false, 120, 0xa368ef - ); + TextRenderUtils.drawStringCenteredScaledMaxWidth("Categories", x + 75, y + 44, false, 120, 0xa368ef); RenderUtils.drawFloatingRectDark(x + 149, y + 29, xSize - 154, ySize - 34, false); @@ -405,8 +394,9 @@ public class NEUConfigEditor extends GuiElement { if (getSelectedCategory() != null && currentConfigEditing.containsKey(getSelectedCategory())) { ConfigProcessor.ProcessedCategory cat = currentConfigEditing.get(getSelectedCategory()); - TextRenderUtils.drawStringScaledMaxWidth(cat.desc, - fr, innerLeft + 5, y + 40, true, innerRight - innerLeft - rightStuffLen - 10, 0xb0b0b0 + TextRenderUtils.drawStringScaledMaxWidth( + cat.desc, + innerLeft + 5, y + 40, true, innerRight - innerLeft - rightStuffLen - 10, 0xb0b0b0 ); } @@ -552,7 +542,9 @@ public class NEUConfigEditor extends GuiElement { GlScissorStack.clear(); if (tooltipToDisplay != null) { - TextRenderUtils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, fr); + TextRenderUtils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, + Minecraft.getMinecraft().fontRendererObj + ); } GlStateManager.translate(0, 0, -2); |
