From 795c8a6bb5968a1a5e2fd9648ad8211d12152219 Mon Sep 17 00:00:00 2001 From: Infi Date: Thu, 11 Apr 2024 16:12:57 +0200 Subject: [PATCH] We don't respect the close key in any window --- ChatTwo/Ui/ChatLogWindow.cs | 2 ++ ChatTwo/Ui/CommandHelpWindow.cs | 2 ++ ChatTwo/Ui/Popout.cs | 2 ++ ChatTwo/Ui/SeStringDebugger.cs | 2 ++ ChatTwo/Ui/Settings.cs | 2 ++ 5 files changed, 10 insertions(+) diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index f751aba..458a67f 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -79,6 +79,8 @@ public sealed class ChatLogWindow : Window, IUiComponent { Size = new Vector2(500, 250); SizeCondition = ImGuiCond.FirstUseEver; + RespectCloseHotkey = false; + PayloadHandler = new PayloadHandler(this); HandlerLender = new Lender(() => new PayloadHandler(this)); diff --git a/ChatTwo/Ui/CommandHelpWindow.cs b/ChatTwo/Ui/CommandHelpWindow.cs index 23590a3..1b69065 100644 --- a/ChatTwo/Ui/CommandHelpWindow.cs +++ b/ChatTwo/Ui/CommandHelpWindow.cs @@ -18,6 +18,8 @@ public class CommandHelpWindow : Window { Flags = ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoFocusOnAppearing | ImGuiWindowFlags.AlwaysAutoResize; + + RespectCloseHotkey = false; } // Sets IsOpen to true if it should be drawn diff --git a/ChatTwo/Ui/Popout.cs b/ChatTwo/Ui/Popout.cs index 96c0dfa..31d6a94 100644 --- a/ChatTwo/Ui/Popout.cs +++ b/ChatTwo/Ui/Popout.cs @@ -19,6 +19,8 @@ internal class Popout : Window Size = new Vector2(350, 350); SizeCondition = ImGuiCond.FirstUseEver; + + RespectCloseHotkey = false; } public override void PreDraw() diff --git a/ChatTwo/Ui/SeStringDebugger.cs b/ChatTwo/Ui/SeStringDebugger.cs index 4673ffd..38a985f 100644 --- a/ChatTwo/Ui/SeStringDebugger.cs +++ b/ChatTwo/Ui/SeStringDebugger.cs @@ -22,6 +22,8 @@ public class SeStringDebugger : Window MaximumSize = new Vector2(float.MaxValue, float.MaxValue) }; + RespectCloseHotkey = false; + #if DEBUG Plugin.Commands.Register("/chat2Debugger").Execute += Toggle; #endif diff --git a/ChatTwo/Ui/Settings.cs b/ChatTwo/Ui/Settings.cs index 436a631..c877c4d 100755 --- a/ChatTwo/Ui/Settings.cs +++ b/ChatTwo/Ui/Settings.cs @@ -40,6 +40,8 @@ public sealed class SettingsWindow : Window, IUiComponent new About(), }; + RespectCloseHotkey = false; + Initialise(); Plugin.Commands.Register("/chat2", "Perform various actions with Chat 2.").Execute += Command;