Skip to content

Commit 9ed6604

Browse files
committed
Support line break wrapping in GuiText
1 parent 463deb1 commit 9ed6604

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/codechicken/lib/gui/modular/elements

1 file changed

+1
-1
lines changed

Diff for: src/main/java/codechicken/lib/gui/modular/elements/GuiText.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public void renderForeground(GuiRender render, double mouseX, double mouseY, flo
237237
render.drawString(formatted, xPos, yPos, getTextColour(), getShadow());
238238
}
239239
//Draw Wrapped
240-
else if (tooLong && wrap) {
240+
else if ((tooLong || font().split(component, Integer.MAX_VALUE).size() > 1) && wrap) {
241241
textHeight = font.wordWrapHeight(component, (int) xSize());
242242
List<FormattedCharSequence> list = font.split(component, (int) xSize());
243243

0 commit comments

Comments
 (0)