mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
Merge branch 'net7' of ssh://github.com/goatcorp/Dalamud into net7
This commit is contained in:
commit
bb745fc23e
1 changed files with 17 additions and 1 deletions
|
|
@ -10,7 +10,9 @@ using Dalamud.Interface.Internal.Notifications;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin.Internal;
|
using Dalamud.Plugin.Internal;
|
||||||
using Dalamud.Plugin.Internal.Types;
|
using Dalamud.Plugin.Internal.Types;
|
||||||
|
using Dalamud.Utility;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Interface.Internal.Windows;
|
namespace Dalamud.Interface.Internal.Windows;
|
||||||
|
|
||||||
|
|
@ -20,6 +22,7 @@ namespace Dalamud.Interface.Internal.Windows;
|
||||||
internal class PluginStatWindow : Window
|
internal class PluginStatWindow : Window
|
||||||
{
|
{
|
||||||
private bool showDalamudHooks;
|
private bool showDalamudHooks;
|
||||||
|
private string hookSearchText = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PluginStatWindow"/> class.
|
/// Initializes a new instance of the <see cref="PluginStatWindow"/> class.
|
||||||
|
|
@ -211,6 +214,12 @@ internal class PluginStatWindow : Window
|
||||||
{
|
{
|
||||||
ImGui.Checkbox("Show Dalamud Hooks", ref this.showDalamudHooks);
|
ImGui.Checkbox("Show Dalamud Hooks", ref this.showDalamudHooks);
|
||||||
|
|
||||||
|
ImGui.InputTextWithHint(
|
||||||
|
"###PluginStatWindow_HookSearch",
|
||||||
|
"Search",
|
||||||
|
ref this.hookSearchText,
|
||||||
|
500);
|
||||||
|
|
||||||
if (ImGui.BeginTable(
|
if (ImGui.BeginTable(
|
||||||
"##PluginStatsHooks",
|
"##PluginStatsHooks",
|
||||||
4,
|
4,
|
||||||
|
|
@ -238,6 +247,13 @@ internal class PluginStatWindow : Window
|
||||||
if (!this.showDalamudHooks && trackedHook.Assembly == Assembly.GetExecutingAssembly())
|
if (!this.showDalamudHooks && trackedHook.Assembly == Assembly.GetExecutingAssembly())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!this.hookSearchText.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
if ((trackedHook.Delegate.Target == null || !trackedHook.Delegate.Target.ToString().Contains(this.hookSearchText, StringComparison.OrdinalIgnoreCase))
|
||||||
|
&& !trackedHook.Delegate.Method.Name.Contains(this.hookSearchText, StringComparison.OrdinalIgnoreCase))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.TableNextRow();
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
@ -281,7 +297,7 @@ internal class PluginStatWindow : Window
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ImGui.Text(ex.Message);
|
Log.Error(ex, "Error drawing hooks in plugin stats");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue