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"));
|
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>())
|
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
txt.text = StringStore.TranslateText(txt.text);
|
txt.text = StringStore.TranslateText(txt.text);
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
using HarmonyLib;
|
//using HarmonyLib;
|
||||||
using Il2Cpp;
|
//using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
//using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
//using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
//using UnityEngine;
|
||||||
using UnityEngine.UI;
|
//using UnityEngine.UI;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
//namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
{
|
//{
|
||||||
[HarmonyPatch(typeof(UIBtn))]
|
// [HarmonyPatch(typeof(UIBtn))]
|
||||||
public static class UIBtn_Patch
|
// public static class UIBtn_Patch
|
||||||
{
|
// {
|
||||||
[HarmonyPatch(nameof(UIBtn.Awake))]
|
// [HarmonyPatch(nameof(UIBtn.Awake))]
|
||||||
[HarmonyPostfix]
|
// [HarmonyPostfix]
|
||||||
private static void Postfix_Awake(UIBtn __instance)
|
// private static void Postfix_Awake(UIBtn __instance)
|
||||||
{
|
// {
|
||||||
if(__instance.TryGetComponent<BackToIndex>(out BackToIndex component))
|
// if(__instance.TryGetComponent<BackToIndex>(out BackToIndex component))
|
||||||
{
|
// {
|
||||||
Utils.ConvertButtonText(__instance.transform.parent, "BackToIndex");
|
// Utils.ConvertButtonText(__instance.transform.parent, component.name);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue