Merge branch 'main' into cassidy
This commit is contained in:
commit
467c82a219
1 changed files with 0 additions and 42 deletions
|
|
@ -1,42 +0,0 @@
|
|||
using HarmonyLib;
|
||||
using Il2Cpp;
|
||||
using Il2CppTMPro;
|
||||
using PvZ_Fusion_Translator.AssetStore;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PvZ_Fusion_Translator.Patches.GameObjects.ButtonObjects
|
||||
{
|
||||
[HarmonyPatch(typeof(EveManager))]
|
||||
public static class EveManager_UIButton_Patch
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(nameof(EveManager.Balanced))]
|
||||
private static void Start(EveManager __instance)
|
||||
{
|
||||
Transform sceneText = __instance.transform.FindChild("text");
|
||||
if(sceneText != null)
|
||||
{
|
||||
TextMeshProUGUI sceneTextTMP = sceneText.transform.GetComponent<TextMeshProUGUI>();
|
||||
if(sceneTextTMP != null)
|
||||
{
|
||||
sceneTextTMP.text = StringStore.TranslateText(sceneTextTMP.text);
|
||||
}
|
||||
}
|
||||
Transform sceneTextShadow = sceneText.transform.FindChild("text2");
|
||||
if(sceneTextShadow != null)
|
||||
{
|
||||
TextMeshProUGUI sceneTextShadowTMP = sceneTextShadow.transform.GetComponent<TextMeshProUGUI>();
|
||||
if (sceneTextShadowTMP != null)
|
||||
{
|
||||
sceneTextShadowTMP.text = StringStore.TranslateText(sceneTextShadowTMP.text);
|
||||
}
|
||||
}
|
||||
|
||||
if (__instance.name.Equals("Balanced"))
|
||||
{
|
||||
__instance.gameObject.SetActive(false);
|
||||
__instance.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue