mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 05:17:42 +01:00
Update text-related ImGui calls (#2337)
* Update text-related ImGui calls * Use ImU8String for SafeTextColored * Restore wrapped calls * Update MenuItem call * Use ImGui.Text over ImGui.TextUnformatted * Add ImGui.TextColoredWrapped * Obsolete SafeText helpers * Fix obsoleted calls * SafeTextColored didn't exist before imgui-bindings * Remove %% replacements
This commit is contained in:
parent
f0021bc8f9
commit
58fbff7c56
126 changed files with 1433 additions and 1406 deletions
|
|
@ -2,6 +2,7 @@ using System.Numerics;
|
|||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Internal.UiDebug2.Utility;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Memory;
|
||||
using Dalamud.Utility;
|
||||
|
|
@ -26,13 +27,13 @@ public unsafe partial class AddonTree
|
|||
using var tree = ImRaii.TreeNode($"Atk Values [{addon->AtkValuesCount}]###atkValues_{addon->NameString}");
|
||||
if (tree.Success)
|
||||
{
|
||||
using var tbl = ImRaii.Table("atkUnitBase_atkValueTable", 3, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.RowBg);
|
||||
using var tbl = ImRaii.Table("atkUnitBase_atkValueTable"u8, 3, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingFixedFit | ImGuiTableFlags.RowBg);
|
||||
|
||||
if (tbl.Success)
|
||||
{
|
||||
ImGui.TableSetupColumn("Index");
|
||||
ImGui.TableSetupColumn("Type");
|
||||
ImGui.TableSetupColumn("Value");
|
||||
ImGui.TableSetupColumn("Index"u8);
|
||||
ImGui.TableSetupColumn("Type"u8);
|
||||
ImGui.TableSetupColumn("Value"u8);
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
try
|
||||
|
|
@ -52,7 +53,7 @@ public unsafe partial class AddonTree
|
|||
ImGui.TableNextColumn();
|
||||
if (atkValue->Type == 0)
|
||||
{
|
||||
ImGui.TextDisabled("Not Set");
|
||||
ImGui.TextDisabled("Not Set"u8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -68,7 +69,7 @@ public unsafe partial class AddonTree
|
|||
case ValueType.Int:
|
||||
case ValueType.UInt:
|
||||
{
|
||||
ImGui.TextUnformatted($"{atkValue->Int}");
|
||||
ImGui.Text($"{atkValue->Int}");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +79,7 @@ public unsafe partial class AddonTree
|
|||
{
|
||||
if (atkValue->String.Value == null)
|
||||
{
|
||||
ImGui.TextDisabled("null");
|
||||
ImGui.TextDisabled("null"u8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -90,17 +91,17 @@ public unsafe partial class AddonTree
|
|||
|
||||
case ValueType.Bool:
|
||||
{
|
||||
ImGui.TextUnformatted($"{atkValue->Byte != 0}");
|
||||
ImGui.Text($"{atkValue->Byte != 0}");
|
||||
break;
|
||||
}
|
||||
|
||||
case ValueType.Pointer:
|
||||
ImGui.TextUnformatted($"{(nint)atkValue->Pointer}");
|
||||
ImGui.Text($"{(nint)atkValue->Pointer}");
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
ImGui.TextDisabled("Unhandled Type");
|
||||
ImGui.TextDisabled("Unhandled Type"u8);
|
||||
ImGui.SameLine();
|
||||
Util.ShowStruct(atkValue);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ using System.Numerics;
|
|||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Utility;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
using static Dalamud.Interface.FontAwesomeIcon;
|
||||
|
|
@ -117,11 +119,11 @@ public unsafe partial class AddonTree : IDisposable
|
|||
|
||||
var isVisible = addon->IsVisible;
|
||||
|
||||
ImGui.TextUnformatted($"{this.AddonName}");
|
||||
ImGui.Text($"{this.AddonName}");
|
||||
ImGui.SameLine();
|
||||
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(isVisible ? new Vector4(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible" : "Not Visible");
|
||||
ImGui.TextColored(isVisible ? new Vector4(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible"u8 : "Not Visible"u8);
|
||||
|
||||
ImGui.SameLine(ImGui.GetWindowWidth() - 100);
|
||||
|
||||
|
|
@ -132,7 +134,7 @@ public unsafe partial class AddonTree : IDisposable
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Toggle Visibility");
|
||||
ImGui.SetTooltip("Toggle Visibility"u8);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
|
@ -143,7 +145,7 @@ public unsafe partial class AddonTree : IDisposable
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Toggle Popout Window");
|
||||
ImGui.SetTooltip("Toggle Popout Window"u8);
|
||||
}
|
||||
|
||||
PaddedSeparator(1);
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ public static class Events
|
|||
|
||||
if (tbl.Success)
|
||||
{
|
||||
ImGui.TableSetupColumn("#", WidthFixed);
|
||||
ImGui.TableSetupColumn("Type", WidthFixed);
|
||||
ImGui.TableSetupColumn("Param", WidthFixed);
|
||||
ImGui.TableSetupColumn("Flags", WidthFixed);
|
||||
ImGui.TableSetupColumn("StateFlags1", WidthFixed);
|
||||
ImGui.TableSetupColumn("Target", WidthFixed);
|
||||
ImGui.TableSetupColumn("Listener", WidthFixed);
|
||||
ImGui.TableSetupColumn("#"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Type"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Param"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Flags"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("StateFlags1"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Target"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Listener"u8, WidthFixed);
|
||||
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
|
|
@ -49,15 +49,15 @@ public static class Events
|
|||
while (evt != null)
|
||||
{
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{i++}");
|
||||
ImGui.Text($"{i++}");
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{evt->State.EventType}");
|
||||
ImGui.Text($"{evt->State.EventType}");
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{evt->Param}");
|
||||
ImGui.Text($"{evt->Param}");
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{evt->State.StateFlags}");
|
||||
ImGui.Text($"{evt->State.StateFlags}");
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{evt->State.ReturnFlags}");
|
||||
ImGui.Text($"{evt->State.ReturnFlags}");
|
||||
ImGui.TableNextColumn();
|
||||
ImGuiHelpers.ClickToCopyText($"{(nint)evt->Target:X}", default, new Vector4(0.6f, 0.6f, 0.6f, 1));
|
||||
ImGui.TableNextColumn();
|
||||
|
|
|
|||
|
|
@ -89,25 +89,25 @@ internal unsafe class ComponentNodeTree : ResNodeTree
|
|||
{
|
||||
case TextInput:
|
||||
var textInputComponent = (AtkComponentTextInput*)this.Component;
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"InputBase Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.UnkText1.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"InputBase Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->AtkComponentInputBase.UnkText2.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"Text1: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText01.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"Text2: {Marshal.PtrToStringAnsi(new(textInputComponent->UnkText02.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"AvailableLines: {Marshal.PtrToStringAnsi(new(textInputComponent->AvailableLines.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"HighlightedAutoTranslateOptionColorPrefix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorPrefix.StringPtr))}");
|
||||
ImGui.TextUnformatted(
|
||||
ImGui.Text(
|
||||
$"HighlightedAutoTranslateOptionColorSuffix: {Marshal.PtrToStringAnsi(new(textInputComponent->HighlightedAutoTranslateOptionColorSuffix.StringPtr))}");
|
||||
break;
|
||||
case List:
|
||||
case TreeList:
|
||||
var l = (AtkComponentList*)this.Component;
|
||||
if (ImGui.SmallButton("Inc.Selected"))
|
||||
if (ImGui.SmallButton("Inc.Selected"u8))
|
||||
{
|
||||
l->SelectedItemIndex++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
var hov = false;
|
||||
|
||||
ImGui.TableSetupColumn("Labels", WidthFixed);
|
||||
ImGui.TableSetupColumn("Editors", WidthFixed);
|
||||
ImGui.TableSetupColumn("Labels"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Editors"u8, WidthFixed);
|
||||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Position:");
|
||||
ImGui.Text("Position:"u8);
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
|
|
@ -70,7 +70,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Size:");
|
||||
ImGui.Text("Size:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.DragFloat2($"##{(nint)this.Node:X}size", ref size, 1, 0, default, "%.0f"))
|
||||
|
|
@ -84,7 +84,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Scale:");
|
||||
ImGui.Text("Scale:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.DragFloat2($"##{(nint)this.Node:X}scale", ref scale, 0.05f))
|
||||
|
|
@ -98,7 +98,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Origin:");
|
||||
ImGui.Text("Origin:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.DragFloat2($"##{(nint)this.Node:X}origin", ref origin, 1, default, default, "%.0f"))
|
||||
|
|
@ -112,7 +112,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Rotation:");
|
||||
ImGui.Text("Rotation:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
while (angle > 180)
|
||||
|
|
@ -128,7 +128,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Rotation (deg)");
|
||||
ImGui.SetTooltip("Rotation (deg)"u8);
|
||||
hov = true;
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("RGBA:");
|
||||
ImGui.Text("RGBA:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.ColorEdit4($"##{(nint)this.Node:X}RGBA", ref rgba, DisplayHex))
|
||||
|
|
@ -153,7 +153,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Multiply:");
|
||||
ImGui.Text("Multiply:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.ColorEdit3($"##{(nint)this.Node:X}multiplyRGB", ref mult, DisplayHex))
|
||||
|
|
@ -165,7 +165,7 @@ internal unsafe partial class ResNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Add:");
|
||||
ImGui.Text("Add:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(124);
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ internal unsafe partial class CounterNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Counter:");
|
||||
ImGui.Text("Counter:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
|
||||
ImGui.SetNextItemWidth(150);
|
||||
|
|
@ -229,7 +229,7 @@ internal unsafe partial class ImageNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Part Id:");
|
||||
ImGui.Text("Part Id:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.InputInt($"##partId{(nint)this.Node:X}", ref partId, 1, 1))
|
||||
|
|
@ -262,7 +262,7 @@ internal unsafe partial class NineGridNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Ninegrid Offsets:");
|
||||
ImGui.Text("Ninegrid Offsets:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.DragFloat2($"##{(nint)this.Node:X}ngOffsetLR", ref lr, 1f, 0f))
|
||||
|
|
@ -308,7 +308,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Text:");
|
||||
ImGui.Text("Text:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(Math.Max(ImGui.GetWindowContentRegionMax().X - ImGui.GetCursorPosX() - 50f, 150));
|
||||
if (ImGui.InputText($"##{(nint)this.Node:X}textEdit", ref text, 512, EnterReturnsTrue))
|
||||
|
|
@ -318,7 +318,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Font:");
|
||||
ImGui.Text("Font:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.Combo($"##{(nint)this.Node:X}fontType", ref fontIndex, FontNames))
|
||||
|
|
@ -328,7 +328,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Font Size:");
|
||||
ImGui.Text("Font Size:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.InputInt($"##{(nint)this.Node:X}fontSize", ref fontSize, 1, 10))
|
||||
|
|
@ -338,7 +338,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Alignment:");
|
||||
ImGui.Text("Alignment:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
if (InputAlignment($"##{(nint)this.Node:X}alignment", ref alignment))
|
||||
{
|
||||
|
|
@ -347,7 +347,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Text Color:");
|
||||
ImGui.Text("Text Color:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.ColorEdit4($"##{(nint)this.Node:X}TextRGB", ref textColor, DisplayHex))
|
||||
|
|
@ -357,7 +357,7 @@ internal unsafe partial class TextNodeTree
|
|||
|
||||
ImGui.TableNextRow();
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.Text("Edge Color:");
|
||||
ImGui.Text("Edge Color:"u8);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.SetNextItemWidth(150);
|
||||
if (ImGui.ColorEdit4($"##{(nint)this.Node:X}EdgeRGB", ref edgeColor, DisplayHex))
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Numerics;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using FFXIVClientStructs.FFXIV.Client.Graphics.Kernel;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
|
@ -76,13 +77,13 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
|
|||
PrintFieldValuePairs(("Texture Path", this.TexData.Path));
|
||||
}
|
||||
|
||||
if (ImGui.RadioButton("Full Image##textureDisplayStyle0", TexDisplayStyle == 0))
|
||||
if (ImGui.RadioButton("Full Image##textureDisplayStyle0"u8, TexDisplayStyle == 0))
|
||||
{
|
||||
TexDisplayStyle = 0;
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGui.RadioButton("Parts List##textureDisplayStyle1", TexDisplayStyle == 1))
|
||||
if (ImGui.RadioButton("Parts List##textureDisplayStyle1"u8, TexDisplayStyle == 1))
|
||||
{
|
||||
TexDisplayStyle = 1;
|
||||
}
|
||||
|
|
@ -152,7 +153,7 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Click to copy as Vector2\nShift-click to copy as Vector4");
|
||||
ImGui.SetTooltip("Click to copy as Vector2\nShift-click to copy as Vector4"u8);
|
||||
}
|
||||
|
||||
var suffix = asFloat ? "f" : string.Empty;
|
||||
|
|
@ -191,9 +192,9 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
|
|||
using var tbl = ImRaii.Table($"partsTable##{(nint)this.TexData.Texture->D3D11ShaderResourceView:X}", 3, Borders | RowBg | Reorderable);
|
||||
if (tbl.Success)
|
||||
{
|
||||
ImGui.TableSetupColumn("Part ID", WidthFixed);
|
||||
ImGui.TableSetupColumn("Part Texture", WidthFixed);
|
||||
ImGui.TableSetupColumn("Coordinates", WidthFixed);
|
||||
ImGui.TableSetupColumn("Part ID"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Part Texture"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Coordinates"u8, WidthFixed);
|
||||
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
|
|
@ -238,7 +239,7 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
|
|||
|
||||
PrintPartCoords(u, v, width, height);
|
||||
|
||||
ImGui.Text("UV:\t");
|
||||
ImGui.Text("UV:\t"u8);
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosX(cursX);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Internal.UiDebug2.Utility;
|
||||
using Dalamud.Interface.Utility;
|
||||
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
using static Dalamud.Interface.ColorHelpers;
|
||||
|
|
@ -79,7 +81,7 @@ internal unsafe partial class NineGridNodeTree : ImageNodeTree
|
|||
{
|
||||
if (!isEditorOpen)
|
||||
{
|
||||
ImGui.Text("NineGrid Offsets:\t");
|
||||
ImGui.Text("NineGrid Offsets:\t"u8);
|
||||
ImGui.SameLine();
|
||||
this.Offsets.Print();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using System.Runtime.InteropServices;
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Internal.UiDebug2.Utility;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using FFXIVClientStructs.FFXIV.Component.GUI;
|
||||
|
||||
|
|
@ -167,7 +168,7 @@ internal unsafe partial class ResNodeTree : IDisposable
|
|||
/// </summary>
|
||||
internal void WriteTreeHeading()
|
||||
{
|
||||
ImGui.TextUnformatted(this.GetHeaderText());
|
||||
ImGui.Text(this.GetHeaderText());
|
||||
this.PrintFieldLabels();
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +384,7 @@ internal unsafe partial class ResNodeTree : IDisposable
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Toggle Visibility");
|
||||
ImGui.SetTooltip("Toggle Visibility"u8);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
|
@ -399,7 +400,7 @@ internal unsafe partial class ResNodeTree : IDisposable
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Toggle Popout Window");
|
||||
ImGui.SetTooltip("Toggle Popout Window"u8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
|
|||
return;
|
||||
}
|
||||
|
||||
ImGui.TextColored(new Vector4(1), "Text:");
|
||||
ImGui.TextColored(new Vector4(1), "Text:"u8);
|
||||
ImGui.SameLine();
|
||||
|
||||
try
|
||||
|
|
@ -64,7 +64,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
|
|||
}
|
||||
catch
|
||||
{
|
||||
ImGui.TextUnformatted(Marshal.PtrToStringAnsi(new(this.NodeText.StringPtr)) ?? string.Empty);
|
||||
ImGui.Text(Marshal.PtrToStringAnsi(new(this.NodeText.StringPtr)) ?? string.Empty);
|
||||
}
|
||||
|
||||
PrintFieldValuePairs(
|
||||
|
|
@ -96,7 +96,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
|
|||
for (var i = 0; i < seString.Payloads.Count; i++)
|
||||
{
|
||||
var payload = seString.Payloads[i];
|
||||
ImGui.TextUnformatted($"[{i}]");
|
||||
ImGui.Text($"[{i}]");
|
||||
ImGui.SameLine();
|
||||
switch (payload.Type)
|
||||
{
|
||||
|
|
@ -108,7 +108,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
|
|||
|
||||
default:
|
||||
{
|
||||
ImGui.TextUnformatted(payload.ToString());
|
||||
ImGui.Text(payload.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public readonly partial struct TimelineTree
|
|||
/// The default print function, if none is specified.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to print.</param>
|
||||
public static void PlainTextCell(T value) => ImGui.TextUnformatted($"{value}");
|
||||
public static void PlainTextCell(T value) => ImGui.Text($"{value}");
|
||||
|
||||
/// <summary>
|
||||
/// Adds a value to this column.
|
||||
|
|
@ -83,7 +83,7 @@ public readonly partial struct TimelineTree
|
|||
}
|
||||
else
|
||||
{
|
||||
ImGui.TextDisabled("...");
|
||||
ImGui.TextDisabled("..."u8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public readonly unsafe partial struct TimelineTree
|
|||
("Frame Time", $"{this.NodeTimeline->FrameTime:F2} ({this.NodeTimeline->FrameTime * 30:F0})"));
|
||||
|
||||
PrintFieldValuePairs(("Active Label Id", $"{this.NodeTimeline->ActiveLabelId}"), ("Duration", $"{this.NodeTimeline->LabelFrameIdxDuration}"), ("End Frame", $"{this.NodeTimeline->LabelEndFrameIdx}"));
|
||||
ImGui.TextColored(new Vector4(0.6f, 0.6f, 0.6f, 1), "Animation List");
|
||||
ImGui.TextColored(new Vector4(0.6f, 0.6f, 0.6f, 1), "Animation List"u8);
|
||||
|
||||
for (var a = 0; a < animationCount; a++)
|
||||
{
|
||||
|
|
@ -151,7 +151,7 @@ public readonly unsafe partial struct TimelineTree
|
|||
return;
|
||||
}
|
||||
|
||||
var rotColumn = new KeyGroupColumn<float>("Rotation", static r => ImGui.TextUnformatted($"{r * (180d / Math.PI):F1}°"));
|
||||
var rotColumn = new KeyGroupColumn<float>("Rotation", static r => ImGui.Text($"{r * (180d / Math.PI):F1}°"));
|
||||
|
||||
for (var f = 0; f < keyGroup.KeyFrameCount; f++)
|
||||
{
|
||||
|
|
@ -407,7 +407,7 @@ public readonly unsafe partial struct TimelineTree
|
|||
("StartFrameIdx", $"{this.NodeTimeline->Resource->LabelSets->StartFrameIdx}"),
|
||||
("EndFrameIdx", $"{this.NodeTimeline->Resource->LabelSets->EndFrameIdx}"));
|
||||
|
||||
using var labelSetTable = ImRaii.TreeNode("Entries");
|
||||
using var labelSetTable = ImRaii.TreeNode("Entries"u8);
|
||||
if (labelSetTable.Success)
|
||||
{
|
||||
var keyFrameGroup = this.Resource->LabelSets->LabelKeyGroup;
|
||||
|
|
@ -415,13 +415,13 @@ public readonly unsafe partial struct TimelineTree
|
|||
using var table = ImRaii.Table($"##{(nint)this.node}labelSetKeyFrameTable", 7, Borders | SizingFixedFit | RowBg | NoHostExtendX);
|
||||
if (table.Success)
|
||||
{
|
||||
ImGui.TableSetupColumn("Frame ID", WidthFixed);
|
||||
ImGui.TableSetupColumn("Speed Start", WidthFixed);
|
||||
ImGui.TableSetupColumn("Speed End", WidthFixed);
|
||||
ImGui.TableSetupColumn("Interpolation", WidthFixed);
|
||||
ImGui.TableSetupColumn("Label ID", WidthFixed);
|
||||
ImGui.TableSetupColumn("Jump Behavior", WidthFixed);
|
||||
ImGui.TableSetupColumn("Target Label ID", WidthFixed);
|
||||
ImGui.TableSetupColumn("Frame ID"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Speed Start"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Speed End"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Interpolation"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Label ID"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Jump Behavior"u8, WidthFixed);
|
||||
ImGui.TableSetupColumn("Target Label ID"u8, WidthFixed);
|
||||
|
||||
ImGui.TableHeadersRow();
|
||||
|
||||
|
|
@ -430,25 +430,25 @@ public readonly unsafe partial struct TimelineTree
|
|||
var keyFrame = keyFrameGroup.KeyFrames[l];
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.FrameIdx}");
|
||||
ImGui.Text($"{keyFrame.FrameIdx}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.SpeedCoefficient1:F2}");
|
||||
ImGui.Text($"{keyFrame.SpeedCoefficient1:F2}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.SpeedCoefficient2:F2}");
|
||||
ImGui.Text($"{keyFrame.SpeedCoefficient2:F2}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.Interpolation}");
|
||||
ImGui.Text($"{keyFrame.Interpolation}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.Value.Label.LabelId}");
|
||||
ImGui.Text($"{keyFrame.Value.Label.LabelId}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.Value.Label.JumpBehavior}");
|
||||
ImGui.Text($"{keyFrame.Value.Label.JumpBehavior}");
|
||||
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted($"{keyFrame.Value.Label.JumpLabelId}");
|
||||
ImGui.Text($"{keyFrame.Value.Label.JumpLabelId}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ internal unsafe class ElementSelector : IDisposable
|
|||
/// </summary>
|
||||
internal void DrawInterface()
|
||||
{
|
||||
using var ch = ImRaii.Child("###sidebar_elementSelector", new(250, -1), true);
|
||||
using var ch = ImRaii.Child("###sidebar_elementSelector"u8, new(250, -1), true);
|
||||
|
||||
if (ch.Success)
|
||||
{
|
||||
|
|
@ -105,15 +105,15 @@ internal unsafe class ElementSelector : IDisposable
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Element Selector");
|
||||
ImGui.SetTooltip("Element Selector"u8);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X - 32);
|
||||
ImGui.InputTextWithHint(
|
||||
"###addressSearchInput",
|
||||
"Address Search",
|
||||
"###addressSearchInput"u8,
|
||||
"Address Search"u8,
|
||||
ref this.addressSearchInput,
|
||||
18,
|
||||
ImGuiInputTextFlags.AutoSelectAll);
|
||||
|
|
@ -144,10 +144,10 @@ internal unsafe class ElementSelector : IDisposable
|
|||
return;
|
||||
}
|
||||
|
||||
ImGui.Text("ELEMENT SELECTOR");
|
||||
ImGui.TextDisabled("Use the mouse to hover and identify UI elements, then click to jump to them in the inspector");
|
||||
ImGui.TextDisabled("Use the scrollwheel to choose between overlapping elements");
|
||||
ImGui.TextDisabled("Press ESCAPE to cancel");
|
||||
ImGui.Text("ELEMENT SELECTOR"u8);
|
||||
ImGui.TextDisabled("Use the mouse to hover and identify UI elements, then click to jump to them in the inspector"u8);
|
||||
ImGui.TextDisabled("Use the scrollwheel to choose between overlapping elements"u8);
|
||||
ImGui.TextDisabled("Press ESCAPE to cancel"u8);
|
||||
ImGui.Spacing();
|
||||
|
||||
var mousePos = ImGui.GetMousePos() - MainViewport.Pos;
|
||||
|
|
@ -155,7 +155,7 @@ internal unsafe class ElementSelector : IDisposable
|
|||
|
||||
using (ImRaii.PushColor(WindowBg, new Vector4(0.5f)))
|
||||
{
|
||||
using var ch = ImRaii.Child("noClick", new(800, 2000), false, NoInputs | NoBackground | NoScrollWithMouse);
|
||||
using var ch = ImRaii.Child("noClick"u8, new(800, 2000), false, NoInputs | NoBackground | NoScrollWithMouse);
|
||||
if (ch.Success)
|
||||
{
|
||||
using var gr = ImRaii.Group();
|
||||
|
|
@ -163,13 +163,13 @@ internal unsafe class ElementSelector : IDisposable
|
|||
{
|
||||
Gui.PrintFieldValuePair("Mouse Position", $"{mousePos.X}, {mousePos.Y}");
|
||||
ImGui.Spacing();
|
||||
ImGui.Text("RESULTS:\n");
|
||||
ImGui.Text("RESULTS:\n"u8);
|
||||
|
||||
var i = 0;
|
||||
foreach (var a in addonResults)
|
||||
{
|
||||
var name = a.Addon->NameString;
|
||||
ImGui.TextUnformatted($"[Addon] {name}");
|
||||
ImGui.Text($"[Addon] {name}");
|
||||
ImGui.Indent(15);
|
||||
foreach (var n in a.Nodes)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ internal unsafe partial class UiDebug2
|
|||
|
||||
private void DrawNameSearch()
|
||||
{
|
||||
using var ch = ImRaii.Child("###sidebar_nameSearch", new(250, 40), true);
|
||||
using var ch = ImRaii.Child("###sidebar_nameSearch"u8, new(250, 40), true);
|
||||
|
||||
if (ch.Success)
|
||||
{
|
||||
|
|
@ -78,13 +78,13 @@ internal unsafe partial class UiDebug2
|
|||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Filter by visibility");
|
||||
ImGui.SetTooltip("Filter by visibility"u8);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X);
|
||||
if (ImGui.InputTextWithHint("###atkUnitBaseSearch", "Filter by name", ref atkUnitBaseSearch, 0x20))
|
||||
if (ImGui.InputTextWithHint("###atkUnitBaseSearch"u8, "Filter by name"u8, ref atkUnitBaseSearch, 0x20))
|
||||
{
|
||||
this.addonNameSearch = atkUnitBaseSearch;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ internal unsafe partial class UiDebug2
|
|||
|
||||
private void DrawAddonSelectionList()
|
||||
{
|
||||
using var ch = ImRaii.Child("###sideBar_addonList", new(250, -44), true, ImGuiWindowFlags.AlwaysVerticalScrollbar);
|
||||
using var ch = ImRaii.Child("###sideBar_addonList"u8, new(250, -44), true, ImGuiWindowFlags.AlwaysVerticalScrollbar);
|
||||
if (ch.Success)
|
||||
{
|
||||
var unitListBaseAddr = GetUnitListBaseAddr();
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ internal partial class UiDebug2 : IDisposable
|
|||
{
|
||||
ImGui.SameLine();
|
||||
|
||||
using var ch = ImRaii.Child("###uiDebugMainPanel", new(-1, -1), true, HorizontalScrollbar);
|
||||
using var ch = ImRaii.Child("###uiDebugMainPanel"u8, new(-1, -1), true, HorizontalScrollbar);
|
||||
|
||||
if (ch.Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal static class Gui
|
|||
/// <param name="copy">Whether to enable click-to-copy.</param>
|
||||
internal static void PrintFieldValuePair(string fieldName, string value, bool copy = true)
|
||||
{
|
||||
ImGui.TextUnformatted($"{fieldName}:");
|
||||
ImGui.Text($"{fieldName}:");
|
||||
ImGui.SameLine();
|
||||
var grey60 = new Vector4(0.6f, 0.6f, 0.6f, 1);
|
||||
if (copy)
|
||||
|
|
@ -108,7 +108,7 @@ internal static class Gui
|
|||
|
||||
if (tt.Success)
|
||||
{
|
||||
ImGui.TextUnformatted(tooltips[index]);
|
||||
ImGui.Text(tooltips[index]);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue