mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 14:27:45 +01:00
/xldata window refactor (#1257)
Reworks the `/xldata` window so that each individual section is in its own file.
This commit is contained in:
parent
11ea64410e
commit
694159a510
37 changed files with 2701 additions and 1893 deletions
|
|
@ -0,0 +1,64 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using Dalamud.Game;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Widget to display resolved .text sigs.
|
||||
/// </summary>
|
||||
internal class AddressesWidget : IDataWindowWidget
|
||||
{
|
||||
private string inputSig = string.Empty;
|
||||
private nint sigResult = nint.Zero;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public DataKind DataKind { get; init; } = DataKind.Address;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool Ready { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Load()
|
||||
{
|
||||
this.Ready = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Draw()
|
||||
{
|
||||
ImGui.InputText(".text sig", ref this.inputSig, 400);
|
||||
if (ImGui.Button("Resolve"))
|
||||
{
|
||||
try
|
||||
{
|
||||
var sigScanner = Service<SigScanner>.Get();
|
||||
this.sigResult = sigScanner.ScanText(this.inputSig);
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
this.sigResult = new nint(-1);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Text($"Result: {this.sigResult.ToInt64():X}");
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button($"C##{this.sigResult.ToInt64():X}"))
|
||||
ImGui.SetClipboardText(this.sigResult.ToInt64().ToString("X"));
|
||||
|
||||
foreach (var debugScannedValue in BaseAddressResolver.DebugScannedValues)
|
||||
{
|
||||
ImGui.TextUnformatted($"{debugScannedValue.Key}");
|
||||
foreach (var valueTuple in debugScannedValue.Value)
|
||||
{
|
||||
ImGui.TextUnformatted(
|
||||
$" {valueTuple.ClassName} - 0x{valueTuple.Address.ToInt64():X}");
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGui.Button($"C##{valueTuple.Address.ToInt64():X}"))
|
||||
ImGui.SetClipboardText(valueTuple.Address.ToInt64().ToString("X"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue