PVZFusionTranslation/BepInEx/Patches/GameObjects/ButtonObjects/ExploreMakeSceneButton_Patch.cs
2025-11-18 19:07:53 +07:00

20 lines
No EOL
785 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using HarmonyLib;
using TMPro;
using PvZ_Fusion_Translator__BepInEx_.AssetStore;
using PvZ_Fusion_Translator__BepInEx_;
using UnityEngine;
namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects.ButtonObjects
{
[HarmonyPatch(typeof(ExploreMakeSceneButton))]
public class ExploreMakeSceneButton_Patch
{
[HarmonyPostfix]
[HarmonyPatch(nameof(ExploreMakeSceneButton.Start))]
public static void Start(ExploreMakeSceneButton __instance)
{
__instance.sceneText.text = (StringStore.translationString.ContainsKey(__instance.sceneText.text + "_FS")) ? StringStore.TranslateText(__instance.sceneText.text + "_FS") : StringStore.TranslateText(__instance.sceneText.text);
__instance.sceneText.font = FontStore.LoadTMPFont(Utils.Language.ToString());
}
}
}