From 0a4e76bd6db2e8a5397aacd4320d190b3dc84335 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:54:46 +0100 Subject: [PATCH] Fix #592 (MOD OPTIONS closes when clicked on) --- src/OWML.ModHelper.Menus/NewMenuSystem/MenuManager.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/OWML.ModHelper.Menus/NewMenuSystem/MenuManager.cs b/src/OWML.ModHelper.Menus/NewMenuSystem/MenuManager.cs index 730ad8289..92cd6f85f 100644 --- a/src/OWML.ModHelper.Menus/NewMenuSystem/MenuManager.cs +++ b/src/OWML.ModHelper.Menus/NewMenuSystem/MenuManager.cs @@ -210,7 +210,15 @@ void SaveConfig() newModTab.OnDeactivateMenu += () => { - OptionsMenuManager.RemoveTab(newModTab); + // Fixes tab dissapearing when you click on it again + // Clicking on a tab closes and opens it again + _unityEvents.FireOnNextUpdate(() => + { + if (!newModTab._isActivated) + { + OptionsMenuManager.RemoveTab(newModTab); + } + }); }; foreach (var (name, setting) in mod.ModHelper.Config.Settings)