diff --git a/Dalamud/Interface/Internal/UiDebug.cs b/Dalamud/Interface/Internal/UiDebug.cs deleted file mode 100644 index a79cc1880..000000000 --- a/Dalamud/Interface/Internal/UiDebug.cs +++ /dev/null @@ -1,675 +0,0 @@ -using System.Numerics; - -using Dalamud.Bindings.ImGui; -using Dalamud.Game; -using Dalamud.Game.Gui; -using Dalamud.Interface.ImGuiSeStringRenderer.Internal; -using Dalamud.Interface.Textures.Internal; -using Dalamud.Interface.Utility; -using Dalamud.Utility; - -using FFXIVClientStructs.FFXIV.Client.System.String; -using FFXIVClientStructs.FFXIV.Client.UI.Misc; -using FFXIVClientStructs.FFXIV.Component.GUI; - -// Customised version of https://github.com/aers/FFXIVUIDebug - -namespace Dalamud.Interface.Internal; - -/// -/// This class displays a debug window to inspect native addons. -/// -internal unsafe class UiDebug -{ - private const int UnitListCount = 18; - - private readonly bool[] selectedInList = new bool[UnitListCount]; - private readonly string[] listNames = - [ - "Depth Layer 1", - "Depth Layer 2", - "Depth Layer 3", - "Depth Layer 4", - "Depth Layer 5", - "Depth Layer 6", - "Depth Layer 7", - "Depth Layer 8", - "Depth Layer 9", - "Depth Layer 10", - "Depth Layer 11", - "Depth Layer 12", - "Depth Layer 13", - "Loaded Units", - "Focused Units", - "Units 16", - "Units 17", - "Units 18", - ]; - - private bool doingSearch; - private string searchInput = string.Empty; - private AtkUnitBase* selectedUnitBase = null; - - /// - /// Initializes a new instance of the class. - /// - public UiDebug() - { - } - - /// - /// Renders this window. - /// - public void Draw() - { - ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(3, 2)); - ImGui.BeginChild("st_uiDebug_unitBaseSelect"u8, new Vector2(250, -1), true); - - ImGui.SetNextItemWidth(-1); - ImGui.InputTextWithHint("###atkUnitBaseSearch"u8, "Search"u8, ref this.searchInput, 0x20); - - this.DrawUnitBaseList(); - ImGui.EndChild(); - if (this.selectedUnitBase != null) - { - ImGui.SameLine(); - ImGui.BeginChild("st_uiDebug_selectedUnitBase"u8, new Vector2(-1, -1), true); - this.DrawUnitBase(this.selectedUnitBase); - ImGui.EndChild(); - } - - ImGui.PopStyleVar(); - } - - private void DrawUnitBase(AtkUnitBase* atkUnitBase) - { - var isVisible = atkUnitBase->IsVisible; - var addonName = atkUnitBase->NameString; - var agent = Service.Get().FindAgentInterface(atkUnitBase); - - ImGui.Text(addonName); - ImGui.SameLine(); - ImGui.PushStyleColor(ImGuiCol.Text, isVisible ? 0xFF00FF00 : 0xFF0000FF); - ImGui.Text(isVisible ? "Visible" : "Not Visible"); - ImGui.PopStyleColor(); - - ImGui.SameLine(ImGui.GetWindowContentRegionMax().X - ImGui.GetWindowContentRegionMin().X - 25); - if (ImGui.SmallButton("V"u8)) - { - atkUnitBase->IsVisible = !atkUnitBase->IsVisible; - } - - ImGui.Separator(); - ImGuiHelpers.ClickToCopyText($"Address: {(nint)atkUnitBase:X}", $"{(nint)atkUnitBase:X}"); - ImGuiHelpers.ClickToCopyText($"Agent: {(nint)agent:X}", $"{(nint)agent:X}"); - ImGui.Separator(); - - ImGui.Text($"Position: [ {atkUnitBase->X} , {atkUnitBase->Y} ]"); - ImGui.Text($"Scale: {atkUnitBase->Scale * 100}%"); - ImGui.Text($"Widget Count {atkUnitBase->UldManager.ObjectCount}"); - - ImGui.Separator(); - - object addonObj = *atkUnitBase; - - Util.ShowStruct(addonObj, (ulong)atkUnitBase); - - ImGui.Dummy(new Vector2(25 * ImGui.GetIO().FontGlobalScale)); - ImGui.Separator(); - if (atkUnitBase->RootNode != null) - this.PrintNode(atkUnitBase->RootNode); - - if (atkUnitBase->UldManager.NodeListCount > 0) - { - ImGui.Dummy(new Vector2(25 * ImGui.GetIO().FontGlobalScale)); - ImGui.Separator(); - ImGui.PushStyleColor(ImGuiCol.Text, 0xFFFFAAAA); - if (ImGui.TreeNode($"Node List##{(ulong)atkUnitBase:X}")) - { - ImGui.PopStyleColor(); - - for (var j = 0; j < atkUnitBase->UldManager.NodeListCount; j++) - { - this.PrintNode(atkUnitBase->UldManager.NodeList[j], false, $"[{j}] "); - } - - ImGui.TreePop(); - } - else - { - ImGui.PopStyleColor(); - } - } - } - - private void PrintNode(AtkResNode* node, bool printSiblings = true, string treePrefix = "") - { - if (node == null) - return; - - if ((int)node->Type < 1000) - this.PrintSimpleNode(node, treePrefix); - else - this.PrintComponentNode(node, treePrefix); - - if (printSiblings) - { - var prevNode = node; - while ((prevNode = prevNode->PrevSiblingNode) != null) - this.PrintNode(prevNode, false, "prev "); - - var nextNode = node; - while ((nextNode = nextNode->NextSiblingNode) != null) - this.PrintNode(nextNode, false, "next "); - } - } - - private void PrintSimpleNode(AtkResNode* node, string treePrefix) - { - var popped = false; - var isVisible = node->NodeFlags.HasFlag(NodeFlags.Visible); - - if (isVisible) - ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0, 255, 0, 255)); - - if (ImGui.TreeNode($"{treePrefix}{node->Type} Node (ptr = {(long)node:X})###{(long)node}")) - { - if (ImGui.IsItemHovered()) - this.DrawOutline(node); - - if (isVisible) - { - ImGui.PopStyleColor(); - popped = true; - } - - ImGui.Text("Node: "u8); - ImGui.SameLine(); - ImGuiHelpers.ClickToCopyText($"{(ulong)node:X}"); - ImGui.SameLine(); - switch (node->Type) - { - case NodeType.Text: Util.ShowStruct(*(AtkTextNode*)node, (ulong)node); break; - case NodeType.Image: Util.ShowStruct(*(AtkImageNode*)node, (ulong)node); break; - case NodeType.Collision: Util.ShowStruct(*(AtkCollisionNode*)node, (ulong)node); break; - case NodeType.NineGrid: Util.ShowStruct(*(AtkNineGridNode*)node, (ulong)node); break; - case NodeType.ClippingMask: Util.ShowStruct(*(AtkClippingMaskNode*)node, (ulong)node); break; - case NodeType.Counter: Util.ShowStruct(*(AtkCounterNode*)node, (ulong)node); break; - default: Util.ShowStruct(*node, (ulong)node); break; - } - - this.PrintResNode(node); - - if (node->ChildNode != null) - this.PrintNode(node->ChildNode); - - switch (node->Type) - { - case NodeType.Text: - var textNode = (AtkTextNode*)node; - ImGui.Text("text: "u8); - ImGui.SameLine(); - Service.Get().Draw(textNode->NodeText); - - ImGui.InputText($"Replace Text##{(ulong)textNode:X}", new(textNode->NodeText.StringPtr, (int)textNode->NodeText.BufSize)); - - ImGui.SameLine(); - if (ImGui.Button($"Encode##{(ulong)textNode:X}")) - { - using var tmp = new Utf8String(); - RaptureTextModule.Instance()->MacroEncoder.EncodeString(&tmp, textNode->NodeText.StringPtr); - textNode->NodeText.Copy(&tmp); - } - - ImGui.SameLine(); - if (ImGui.Button($"Decode##{(ulong)textNode:X}")) - textNode->NodeText.SetString(textNode->NodeText.StringPtr.AsReadOnlySeStringSpan().ToString()); - - ImGui.Text($"AlignmentType: {(AlignmentType)textNode->AlignmentFontType} FontSize: {textNode->FontSize}"); - int b = textNode->AlignmentFontType; - if (ImGui.InputInt($"###setAlignment{(ulong)textNode:X}", ref b, 1)) - { - while (b > byte.MaxValue) b -= byte.MaxValue; - while (b < byte.MinValue) b += byte.MaxValue; - textNode->AlignmentFontType = (byte)b; - textNode->AtkResNode.DrawFlags |= 0x1; - } - - ImGui.Text($"Color: #{textNode->TextColor.R:X2}{textNode->TextColor.G:X2}{textNode->TextColor.B:X2}{textNode->TextColor.A:X2}"); - ImGui.SameLine(); - ImGui.Text($"EdgeColor: #{textNode->EdgeColor.R:X2}{textNode->EdgeColor.G:X2}{textNode->EdgeColor.B:X2}{textNode->EdgeColor.A:X2}"); - ImGui.SameLine(); - ImGui.Text($"BGColor: #{textNode->BackgroundColor.R:X2}{textNode->BackgroundColor.G:X2}{textNode->BackgroundColor.B:X2}{textNode->BackgroundColor.A:X2}"); - - ImGui.Text($"TextFlags: {textNode->TextFlags}"); - - break; - case NodeType.Counter: - var counterNode = (AtkCounterNode*)node; - ImGui.Text("text: "u8); - ImGui.SameLine(); - Service.Get().Draw(counterNode->NodeText); - break; - case NodeType.Image: - var imageNode = (AtkImageNode*)node; - PrintTextureInfo(imageNode->PartsList, imageNode->PartId); - break; - case NodeType.NineGrid: - var ngNode = (AtkNineGridNode*)node; - PrintTextureInfo(ngNode->PartsList, ngNode->PartId); - break; - case NodeType.ClippingMask: - var cmNode = (AtkClippingMaskNode*)node; - PrintTextureInfo(cmNode->PartsList, cmNode->PartId); - break; - } - - ImGui.TreePop(); - } - else if (ImGui.IsItemHovered()) - { - this.DrawOutline(node); - } - - if (isVisible && !popped) - ImGui.PopStyleColor(); - - static void PrintTextureInfo(AtkUldPartsList* partsList, uint partId) - { - if (partsList != null) - { - if (partId > partsList->PartCount) - { - ImGui.Text("part id > part count?"u8); - } - else - { - var textureInfo = partsList->Parts[partId].UldAsset; - var texType = textureInfo->AtkTexture.TextureType; - ImGui.Text( - $"texture type: {texType} part_id={partId} part_id_count={partsList->PartCount}"); - if (texType == TextureType.Resource) - { - ImGui.Text( - $"texture path: {textureInfo->AtkTexture.Resource->TexFileResourceHandle->ResourceHandle.FileName}"); - var kernelTexture = textureInfo->AtkTexture.Resource->KernelTextureObject; - - if (ImGui.TreeNode($"Texture##{(ulong)kernelTexture->D3D11ShaderResourceView:X}")) - { - ImGui.Image( - new ImTextureID(kernelTexture->D3D11ShaderResourceView), - new Vector2(kernelTexture->ActualWidth, kernelTexture->ActualHeight)); - ImGui.TreePop(); - } - } - else if (texType == TextureType.KernelTexture) - { - if (ImGui.TreeNode( - $"Texture##{(ulong)textureInfo->AtkTexture.KernelTexture->D3D11ShaderResourceView:X}")) - { - ImGui.Image( - new ImTextureID(textureInfo->AtkTexture.KernelTexture->D3D11ShaderResourceView), - new Vector2( - textureInfo->AtkTexture.KernelTexture->ActualWidth, - textureInfo->AtkTexture.KernelTexture->ActualHeight)); - ImGui.TreePop(); - } - } - - if (ImGui.Button($"Replace with a random image##{(ulong)textureInfo:X}")) - { - var texm = Service.Get(); - texm.Shared - .GetFromGame( - Random.Shared.Next(0, 1) == 0 - ? $"ui/loadingimage/-nowloading_base{Random.Shared.Next(1, 33)}.tex" - : $"ui/loadingimage/-nowloading_base{Random.Shared.Next(1, 33)}_hr1.tex") - .RentAsync() - .ContinueWith( - r => Service.Get().RunOnFrameworkThread( - () => - { - if (!r.IsCompletedSuccessfully) - return; - - using (r.Result) - { - textureInfo->AtkTexture.ReleaseTexture(); - textureInfo->AtkTexture.KernelTexture = - texm.ConvertToKernelTexture(r.Result); - textureInfo->AtkTexture.TextureType = TextureType.KernelTexture; - } - })); - } - } - } - else - { - ImGui.Text("no texture loaded"u8); - } - } - } - - private void PrintComponentNode(AtkResNode* node, string treePrefix) - { - var compNode = (AtkComponentNode*)node; - - var popped = false; - var isVisible = node->NodeFlags.HasFlag(NodeFlags.Visible); - - var componentInfo = compNode->Component->UldManager; - - var childCount = componentInfo.NodeListCount; - - var objectInfo = (AtkUldComponentInfo*)componentInfo.Objects; - if (objectInfo == null) - { - return; - } - - if (isVisible) - ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0, 255, 0, 255)); - - if (ImGui.TreeNode($"{treePrefix}{objectInfo->ComponentType} Component Node (ptr = {(long)node:X}, component ptr = {(long)compNode->Component:X}) child count = {childCount} ###{(long)node}")) - { - if (ImGui.IsItemHovered()) - this.DrawOutline(node); - - if (isVisible) - { - ImGui.PopStyleColor(); - popped = true; - } - - ImGui.Text("Node: "u8); - ImGui.SameLine(); - ImGuiHelpers.ClickToCopyText($"{(ulong)node:X}"); - ImGui.SameLine(); - Util.ShowStruct(*compNode, (ulong)compNode); - ImGui.Text("Component: "u8); - ImGui.SameLine(); - ImGuiHelpers.ClickToCopyText($"{(ulong)compNode->Component:X}"); - ImGui.SameLine(); - - switch (objectInfo->ComponentType) - { - case ComponentType.Button: Util.ShowStruct(*(AtkComponentButton*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.Slider: Util.ShowStruct(*(AtkComponentSlider*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.Window: Util.ShowStruct(*(AtkComponentWindow*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.CheckBox: Util.ShowStruct(*(AtkComponentCheckBox*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.GaugeBar: Util.ShowStruct(*(AtkComponentGaugeBar*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.RadioButton: Util.ShowStruct(*(AtkComponentRadioButton*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.TextInput: Util.ShowStruct(*(AtkComponentTextInput*)compNode->Component, (ulong)compNode->Component); break; - case ComponentType.Icon: Util.ShowStruct(*(AtkComponentIcon*)compNode->Component, (ulong)compNode->Component); break; - default: Util.ShowStruct(*compNode->Component, (ulong)compNode->Component); break; - } - - this.PrintResNode(node); - this.PrintNode(componentInfo.RootNode); - - switch (objectInfo->ComponentType) - { - case ComponentType.TextInput: - var textInputComponent = (AtkComponentTextInput*)compNode->Component; - ImGui.Text("InputBase Text1: "u8); - ImGui.SameLine(); - Service.Get().Draw(textInputComponent->AtkComponentInputBase.EvaluatedString); - - ImGui.Text("InputBase Text2: "u8); - ImGui.SameLine(); - Service.Get().Draw(textInputComponent->AtkComponentInputBase.RawString); - - // ImGui.Text("Text1: "u8); - // ImGui.SameLine(); - // Service.Get().Draw(textInputComponent->UnkText01); - // - // ImGui.Text("Text2: "u8); - // ImGui.SameLine(); - // Service.Get().Draw(textInputComponent->UnkText02); - - ImGui.Text("AvailableLines: "u8); - ImGui.SameLine(); - Service.Get().Draw(textInputComponent->AvailableLines); - - ImGui.Text("HighlightedAutoTranslateOptionColorPrefix: "u8); - ImGui.SameLine(); - Service.Get().Draw(textInputComponent->HighlightedAutoTranslateOptionColorPrefix); - - ImGui.Text("HighlightedAutoTranslateOptionColorSuffix: "u8); - ImGui.SameLine(); - Service.Get().Draw(textInputComponent->HighlightedAutoTranslateOptionColorSuffix); - break; - } - - ImGui.PushStyleColor(ImGuiCol.Text, 0xFFFFAAAA); - if (ImGui.TreeNode($"Node List##{(ulong)node:X}")) - { - ImGui.PopStyleColor(); - - for (var i = 0; i < compNode->Component->UldManager.NodeListCount; i++) - { - this.PrintNode(compNode->Component->UldManager.NodeList[i], false, $"[{i}] "); - } - - ImGui.TreePop(); - } - else - { - ImGui.PopStyleColor(); - } - - ImGui.TreePop(); - } - else if (ImGui.IsItemHovered()) - { - this.DrawOutline(node); - } - - if (isVisible && !popped) - ImGui.PopStyleColor(); - } - - private void PrintResNode(AtkResNode* node) - { - ImGui.Text($"NodeID: {node->NodeId}"); - ImGui.SameLine(); - if (ImGui.SmallButton($"T:Visible##{(ulong)node:X}")) - { - node->NodeFlags ^= NodeFlags.Visible; - } - - ImGui.SameLine(); - if (ImGui.SmallButton($"C:Ptr##{(ulong)node:X}")) - { - ImGui.SetClipboardText($"{(ulong)node:X}"); - } - - ImGui.Text( - $"X: {node->X} Y: {node->Y} " + - $"ScaleX: {node->ScaleX} ScaleY: {node->ScaleY} " + - $"Rotation: {node->Rotation} " + - $"Width: {node->Width} Height: {node->Height} " + - $"OriginX: {node->OriginX} OriginY: {node->OriginY}"); - ImGui.Text( - $"RGBA: 0x{node->Color.R:X2}{node->Color.G:X2}{node->Color.B:X2}{node->Color.A:X2} " + - $"AddRGB: {node->AddRed} {node->AddGreen} {node->AddBlue} " + - $"MultiplyRGB: {node->MultiplyRed} {node->MultiplyGreen} {node->MultiplyBlue}"); - } - - private bool DrawUnitListHeader(int index, ushort count, ulong ptr, bool highlight) - { - ImGui.PushStyleColor(ImGuiCol.Text, highlight ? 0xFFAAAA00 : 0xFFFFFFFF); - if (!string.IsNullOrEmpty(this.searchInput) && !this.doingSearch) - { - ImGui.SetNextItemOpen(true, ImGuiCond.Always); - } - else if (this.doingSearch && string.IsNullOrEmpty(this.searchInput)) - { - ImGui.SetNextItemOpen(false, ImGuiCond.Always); - } - - var treeNode = ImGui.TreeNode($"{this.listNames[index]}##unitList_{index}"); - ImGui.PopStyleColor(); - - ImGui.SameLine(); - ImGui.TextDisabled($"C:{count} {ptr:X}"); - return treeNode; - } - - private void DrawUnitBaseList() - { - var foundSelected = false; - var noResults = true; - var stage = AtkStage.Instance(); - - var unitManagers = &stage->RaptureAtkUnitManager->AtkUnitManager.DepthLayerOneList; - - var searchStr = this.searchInput; - var searching = !string.IsNullOrEmpty(searchStr); - - for (var i = 0; i < UnitListCount; i++) - { - var headerDrawn = false; - - var highlight = this.selectedUnitBase != null && this.selectedInList[i]; - this.selectedInList[i] = false; - var unitManager = &unitManagers[i]; - - var headerOpen = true; - - if (!searching) - { - headerOpen = this.DrawUnitListHeader(i, unitManager->Count, (ulong)unitManager, highlight); - headerDrawn = true; - noResults = false; - } - - for (var j = 0; j < unitManager->Count && headerOpen; j++) - { - AtkUnitBase* unitBase = unitManager->Entries[j]; - if (this.selectedUnitBase != null && unitBase == this.selectedUnitBase) - { - this.selectedInList[i] = true; - foundSelected = true; - } - - var name = unitBase->NameString; - if (searching) - { - if (name == null || !name.Contains(searchStr, StringComparison.InvariantCultureIgnoreCase)) continue; - } - - noResults = false; - if (!headerDrawn) - { - headerOpen = this.DrawUnitListHeader(i, unitManager->Count, (ulong)unitManager, highlight); - headerDrawn = true; - } - - if (headerOpen) - { - var visible = unitBase->IsVisible; - ImGui.PushStyleColor(ImGuiCol.Text, visible ? 0xFF00FF00 : 0xFF999999); - - if (ImGui.Selectable($"{name}##list{i}-{(ulong)unitBase:X}_{j}", this.selectedUnitBase == unitBase)) - { - this.selectedUnitBase = unitBase; - foundSelected = true; - this.selectedInList[i] = true; - } - - ImGui.PopStyleColor(); - } - } - - if (headerDrawn && headerOpen) - { - ImGui.TreePop(); - } - - if (this.selectedInList[i] == false && this.selectedUnitBase != null) - { - for (var j = 0; j < unitManager->Count; j++) - { - AtkUnitBase* unitBase = unitManager->Entries[j]; - if (this.selectedUnitBase == null || unitBase != this.selectedUnitBase) continue; - this.selectedInList[i] = true; - foundSelected = true; - } - } - } - - if (noResults) - { - ImGui.TextDisabled("No Results"u8); - } - - if (!foundSelected) - { - this.selectedUnitBase = null; - } - - if (this.doingSearch && string.IsNullOrEmpty(this.searchInput)) - { - this.doingSearch = false; - } - else if (!this.doingSearch && !string.IsNullOrEmpty(this.searchInput)) - { - this.doingSearch = true; - } - } - - private Vector2 GetNodePosition(AtkResNode* node) - { - var pos = new Vector2(node->X, node->Y); - pos -= new Vector2(node->OriginX * (node->ScaleX - 1), node->OriginY * (node->ScaleY - 1)); - var par = node->ParentNode; - while (par != null) - { - pos *= new Vector2(par->ScaleX, par->ScaleY); - pos += new Vector2(par->X, par->Y); - pos -= new Vector2(par->OriginX * (par->ScaleX - 1), par->OriginY * (par->ScaleY - 1)); - par = par->ParentNode; - } - - return pos; - } - - private Vector2 GetNodeScale(AtkResNode* node) - { - if (node == null) return new Vector2(1, 1); - var scale = new Vector2(node->ScaleX, node->ScaleY); - while (node->ParentNode != null) - { - node = node->ParentNode; - scale *= new Vector2(node->ScaleX, node->ScaleY); - } - - return scale; - } - - private bool GetNodeVisible(AtkResNode* node) - { - if (node == null) return false; - while (node != null) - { - if (!node->NodeFlags.HasFlag(NodeFlags.Visible)) return false; - node = node->ParentNode; - } - - return true; - } - - private void DrawOutline(AtkResNode* node) - { - var position = this.GetNodePosition(node); - var scale = this.GetNodeScale(node); - var size = new Vector2(node->Width, node->Height) * scale; - - var nodeVisible = this.GetNodeVisible(node); - - position += ImGuiHelpers.MainViewport.Pos; - - ImGui.GetForegroundDrawList(ImGuiHelpers.MainViewport).AddRect(position, position + size, nodeVisible ? 0xFF00FF00 : 0xFF0000FF); - } -} diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.AtkValues.cs similarity index 97% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.AtkValues.cs index ed9ed2150..646d4e3ad 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.AtkValues.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.AtkValues.cs @@ -1,7 +1,7 @@ using System.Numerics; using Dalamud.Bindings.ImGui; -using Dalamud.Interface.Internal.UiDebug2.Utility; +using Dalamud.Interface.Internal.UiDebug.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Utility; @@ -9,7 +9,7 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.ValueType; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// public unsafe partial class AddonTree diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.FieldNames.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.FieldNames.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.FieldNames.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.FieldNames.cs index 6ff58d657..3470b724b 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.FieldNames.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.FieldNames.cs @@ -7,9 +7,9 @@ using FFXIVClientStructs.Attributes; using FFXIVClientStructs.FFXIV.Component.GUI; using static System.Reflection.BindingFlags; -using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; +using static Dalamud.Interface.Internal.UiDebug.UiDebug; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// public unsafe partial class AddonTree diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.cs similarity index 96% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.cs index 2e0874206..954755708 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/AddonTree.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/AddonTree.cs @@ -8,12 +8,12 @@ using Dalamud.Interface.Components; using FFXIVClientStructs.FFXIV.Component.GUI; using static Dalamud.Interface.FontAwesomeIcon; -using static Dalamud.Interface.Internal.UiDebug2.ElementSelector; -using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.ElementSelector; +using static Dalamud.Interface.Internal.UiDebug.UiDebug; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A class representing an , allowing it to be browsed within an ImGui window. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/Events.cs similarity index 97% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/Events.cs index ed1926ce9..6e56c75f8 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/Events.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/Events.cs @@ -9,7 +9,7 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; using static Dalamud.Bindings.ImGui.ImGuiTableFlags; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// Class that prints the events table for a node, where applicable. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.ClippingMask.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.ClippingMask.cs similarity index 95% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.ClippingMask.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.ClippingMask.cs index cfba1a2bc..f9fb3b73d 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.ClippingMask.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.ClippingMask.cs @@ -2,7 +2,7 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using static Dalamud.Utility.Util; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Collision.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Collision.cs similarity index 93% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Collision.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Collision.cs index c447afac9..d6370d33f 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Collision.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Collision.cs @@ -2,7 +2,7 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using static Dalamud.Utility.Util; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Component.cs similarity index 99% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Component.cs index 13d559c11..fb4444be1 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Component.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Component.cs @@ -6,11 +6,11 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using Lumina.Text.ReadOnly; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.ComponentType; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Counter.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Counter.cs similarity index 90% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Counter.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Counter.cs index 2b2adbcee..2ffcad5de 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Counter.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Counter.cs @@ -2,10 +2,10 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using Lumina.Text.ReadOnly; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Editor.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Editor.cs index d4e8e61ab..d9dd1378c 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Editor.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Editor.cs @@ -3,7 +3,7 @@ using System.Numerics; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Components; -using Dalamud.Interface.Internal.UiDebug2.Utility; +using Dalamud.Interface.Internal.UiDebug.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -16,10 +16,10 @@ using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; using static Dalamud.Bindings.ImGui.ImGuiTableFlags; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.FontAwesomeIcon; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Interface.Utility.ImGuiHelpers; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// internal unsafe partial class ResNodeTree diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs index 45dd63b53..949197f50 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Image.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Image.cs @@ -11,11 +11,11 @@ using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; using static Dalamud.Bindings.ImGui.ImGuiTableFlags; using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; using static Dalamud.Interface.ColorHelpers; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.TextureType; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.NineGrid.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.NineGrid.cs index 1c06dfb40..7d241ebdb 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.NineGrid.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.NineGrid.cs @@ -1,5 +1,5 @@ using Dalamud.Bindings.ImGui; -using Dalamud.Interface.Internal.UiDebug2.Utility; +using Dalamud.Interface.Internal.UiDebug.Utility; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -9,7 +9,7 @@ using static Dalamud.Utility.Util; using Vector2 = System.Numerics.Vector2; using Vector4 = System.Numerics.Vector4; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Res.cs similarity index 97% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Res.cs index 086a41efc..3ff64fd24 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Res.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Res.cs @@ -4,7 +4,7 @@ using System.Runtime.InteropServices; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Components; -using Dalamud.Interface.Internal.UiDebug2.Utility; +using Dalamud.Interface.Internal.UiDebug.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -13,14 +13,14 @@ using static Dalamud.Bindings.ImGui.ImGuiCol; using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; using static Dalamud.Interface.ColorHelpers; using static Dalamud.Interface.FontAwesomeIcon; -using static Dalamud.Interface.Internal.UiDebug2.Browsing.Events; -using static Dalamud.Interface.Internal.UiDebug2.ElementSelector; -using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Browsing.Events; +using static Dalamud.Interface.Internal.UiDebug.ElementSelector; +using static Dalamud.Interface.Internal.UiDebug.UiDebug; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeFlags; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Text.cs similarity index 96% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Text.cs index 7ae0d8fca..74e14b683 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/NodeTree.Text.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/NodeTree.Text.cs @@ -12,10 +12,10 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using Lumina.Text.ReadOnly; using static Dalamud.Interface.ColorHelpers; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A tree for an that can be printed and browsed via ImGui. diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.KeyGroupColumn.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.KeyGroupColumn.cs index 71323088b..910762d97 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.KeyGroupColumn.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.KeyGroupColumn.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Dalamud.Bindings.ImGui; -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// public readonly partial struct TimelineTree diff --git a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs b/Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.cs similarity index 99% rename from Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs rename to Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.cs index 10d3d9362..a4d7151c0 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Browsing/TimelineTree.cs +++ b/Dalamud/Interface/Internal/UiDebug/Browsing/TimelineTree.cs @@ -13,12 +13,12 @@ using static Dalamud.Bindings.ImGui.ImGuiTableColumnFlags; using static Dalamud.Bindings.ImGui.ImGuiTableFlags; using static Dalamud.Bindings.ImGui.ImGuiTreeNodeFlags; using static Dalamud.Interface.ColorHelpers; -using static Dalamud.Interface.Internal.UiDebug2.Utility.Gui; +using static Dalamud.Interface.Internal.UiDebug.Utility.Gui; using static Dalamud.Utility.Util; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeType; // ReSharper disable SuggestBaseTypeForParameter -namespace Dalamud.Interface.Internal.UiDebug2.Browsing; +namespace Dalamud.Interface.Internal.UiDebug.Browsing; /// /// A struct allowing a node's animation timeline to be printed and browsed. diff --git a/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs b/Dalamud/Interface/Internal/UiDebug/ElementSelector.cs similarity index 95% rename from Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs rename to Dalamud/Interface/Internal/UiDebug/ElementSelector.cs index 46e0c1f8f..808ff25d7 100644 --- a/Dalamud/Interface/Internal/UiDebug2/ElementSelector.cs +++ b/Dalamud/Interface/Internal/UiDebug/ElementSelector.cs @@ -5,8 +5,8 @@ using System.Numerics; using Dalamud.Bindings.ImGui; using Dalamud.Interface.Components; -using Dalamud.Interface.Internal.UiDebug2.Browsing; -using Dalamud.Interface.Internal.UiDebug2.Utility; +using Dalamud.Interface.Internal.UiDebug.Browsing; +using Dalamud.Interface.Internal.UiDebug.Utility; using Dalamud.Interface.Utility.Raii; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -16,7 +16,7 @@ using static System.Globalization.NumberFormatInfo; using static Dalamud.Bindings.ImGui.ImGuiCol; using static Dalamud.Bindings.ImGui.ImGuiWindowFlags; using static Dalamud.Interface.FontAwesomeIcon; -using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; +using static Dalamud.Interface.Internal.UiDebug.UiDebug; using static Dalamud.Interface.UiBuilder; using static Dalamud.Interface.Utility.ImGuiHelpers; using static FFXIVClientStructs.FFXIV.Component.GUI.NodeFlags; @@ -25,7 +25,7 @@ using static FFXIVClientStructs.FFXIV.Component.GUI.NodeFlags; #pragma warning disable CS0659 -namespace Dalamud.Interface.Internal.UiDebug2; +namespace Dalamud.Interface.Internal.UiDebug; /// /// A tool that enables the user to select UI elements within the inspector by mousing over them onscreen. @@ -34,7 +34,7 @@ internal unsafe class ElementSelector : IDisposable { private const int UnitListCount = 18; - private readonly UiDebug2 uiDebug2; + private readonly UiDebug uiDebug; private string addressSearchInput = string.Empty; @@ -43,10 +43,10 @@ internal unsafe class ElementSelector : IDisposable /// /// Initializes a new instance of the class. /// - /// The instance of this Element Selector belongs to. - internal ElementSelector(UiDebug2 uiDebug2) + /// The instance of this Element Selector belongs to. + internal ElementSelector(UiDebug uiDebug) { - this.uiDebug2 = uiDebug2; + this.uiDebug = uiDebug; } /// @@ -181,7 +181,7 @@ internal unsafe class ElementSelector : IDisposable { this.Active = false; - this.uiDebug2.SelectedAddonName = a.Addon->NameString; + this.uiDebug.SelectedAddonName = a.Addon->NameString; var ptrList = new List { (nint)n.Node }; @@ -420,7 +420,7 @@ internal unsafe class ElementSelector : IDisposable var addon = unitManager->Entries[j].Value; if ((nint)addon == address || FindByAddress(addon, address)) { - this.uiDebug2.SelectedAddonName = addon->NameString; + this.uiDebug.SelectedAddonName = addon->NameString; return; } } diff --git a/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs b/Dalamud/Interface/Internal/UiDebug/Popout.Addon.cs similarity index 93% rename from Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs rename to Dalamud/Interface/Internal/UiDebug/Popout.Addon.cs index 69fbc17fb..cc80a27c4 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Popout.Addon.cs +++ b/Dalamud/Interface/Internal/UiDebug/Popout.Addon.cs @@ -1,11 +1,11 @@ using System.Numerics; using Dalamud.Bindings.ImGui; -using Dalamud.Interface.Internal.UiDebug2.Browsing; +using Dalamud.Interface.Internal.UiDebug.Browsing; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; -namespace Dalamud.Interface.Internal.UiDebug2; +namespace Dalamud.Interface.Internal.UiDebug; /// /// A popout window for an . diff --git a/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs b/Dalamud/Interface/Internal/UiDebug/Popout.Node.cs similarity index 93% rename from Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs rename to Dalamud/Interface/Internal/UiDebug/Popout.Node.cs index de476983f..7d955f7f5 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Popout.Node.cs +++ b/Dalamud/Interface/Internal/UiDebug/Popout.Node.cs @@ -1,15 +1,15 @@ using System.Numerics; using Dalamud.Bindings.ImGui; -using Dalamud.Interface.Internal.UiDebug2.Browsing; +using Dalamud.Interface.Internal.UiDebug.Browsing; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using FFXIVClientStructs.FFXIV.Component.GUI; -using static Dalamud.Interface.Internal.UiDebug2.UiDebug2; +using static Dalamud.Interface.Internal.UiDebug.UiDebug; -namespace Dalamud.Interface.Internal.UiDebug2; +namespace Dalamud.Interface.Internal.UiDebug; /// /// A popout window for a . diff --git a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs b/Dalamud/Interface/Internal/UiDebug/UiDebug.Sidebar.cs similarity index 98% rename from Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs rename to Dalamud/Interface/Internal/UiDebug/UiDebug.Sidebar.cs index 14da58d94..0a24d4572 100644 --- a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.Sidebar.cs +++ b/Dalamud/Interface/Internal/UiDebug/UiDebug.Sidebar.cs @@ -12,10 +12,10 @@ using static System.StringComparison; using static Dalamud.Interface.FontAwesomeIcon; -namespace Dalamud.Interface.Internal.UiDebug2; +namespace Dalamud.Interface.Internal.UiDebug; -/// -internal unsafe partial class UiDebug2 +/// +internal unsafe partial class UiDebug { /// /// All unit lists to check for addons. diff --git a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs b/Dalamud/Interface/Internal/UiDebug/UiDebug.cs similarity index 92% rename from Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs rename to Dalamud/Interface/Internal/UiDebug/UiDebug.cs index 2aaef9256..bd7426466 100644 --- a/Dalamud/Interface/Internal/UiDebug2/UiDebug2.cs +++ b/Dalamud/Interface/Internal/UiDebug/UiDebug.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Dalamud.Bindings.ImGui; using Dalamud.Game.Gui; -using Dalamud.Interface.Internal.UiDebug2.Browsing; +using Dalamud.Interface.Internal.UiDebug.Browsing; using Dalamud.Interface.Utility.Raii; using Dalamud.Interface.Windowing; using Dalamud.Logging.Internal; @@ -12,7 +12,7 @@ using FFXIVClientStructs.FFXIV.Component.GUI; using static Dalamud.Bindings.ImGui.ImGuiWindowFlags; -namespace Dalamud.Interface.Internal.UiDebug2; +namespace Dalamud.Interface.Internal.UiDebug; // Original version by aers https://github.com/aers/FFXIVUIDebug // Also incorporates features from Caraxi's fork https://github.com/Caraxi/SimpleTweaksPlugin/blob/main/Debugging/UIDebug.cs @@ -20,17 +20,17 @@ namespace Dalamud.Interface.Internal.UiDebug2; /// /// A tool for browsing the contents and structure of UI elements. /// -internal partial class UiDebug2 : IDisposable +internal partial class UiDebug : IDisposable { /// - internal static readonly ModuleLog Log = ModuleLog.Create(); + internal static readonly ModuleLog Log = ModuleLog.Create(); private readonly ElementSelector elementSelector; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - internal UiDebug2() + internal UiDebug() { this.elementSelector = new(this); } diff --git a/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs b/Dalamud/Interface/Internal/UiDebug/Utility/Gui.cs similarity index 97% rename from Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs rename to Dalamud/Interface/Internal/UiDebug/Utility/Gui.cs index adfbfa81c..2c02fd793 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Utility/Gui.cs +++ b/Dalamud/Interface/Internal/UiDebug/Utility/Gui.cs @@ -9,10 +9,10 @@ using FFXIVClientStructs.FFXIV.Client.Graphics; using static Dalamud.Bindings.ImGui.ImGuiCol; using static Dalamud.Interface.ColorHelpers; -namespace Dalamud.Interface.Internal.UiDebug2.Utility; +namespace Dalamud.Interface.Internal.UiDebug.Utility; /// -/// Miscellaneous ImGui tools used by . +/// Miscellaneous ImGui tools used by . /// internal static class Gui { diff --git a/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs b/Dalamud/Interface/Internal/UiDebug/Utility/NodeBounds.cs similarity index 99% rename from Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs rename to Dalamud/Interface/Internal/UiDebug/Utility/NodeBounds.cs index 20feb903f..414d49cf5 100644 --- a/Dalamud/Interface/Internal/UiDebug2/Utility/NodeBounds.cs +++ b/Dalamud/Interface/Internal/UiDebug/Utility/NodeBounds.cs @@ -11,7 +11,7 @@ using static System.MathF; using static Dalamud.Interface.ColorHelpers; -namespace Dalamud.Interface.Internal.UiDebug2.Utility; +namespace Dalamud.Interface.Internal.UiDebug.Utility; /// /// A struct representing the perimeter of an , accounting for all transformations. diff --git a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs index 444b923ab..64de5e87d 100644 --- a/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs +++ b/Dalamud/Interface/Internal/Windows/Data/DataWindow.cs @@ -21,7 +21,6 @@ internal class DataWindow : Window, IDisposable private readonly IDataWindowWidget[] modules = [ new AddonInspectorWidget(), - new AddonInspectorWidget2(), new AddonLifecycleWidget(), new AddonWidget(), new AddressesWidget(), diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs index c8a747239..95a5616b1 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget.cs @@ -5,8 +5,8 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets; /// internal class AddonInspectorWidget : IDataWindowWidget { - private UiDebug? addonInspector; - + private UiDebug.UiDebug? addonInspector; + /// public string[]? CommandShortcuts { get; init; } = ["ai", "addoninspector"]; @@ -19,7 +19,7 @@ internal class AddonInspectorWidget : IDataWindowWidget /// public void Load() { - this.addonInspector = new UiDebug(); + this.addonInspector = new UiDebug.UiDebug(); if (this.addonInspector is not null) { diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget2.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget2.cs deleted file mode 100644 index 6cd6ecb0b..000000000 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/AddonInspectorWidget2.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace Dalamud.Interface.Internal.Windows.Data.Widgets; - -/// -/// Widget for displaying addon inspector. -/// -internal class AddonInspectorWidget2 : IDataWindowWidget -{ - private UiDebug2.UiDebug2? addonInspector2; - - /// - public string[]? CommandShortcuts { get; init; } = ["ai2", "addoninspector2"]; - - /// - public string DisplayName { get; init; } = "Addon Inspector v2 (Testing)"; - - /// - public bool Ready { get; set; } - - /// - public void Load() - { - this.addonInspector2 = new UiDebug2.UiDebug2(); - - if (this.addonInspector2 is not null) - { - this.Ready = true; - } - } - - /// - public void Draw() - { - this.addonInspector2?.Draw(); - } -} diff --git a/Dalamud/Plugin/Services/ITextureProvider.cs b/Dalamud/Plugin/Services/ITextureProvider.cs index dc0522aa8..a4d1dcbd2 100644 --- a/Dalamud/Plugin/Services/ITextureProvider.cs +++ b/Dalamud/Plugin/Services/ITextureProvider.cs @@ -322,7 +322,7 @@ public interface ITextureProvider : IDalamudService /// Whether to leave non-disposed when the returned /// completes. /// Address of the new . - /// See PrintTextureInfo in for an example + /// See PrintTextureInfo in for an example /// of replacing the texture of an image node. /// /// If the returned kernel texture is to be destroyed, call the fourth function in its vtable, by calling