Fix friends button theme not resetting when switching to vanilla

This commit is contained in:
D1GQ committed 2026-03-29 18:53:40 -05:00
1 parent 8884ce23d4
commit c876c01c04
2 files changed
+11

No files matched your search

+10
View File
@@ -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");