From 9ed6604d67eeceaaed244aa48606e3de9cecd5fd Mon Sep 17 00:00:00 2001 From: brandon3055 Date: Sun, 7 Apr 2024 16:56:52 +1000 Subject: [PATCH] Support line break wrapping in GuiText --- src/main/java/codechicken/lib/gui/modular/elements/GuiText.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/codechicken/lib/gui/modular/elements/GuiText.java b/src/main/java/codechicken/lib/gui/modular/elements/GuiText.java index f553d660..de758c31 100644 --- a/src/main/java/codechicken/lib/gui/modular/elements/GuiText.java +++ b/src/main/java/codechicken/lib/gui/modular/elements/GuiText.java @@ -237,7 +237,7 @@ public void renderForeground(GuiRender render, double mouseX, double mouseY, flo render.drawString(formatted, xPos, yPos, getTextColour(), getShadow()); } //Draw Wrapped - else if (tooLong && wrap) { + else if ((tooLong || font().split(component, Integer.MAX_VALUE).size() > 1) && wrap) { textHeight = font.wordWrapHeight(component, (int) xSize()); List list = font.split(component, (int) xSize());