20 lines
618 B
C#
20 lines
618 B
C#
using HarmonyLib;
|
|
using PvZ_Fusion_Translator.AssetStore;
|
|
|
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest;
|
|
|
|
[HarmonyPatch(typeof(TreasureMainMenu))]
|
|
public static class TreasureMainMenu_Patch
|
|
{
|
|
[HarmonyPatch(nameof(TreasureMainMenu.Update)), HarmonyPostfix]
|
|
private static void Update(TreasureMainMenu __instance)
|
|
{
|
|
var fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
|
|
|
foreach (var txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
|
{
|
|
txt.text = StringStore.TranslateText(txt.text);
|
|
txt.font = fontAsset;
|
|
}
|
|
}
|
|
}
|