td + back button fix
This commit is contained in:
parent
9db378c57e
commit
3afedd515f
2 changed files with 29 additions and 4 deletions
|
|
@ -106,6 +106,14 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
StringStore.TranslateTextTransform(pageScaryPotTransform.Find("LastPage"));
|
StringStore.TranslateTextTransform(pageScaryPotTransform.Find("LastPage"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Transform pageEndlessLevelTransform = levelsTransform.transform.Find("PageEndlessLevel");
|
||||||
|
if (pageEndlessLevelTransform != null)
|
||||||
|
{
|
||||||
|
StringStore.TranslateTextTransform(pageEndlessLevelTransform.Find("BackToIndex"));
|
||||||
|
StringStore.TranslateTextTransform(pageEndlessLevelTransform.Find("Nextpage"));
|
||||||
|
StringStore.TranslateTextTransform(pageEndlessLevelTransform.Find("LastPage"));
|
||||||
|
}
|
||||||
|
|
||||||
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
FileLoader.DumpUntranslatedStrings(txt.text);
|
FileLoader.DumpUntranslatedStrings(txt.text);
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,27 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
[HarmonyPatch(typeof(TowerUpgradeMenu))]
|
[HarmonyPatch(typeof(TowerUpgradeMenu))]
|
||||||
public static class TowerUpgradeMenu_Patch
|
public static class TowerUpgradeMenu_Patch
|
||||||
{
|
{
|
||||||
[HarmonyPatch(nameof(TowerUpgradeMenu.Update))]
|
[HarmonyPatch(nameof(TowerUpgradeMenu.Awake))]
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
private static void Update(TowerUpgradeMenu __instance)
|
private static void Awake(TowerUpgradeMenu __instance)
|
||||||
{
|
{
|
||||||
|
__instance.des.text = StringStore.TranslateText(__instance.des.text);
|
||||||
|
__instance.des2.text = StringStore.TranslateText(__instance.des2.text);
|
||||||
|
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
text.font = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TowerUpgradeMenu.SetText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void SetText(TowerUpgradeMenu __instance)
|
||||||
|
{
|
||||||
|
__instance.des.text = StringStore.TranslateText(__instance.des.text);
|
||||||
|
__instance.des2.text = StringStore.TranslateText(__instance.des2.text);
|
||||||
|
|
||||||
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
text.text = StringStore.TranslateText(text.text);
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue