Merge pull request #7 from Teyliu/cassidy
shoot em up label fix + minor bug fixes
This commit is contained in:
commit
299b41f1ab
7 changed files with 54 additions and 5 deletions
|
|
@ -50,6 +50,12 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
textMesh.text = StringStore.TranslateText(textMesh.text);
|
textMesh.text = StringStore.TranslateText(textMesh.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
text.font = fontAsset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(nameof(AbyssMenu2.Start))]
|
[HarmonyPatch(nameof(AbyssMenu2.Start))]
|
||||||
|
|
@ -58,7 +64,6 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
{
|
{
|
||||||
UpdateAbyss2Text(__instance);
|
UpdateAbyss2Text(__instance);
|
||||||
|
|
||||||
Utils.ConvertButtonText(__instance.transform, "Goback");
|
|
||||||
Utils.ConvertButtonText(__instance.transform, "Help");
|
Utils.ConvertButtonText(__instance.transform, "Help");
|
||||||
Utils.ConvertButtonText(__instance.transform, "Bag");
|
Utils.ConvertButtonText(__instance.transform, "Bag");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,11 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
txt.font = fontAsset;
|
txt.font = fontAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.ConvertButtonText(__instance.transform, "Goback");
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
text.font = fontAsset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPatch(nameof(AbyssMenu.UpdateLevelInfo))]
|
[HarmonyPatch(nameof(AbyssMenu.UpdateLevelInfo))]
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,6 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
|
||||||
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
foreach (TextMeshProUGUI txt in mainTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
FileLoader.DumpUntranslatedStrings(txt.text);
|
|
||||||
txt.text = StringStore.TranslateText(txt.text);
|
txt.text = StringStore.TranslateText(txt.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(UIProgress2))]
|
||||||
|
public static class UIProgress2_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(UIProgress2.Update))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Update(UIProgress2 __instance)
|
||||||
|
{
|
||||||
|
__instance.t.text = StringStore.TranslateText(__instance.t.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
MelonLoader/Patches/GameObjects/TravelBuffMenu_Patch.cs
Normal file
22
MelonLoader/Patches/GameObjects/TravelBuffMenu_Patch.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelBuffMenu))]
|
||||||
|
public static class TravelBuffMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelBuffMenu.RefeshOptions))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void RefeshOptions(TravelBuffMenu __instance)
|
||||||
|
{
|
||||||
|
foreach(TravelBuffOptionButton button in __instance.options)
|
||||||
|
{
|
||||||
|
button.introduce.text = StringStore.TranslateText(button.introduce.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
{
|
{
|
||||||
[HarmonyPatch(nameof(TravelBuffOptionButton.SetBuff))]
|
[HarmonyPatch(nameof(TravelBuffOptionButton.SetBuff))]
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
private static void Start(TravelBuffOptionButton __instance)
|
private static void SetBuff(TravelBuffOptionButton __instance)
|
||||||
{
|
{
|
||||||
__instance.introduce.text = StringStore.TranslateText(__instance.introduce.text);
|
__instance.introduce.text = StringStore.TranslateText(__instance.introduce.text);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Configurations>Debug;DebugEnglish;ReleaseMulti;ReleaseEnglish;DebugTesting;ReleaseOther;DebugObfuscate;ReleaseObfuscate</Configurations>
|
<Configurations>Debug;DebugEnglish;ReleaseMulti;ReleaseEnglish;DebugTesting;ReleaseOther;DebugObfuscate;ReleaseObfuscate</Configurations>
|
||||||
<GamePath>C:\Users\rainb\Desktop\PC_PVZ-Fusion-2.8</GamePath>
|
<GamePath>C:\Users\rainb\Desktop\PC_PVZ-Fusion-2.8.1</GamePath>
|
||||||
<Platforms>AnyCPU;ARM64;x64</Platforms>
|
<Platforms>AnyCPU;ARM64;x64</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -401,6 +401,7 @@
|
||||||
<Compile Include="ModFeatures.cs" />
|
<Compile Include="ModFeatures.cs" />
|
||||||
<Compile Include="AssetStore\AudioStore.cs" />
|
<Compile Include="AssetStore\AudioStore.cs" />
|
||||||
<Compile Include="Patches\GameObjects\Board_Patch.cs" />
|
<Compile Include="Patches\GameObjects\Board_Patch.cs" />
|
||||||
|
<Compile Include="Patches\GameObjects\MinorObjects\UIProgress2_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\Jigsaw_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\Jigsaw_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\PlayerShootingWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\PlayerShootingWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\PlayerShootingMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\PlayerShootingMenu_Patch.cs" />
|
||||||
|
|
@ -434,6 +435,7 @@
|
||||||
<Compile Include="Patches\GameObjects\AbyssDevelopMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AbyssDevelopMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssMenu2_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AbyssMenu2_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AbyssMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\GameObjects\TravelBuffMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TowerUpgradeMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\TowerUpgradeMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TowerOption_Patch.cs" />
|
<Compile Include="Patches\GameObjects\TowerOption_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelLookBuff_Patch.cs" />
|
<Compile Include="Patches\GameObjects\TravelLookBuff_Patch.cs" />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue