mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
Fix friends button theme not resetting when switching to vanilla
This commit is contained in:
1 parent
8884ce23d4
commit
c876c01c04
2 files changed
+11
No files matched your search
@@ -15,11 +15,21 @@ namespace BetterAmongUs.Patches.Client;
|
||||
[HarmonyPatch]
|
||||
internal static class ClientPatch
|
||||
{
|
||||
private static GameObject? friendsButton;
|
||||
internal static void Unpatch()
|
||||
{
|
||||
if (friendsButton != null)
|
||||
{
|
||||
friendsButton.SetSpriteColors(Color.white);
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(AccountTab), nameof(AccountTab.Awake))]
|
||||
[HarmonyPostfix]
|
||||
private static void AccountTab_Awake_Postfix(AccountTab __instance)
|
||||
{
|
||||
// Apply custom UI colors to the friends button
|
||||
friendsButton = __instance.signInStatusComponent.friendsButton;
|
||||
__instance.signInStatusComponent.friendsButton.SetUIColors();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ internal static class OptionsMenuBehaviourPatch
|
||||
// Clean up BAU mod components and return to vanilla Among Us
|
||||
ConsoleManager.DetachConsole();
|
||||
BetterNotificationManager.Detach();
|
||||
ClientPatch.Unpatch();
|
||||
Harmony.UnpatchAll();
|
||||
ModManager.Instance.ModStamp.gameObject.SetActive(false);
|
||||
SceneChanger.ChangeScene("MainMenu");
|
||||
|
||||
Reference in new issue
Block a user