mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 05:17:42 +01:00
Update Addon Inspector
This updates the Addon Inspector with lots of new features and functionality. - Features from Caraxi's fork of UiDebug have been incorporated, such as the Element Selector UI and address search. - Any addon or node can now pop out into its own window. - Revised the visual style of node field/property information. - Color values are now visually displayed. - Any nodes or components that are referenced by fields within the addon will now show that field name in the inspector. - Added editors for nodes, allowing complete control over most of their properties. - Improved texture display for Image nodes (and Image node variant types). The active part of the texture is now highlighted, and the boundaries of other parts can be shown via mouseover. - Highlighting of node bounds onscreen is now more accurate, factoring in rotation (including when using the Element Selector). - Display of animation timelines has been revamped, showing a table of keyframes for each animation. A standalone SamplePlugin-based version is available here: https://github.com/ItsBexy/UiDebug2
This commit is contained in:
parent
0fb7585973
commit
bf8690fc60
23 changed files with 4039 additions and 3 deletions
50
Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs
Normal file
50
Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System.Numerics;
|
||||
|
||||
using Dalamud.Interface.Internal.UiDebug2.Browsing;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.UiDebug2;
|
||||
|
||||
/// <summary>
|
||||
/// A popout window for an <see cref="AddonTree"/>.
|
||||
/// </summary>
|
||||
internal class AddonPopoutWindow : Window, IDisposable
|
||||
{
|
||||
private readonly AddonTree addonTree;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AddonPopoutWindow"/> class.
|
||||
/// </summary>
|
||||
/// <param name="tree">The AddonTree this popout will show.</param>
|
||||
/// <param name="name">the window's name.</param>
|
||||
public AddonPopoutWindow(AddonTree tree, string name)
|
||||
: base(name)
|
||||
{
|
||||
this.addonTree = tree;
|
||||
this.PositionCondition = ImGuiCond.Once;
|
||||
|
||||
var pos = ImGui.GetMousePos() + new Vector2(50, -50);
|
||||
var workSize = ImGui.GetMainViewport().WorkSize;
|
||||
var pos2 = new Vector2(Math.Min(workSize.X - 750, pos.X), Math.Min(workSize.Y - 250, pos.Y));
|
||||
|
||||
this.Position = pos2;
|
||||
this.SizeCondition = ImGuiCond.Once;
|
||||
this.Size = new(700, 200);
|
||||
this.IsOpen = true;
|
||||
this.SizeConstraints = new() { MinimumSize = new(100, 100) };
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Draw()
|
||||
{
|
||||
ImGui.BeginChild($"{this.WindowName}child", new(-1, -1), true);
|
||||
this.addonTree.Draw();
|
||||
ImGui.EndChild();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue