tmpugui
This commit is contained in:
parent
d9c34d04a3
commit
a2ac63b479
1 changed files with 20 additions and 15 deletions
|
|
@ -17,16 +17,21 @@ namespace PvZ_Fusion_Translator__BepInEx_.Patches.BaseTextObjects
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(__instance.text))
|
if (!string.IsNullOrEmpty(__instance.text))
|
||||||
{
|
{
|
||||||
if (__instance.transform.parent != null && __instance.transform.parent.parent != null && __instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
if(__instance.transform.parent.parent != null)
|
||||||
{
|
{
|
||||||
return;
|
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||||
}
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__instance = StringStore.TranslateText(__instance);
|
__instance = StringStore.TranslateText(__instance);
|
||||||
__instance.autoSizeTextContainer = false;
|
__instance.autoSizeTextContainer = false;
|
||||||
|
|
||||||
if (__instance.name.StartsWith("LevelName"))
|
if (__instance.name.StartsWith("LevelName"))
|
||||||
{
|
{
|
||||||
__instance.text = __instance.text.Replace("\n", " ");
|
__instance.text = __instance.text.Replace("\n", " ");
|
||||||
|
|
||||||
if (__instance.name == "LevelName2" || __instance.name == "LevelName3")
|
if (__instance.name == "LevelName2" || __instance.name == "LevelName3")
|
||||||
{
|
{
|
||||||
TowerManager_Patch.updatedText.Add(__instance.transform);
|
TowerManager_Patch.updatedText.Add(__instance.transform);
|
||||||
|
|
@ -46,26 +51,26 @@ namespace PvZ_Fusion_Translator__BepInEx_.Patches.BaseTextObjects
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
private static void Awake(TextMeshProUGUI __instance)
|
private static void Awake(TextMeshProUGUI __instance)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(__instance.text))
|
if (!string.IsNullOrEmpty(__instance.text))
|
||||||
{
|
{
|
||||||
if (__instance.transform.parent != null && __instance.transform.parent.parent != null && __instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
if (__instance.transform.parent.parent != null)
|
||||||
{
|
{
|
||||||
return;
|
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||||
}
|
{
|
||||||
__instance = StringStore.TranslateText(__instance);
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__instance = StringStore.TranslateText(__instance);
|
||||||
__instance.autoSizeTextContainer = false;
|
__instance.autoSizeTextContainer = false;
|
||||||
|
|
||||||
if (__instance.name.StartsWith("LevelName"))
|
|
||||||
{
|
|
||||||
__instance.text = __instance.text.Replace("\n", " ");
|
|
||||||
}
|
|
||||||
if (__instance.transform.parent != null && __instance.transform.parent.name.StartsWith("Window"))
|
if (__instance.transform.parent != null && __instance.transform.parent.name.StartsWith("Window"))
|
||||||
{
|
{
|
||||||
__instance.fontSizeMin = 10;
|
__instance.fontSizeMin = 10;
|
||||||
__instance.fontSize = 12;
|
__instance.fontSize = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance.text == "Полный Хаос" && __instance.transform.parent.parent.Find("Image").GetComponent<Image>().activeSprite.name == "Present")
|
if (__instance.text == "Полный Хаос" && __instance.transform.parent.parent.Find("Image").GetComponent<Image>().activeSprite.name == "Present")
|
||||||
{
|
{
|
||||||
__instance.text += "\nБесконечно";
|
__instance.text += "\nБесконечно";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue