26 lines
704 B
C#
26 lines
704 B
C#
using HarmonyLib;
|
|
using System;
|
|
using TMPro;
|
|
using PvZ_Fusion_Translator__BepInEx_.AssetStore;
|
|
|
|
namespace PvZ_Fusion_Translator__BepInEx_.Patches.Managers
|
|
{
|
|
[HarmonyPatch(typeof(AbyssMenu))]
|
|
public static class AbyssMenu_Patch
|
|
{
|
|
[HarmonyPatch(nameof(AbyssMenu.Awake))]
|
|
[HarmonyPostfix]
|
|
private static void Awake(AbyssMenu __instance)
|
|
{
|
|
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
|
|
|
foreach (TextMeshProUGUI txt in __instance.levelInfo)
|
|
{
|
|
txt.text = StringStore.TranslateText(txt.text, false);
|
|
txt.font = fontAsset;
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|