mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Merge pull request #272 from Caraxi/master
Fix copy buttons in data window not working due to conflicting Ids
This commit is contained in:
commit
b04ffd2352
1 changed files with 6 additions and 3 deletions
|
|
@ -42,6 +42,8 @@ namespace Dalamud.Interface
|
|||
|
||||
private UIDebug UIDebug = null;
|
||||
|
||||
private uint copyButtonIndex = 0;
|
||||
|
||||
public DalamudDataWindow(Dalamud dalamud) {
|
||||
this.dalamud = dalamud;
|
||||
|
||||
|
|
@ -57,6 +59,7 @@ namespace Dalamud.Interface
|
|||
}
|
||||
|
||||
public bool Draw() {
|
||||
this.copyButtonIndex = 0;
|
||||
ImGui.SetNextWindowSize(new Vector2(500, 500), ImGuiCond.FirstUseEver);
|
||||
|
||||
var isOpen = true;
|
||||
|
|
@ -101,7 +104,7 @@ namespace Dalamud.Interface
|
|||
}
|
||||
ImGui.Text($"Result: {this.sigResult.ToInt64():X}");
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button("C")) {
|
||||
if (ImGui.Button($"C{this.copyButtonIndex++}")) {
|
||||
ImGui.SetClipboardText(this.sigResult.ToInt64().ToString("x"));
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +115,7 @@ namespace Dalamud.Interface
|
|||
$" {valueTuple.Item1} - 0x{valueTuple.Item2.ToInt64():x}");
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGui.Button("C")) {
|
||||
if (ImGui.Button($"C##copyAddress{copyButtonIndex++}")) {
|
||||
ImGui.SetClipboardText(valueTuple.Item2.ToInt64().ToString("x"));
|
||||
}
|
||||
}
|
||||
|
|
@ -427,7 +430,7 @@ namespace Dalamud.Interface
|
|||
|
||||
ImGui.TextUnformatted(actorString);
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button("C")) {
|
||||
if (ImGui.Button($"C##{this.copyButtonIndex++}")) {
|
||||
ImGui.SetClipboardText(actor.Address.ToInt64().ToString("X"));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue