Skip to content

Commit

Permalink
Fixed toggle text change
Browse files Browse the repository at this point in the history
  • Loading branch information
Asgragrt committed Feb 24, 2024
1 parent 92686d1 commit 7c03136
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Patches/TogglePatch.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using HarmonyLib;
using Il2CppAssets.Scripts.PeroTools.Nice.Events;
using Il2CppAssets.Scripts.PeroTools.GeneralLocalization;
using Il2CppAssets.Scripts.UI.Panels;
using SelectiveEffects.Managers;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using Nice = Il2CppAssets.Scripts.PeroTools.Nice;

namespace SelectiveEffects.Patches
{
Expand Down Expand Up @@ -46,11 +47,14 @@ public static void Postfix(PnlMenu __instance)
Image checkMark = EffectsToggle.transform.Find("Background").GetChild(0).GetComponent<Image>();
checkMark.color = new(103 / 255f, 93 / 255f, 130 / 255f);

EffectsToggle.transform.position = new Vector3(-6.8f, -4.95f, 100f);
EffectsToggle.GetComponent<OnToggle>().enabled = false;
EffectsToggle.GetComponent<OnToggleOn>().enabled = false;
EffectsToggle.GetComponent<OnActivate>().enabled = false;

UnityEngine.Object.Destroy(txt.GetComponent<Localization>());
UnityEngine.Object.Destroy(EffectsToggle.GetComponent<Nice.Events.OnToggle>());
UnityEngine.Object.Destroy(EffectsToggle.GetComponent<Nice.Events.OnToggleOn>());
UnityEngine.Object.Destroy(EffectsToggle.GetComponent<Nice.Events.OnActivate>());
UnityEngine.Object.Destroy(EffectsToggle.GetComponent<Nice.Variables.VariableBehaviour>());

EffectsToggle.transform.position = new Vector3(-6.8f, -4.95f, 100f);
EffectsToggle.transform.SetParent(__instance.transform.Find("Panels").Find("PnlOption").Find("TxtVersion"));
}
}
Expand Down

0 comments on commit 7c03136

Please sign in to comment.