From 58cdb6841abfb5196abc3461c16eab3dd2e9a7ac Mon Sep 17 00:00:00 2001 From: SillyStar-Github <90102598+SillyStar-Github@users.noreply.github.com> Date: Sun, 20 Apr 2025 15:49:32 -0400 Subject: [PATCH] Update AlmanacPlantBank_Patch.cs --- MelonLoader/Patches/Managers/AlmanacPlantBank_Patch.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MelonLoader/Patches/Managers/AlmanacPlantBank_Patch.cs b/MelonLoader/Patches/Managers/AlmanacPlantBank_Patch.cs index 0ed98c8..4decf88 100644 --- a/MelonLoader/Patches/Managers/AlmanacPlantBank_Patch.cs +++ b/MelonLoader/Patches/Managers/AlmanacPlantBank_Patch.cs @@ -1,6 +1,7 @@ using HarmonyLib; using Il2Cpp; using Il2CppTMPro; +using MelonLoader; using PvZ_Fusion_Translator.AssetStore; using UnityEngine; using static PvZ_Fusion_Translator.FileLoader; @@ -67,13 +68,17 @@ namespace PvZ_Fusion_Translator.Patches.Managers { component.text = plantInfo.info + "\n\n" + plantInfo.introduce; component.overflowMode = TextOverflowModes.Page; + component.rectTransform.sizeDelta = new Vector2(component.rectTransform.sizeDelta.x, 58.917f); + component2.text = plantInfo.name; component2.autoSizeTextContainer = true; + component3.text = Utils.RemoveColorTags(plantInfo.name); component3.autoSizeTextContainer = true; + component4.text = plantInfo.cost; - if (hasAlmanacFont) + if (hasAlmanacFont) { component.font = almanacFontAsset; component4.font = almanacFontAsset;