diff --git a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs index a34d758f7..26e1d63ad 100644 --- a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs @@ -43,6 +43,8 @@ namespace Dalamud.Interface.Internal.Windows private int historyPos; private List history = new(); + private bool killGameArmed = false; + /// /// Initializes a new instance of the class. /// @@ -63,6 +65,13 @@ namespace Dalamud.Interface.Internal.Windows private List LogEntries => this.isFiltered ? this.filteredLogText : this.logText; + /// + public override void OnOpen() + { + this.killGameArmed = false; + base.OnOpen(); + } + /// /// Dispose of managed and unmanaged resources. /// @@ -190,8 +199,16 @@ namespace Dalamud.Interface.Internal.Windows ImGui.SetTooltip("Copy Log"); ImGui.SameLine(); - if (ImGuiComponents.IconButton(FontAwesomeIcon.Skull)) - Process.GetCurrentProcess().Kill(); + if (this.killGameArmed) + { + if (ImGuiComponents.IconButton(FontAwesomeIcon.Flushed)) + Process.GetCurrentProcess().Kill(); + } + else + { + if (ImGuiComponents.IconButton(FontAwesomeIcon.Skull)) + this.killGameArmed = true; + } if (ImGui.IsItemHovered()) ImGui.SetTooltip("Kill game");