From f9b6cf75f4b03d11c3f8cc35dec26913217460b7 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 29 Aug 2023 15:19:09 +0100 Subject: [PATCH] Fixed tooltip text not being wrapped for trait descriptions in the discoveries tab --- .../client/gui/spellbook/SpellbookTraitDexPageContent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/SpellbookTraitDexPageContent.java b/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/SpellbookTraitDexPageContent.java index 50bda09c..e8f83db6 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/SpellbookTraitDexPageContent.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/spellbook/SpellbookTraitDexPageContent.java @@ -9,6 +9,7 @@ import com.minelittlepony.common.client.gui.element.Label; import com.minelittlepony.common.client.gui.sprite.TextureSprite; import com.minelittlepony.unicopia.USounds; import com.minelittlepony.unicopia.ability.magic.spell.trait.*; +import com.minelittlepony.unicopia.client.FlowingText; import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookChapterList.Chapter; import com.minelittlepony.unicopia.client.gui.spellbook.SpellbookScreen.ImageButton; import com.minelittlepony.unicopia.container.SpellbookState; @@ -190,7 +191,7 @@ public class SpellbookTraitDexPageContent implements SpellbookChapterList.Conten .setTextureSize(16, 16) .setSize(16, 16) .setTexture(trait.getSprite())); - getStyle().setTooltip(trait.getTooltip()); + getStyle().setTooltip(Tooltip.of(FlowingText.wrap(trait.getTooltip(), 200).toList())); onClick(sender -> Pony.of(MinecraftClient.getInstance().player).getDiscoveries().markRead(trait)); }