From 4f292bd2d392252c2920a113fc5c61ab724b57da Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Fri, 11 Jul 2025 17:05:50 +0800 Subject: [PATCH] window logic fix --- UXAssist/Patches/UIPatch.cs | 7 +++++++ UXAssist/UI/MyCheckButton.cs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/UXAssist/Patches/UIPatch.cs b/UXAssist/Patches/UIPatch.cs index b329a13..12d6cd1 100644 --- a/UXAssist/Patches/UIPatch.cs +++ b/UXAssist/Patches/UIPatch.cs @@ -42,6 +42,13 @@ public class UIPatch: PatchImpl return Functions.UIFunctions.CornerComboBoxIndex == 0; } + [HarmonyPostfix] + [HarmonyPatch(typeof(UIStarmapStar), nameof(UIStarmapStar._OnClose))] + private static void UIStarmapStar__OnClose_Postfix(UIStarmapStar __instance) + { + Functions.UIFunctions.StarmapFilterToggler?.SetCheckedWithEvent(false); + } + [HarmonyPrefix] [HarmonyPatch(typeof(UIMechaLab), nameof(UIMechaLab.DetermineVisible))] private static bool UIMechaLab_DetermineVisible_Prefix(UIMechaLab __instance, ref bool __result) diff --git a/UXAssist/UI/MyCheckButton.cs b/UXAssist/UI/MyCheckButton.cs index 42f1f18..d4a2618 100644 --- a/UXAssist/UI/MyCheckButton.cs +++ b/UXAssist/UI/MyCheckButton.cs @@ -111,6 +111,13 @@ public class MyCheckButton : MonoBehaviour } } + public void SetCheckedWithEvent(bool check) + { + if (_checked == check) return; + Checked = check; + OnChecked?.Invoke(); + } + public void SetLabelText(string val) { if (labelText != null)