Update ExploreMenu_Patch.cs

This commit is contained in:
SillyStar-Github 2025-09-28 00:28:47 -04:00
parent 17d233d8d1
commit f6b2ede188

View file

@ -18,10 +18,15 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>()) foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
{ {
txt.text = StringStore.TranslateText(txt.text); txt.text = StringStore.TranslateText(txt.text);
if(txt.name.Contains("Text (TMP)")) }
Transform randomLevelTextTransform = __instance.transform.FindChild("RandomLevel");
foreach(TextMeshProUGUI txt in randomLevelTextTransform.GetComponentsInChildren<TextMeshProUGUI>())
{
if (txt.name.Contains("Text (TMP)"))
{ {
txt.autoSizeTextContainer = true; txt.autoSizeTextContainer = true;
if(txt.name == "Text (TMP)") if (txt.name == "Text (TMP)")
{ {
txt.transform.localPosition = new Vector3(94.4225f, -45.1565f, 0f); txt.transform.localPosition = new Vector3(94.4225f, -45.1565f, 0f);
} }