Merge branch 'cassidy'
This commit is contained in:
commit
b1b2e2cd83
2 changed files with 30 additions and 22 deletions
|
|
@ -114,6 +114,14 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
|||
StringStore.TranslateTextTransform(pageEndlessLevelTransform.Find("LastPage"));
|
||||
}
|
||||
|
||||
Transform pageNewAdvantureLevelTransform = levelsTransform.transform.Find("PageNewAdvantureLevel");
|
||||
if (pageNewAdvantureLevelTransform != null)
|
||||
{
|
||||
StringStore.TranslateTextTransform(pageNewAdvantureLevelTransform.Find("BackToIndex"));
|
||||
StringStore.TranslateTextTransform(pageNewAdvantureLevelTransform.Find("Nextpage"));
|
||||
StringStore.TranslateTextTransform(pageNewAdvantureLevelTransform.Find("LastPage"));
|
||||
}
|
||||
|
||||
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
||||
{
|
||||
txt.text = StringStore.TranslateText(txt.text);
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
using HarmonyLib;
|
||||
using Il2Cpp;
|
||||
using Il2CppTMPro;
|
||||
using PvZ_Fusion_Translator.AssetStore;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
//using HarmonyLib;
|
||||
//using Il2Cpp;
|
||||
//using Il2CppTMPro;
|
||||
//using PvZ_Fusion_Translator.AssetStore;
|
||||
//using UnityEngine;
|
||||
//using UnityEngine.UI;
|
||||
|
||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||
{
|
||||
[HarmonyPatch(typeof(UIBtn))]
|
||||
public static class UIBtn_Patch
|
||||
{
|
||||
[HarmonyPatch(nameof(UIBtn.Awake))]
|
||||
[HarmonyPostfix]
|
||||
private static void Postfix_Awake(UIBtn __instance)
|
||||
{
|
||||
if(__instance.TryGetComponent<BackToIndex>(out BackToIndex component))
|
||||
{
|
||||
Utils.ConvertButtonText(__instance.transform.parent, "BackToIndex");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||
//{
|
||||
// [HarmonyPatch(typeof(UIBtn))]
|
||||
// public static class UIBtn_Patch
|
||||
// {
|
||||
// [HarmonyPatch(nameof(UIBtn.Awake))]
|
||||
// [HarmonyPostfix]
|
||||
// private static void Postfix_Awake(UIBtn __instance)
|
||||
// {
|
||||
// if(__instance.TryGetComponent<BackToIndex>(out BackToIndex component))
|
||||
// {
|
||||
// Utils.ConvertButtonText(__instance.transform.parent, component.name);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue