Misc UiDebug2 Fixes

- The widget will now only check the `FFXIVClientStructs` assembly for addon type information.
- Updated ImRaii usage
- Clarified suppression in `NodeTree.Text.cs`
- Restored the original Addon Inspector in the Data window, so that both versions can coexist for the time being
This commit is contained in:
ItsBexy 2024-10-17 10:52:22 -06:00
parent e19f9284e5
commit 552aafd70d
17 changed files with 379 additions and 347 deletions

View file

@ -21,6 +21,7 @@ internal class DataWindow : Window, IDisposable
private readonly IDataWindowWidget[] modules =
{
new AddonInspectorWidget(),
new AddonInspectorWidget2(),
new AddonLifecycleWidget(),
new AddonWidget(),
new AddressesWidget(),

View file

@ -5,7 +5,7 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
/// </summary>
internal class AddonInspectorWidget : IDataWindowWidget
{
private UiDebug2.UiDebug2? addonInspector;
private UiDebug? addonInspector;
/// <inheritdoc/>
public string[]? CommandShortcuts { get; init; } = { "ai", "addoninspector" };
@ -19,7 +19,7 @@ internal class AddonInspectorWidget : IDataWindowWidget
/// <inheritdoc/>
public void Load()
{
this.addonInspector = new UiDebug2.UiDebug2();
this.addonInspector = new UiDebug();
if (this.addonInspector is not null)
{

View file

@ -0,0 +1,35 @@
namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
/// <summary>
/// Widget for displaying addon inspector.
/// </summary>
internal class AddonInspectorWidget2 : IDataWindowWidget
{
private UiDebug2.UiDebug2? addonInspector2;
/// <inheritdoc/>
public string[]? CommandShortcuts { get; init; } = ["ai2", "addoninspector2"];
/// <inheritdoc/>
public string DisplayName { get; init; } = "Addon Inspector v2 (Testing)";
/// <inheritdoc/>
public bool Ready { get; set; }
/// <inheritdoc/>
public void Load()
{
this.addonInspector2 = new UiDebug2.UiDebug2();
if (this.addonInspector2 is not null)
{
this.Ready = true;
}
}
/// <inheritdoc/>
public void Draw()
{
this.addonInspector2?.Draw();
}
}