From 28e99f5e4dd6957b43bbc591487966b6df820046 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Sun, 18 Jul 2021 17:36:42 +0200 Subject: [PATCH] feat: add "kill game" button to console --- .../Internal/Windows/ConsoleWindow.cs | 42 +++---------------- 1 file changed, 5 insertions(+), 37 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs index 523d9fb64..92aa1a0c9 100644 --- a/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs +++ b/Dalamud/Interface/Internal/Windows/ConsoleWindow.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Numerics; using System.Runtime.InteropServices; @@ -132,43 +133,6 @@ namespace Dalamud.Interface.Internal.Windows this.dalamud.Configuration.Save(); } - /* TEST */ - - if (ImGui.Button("Multiline test")) - { - Log.Verbose("This is a test\nTruly a multi-line test\nas it has always been.\nThank you."); - } - - if (ImGui.Button("Single line test")) - { - Log.Debug("This is a test"); - } - - if (ImGui.Button("WARNING!!")) - { - Log.Warning("I want to warn you"); - } - - if (ImGui.Button("Add 50000")) - { - for (var i = 0; i < 50000; i++) - Log.Debug("TEST " + i); - } - - if (ImGui.Button("Exception")) - { - try - { - var a = 0; - var b = 1; - var c = b / a; - } - catch (Exception e) - { - Log.Error(e, "There has been a serious problem"); - } - } - ImGui.EndPopup(); } @@ -210,6 +174,10 @@ namespace Dalamud.Interface.Internal.Windows ImGui.SameLine(); var copy = ImGui.Button(FontAwesomeIcon.Copy.ToIconString()); + ImGui.SameLine(); + if (ImGui.Button(FontAwesomeIcon.Skull.ToIconString())) + Process.GetCurrentProcess().Kill(); + ImGui.PopFont(); ImGui.BeginChild("scrolling", new Vector2(0, ImGui.GetFrameHeightWithSpacing() - 55), false, ImGuiWindowFlags.HorizontalScrollbar);