mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat(console): require double click to kill game
This commit is contained in:
parent
08f9485719
commit
47a2287e83
1 changed files with 19 additions and 2 deletions
|
|
@ -43,6 +43,8 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
private int historyPos;
|
||||
private List<string> history = new();
|
||||
|
||||
private bool killGameArmed = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ConsoleWindow"/> class.
|
||||
/// </summary>
|
||||
|
|
@ -63,6 +65,13 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
|
||||
private List<LogEntry> LogEntries => this.isFiltered ? this.filteredLogText : this.logText;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void OnOpen()
|
||||
{
|
||||
this.killGameArmed = false;
|
||||
base.OnOpen();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose of managed and unmanaged resources.
|
||||
/// </summary>
|
||||
|
|
@ -190,8 +199,16 @@ namespace Dalamud.Interface.Internal.Windows
|
|||
ImGui.SetTooltip("Copy Log");
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Skull))
|
||||
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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue