mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 17:07:22 +01:00
add debug button to copy character data
This commit is contained in:
parent
89eb6b448e
commit
aaf11043fe
4 changed files with 24 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ using MareSynchronos.API;
|
|||
using MareSynchronos.Utils;
|
||||
using MareSynchronos.WebAPI.Utils;
|
||||
using Dalamud.Utility;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MareSynchronos.UI;
|
||||
|
||||
|
|
@ -22,6 +23,8 @@ public class SettingsUi : Window, IDisposable
|
|||
private readonly WindowSystem _windowSystem;
|
||||
private readonly ApiController _apiController;
|
||||
private readonly UiShared _uiShared;
|
||||
public CharacterCacheDto LastCreatedCharacterData { private get; set; }
|
||||
|
||||
public event SwitchUi? SwitchToIntroUi;
|
||||
private bool _overwriteExistingLabels = false;
|
||||
private bool? _notesSuccessfullyApplied = null;
|
||||
|
|
@ -542,6 +545,19 @@ public class SettingsUi : Window, IDisposable
|
|||
{
|
||||
_uiShared.DrawServiceSelection(() => { });
|
||||
}
|
||||
|
||||
if (UiShared.IconTextButton(FontAwesomeIcon.Copy, "[DEBUG] Copy Last created Character Data to clipboard"))
|
||||
{
|
||||
if (LastCreatedCharacterData != null)
|
||||
{
|
||||
ImGui.SetClipboardText(JsonConvert.SerializeObject(LastCreatedCharacterData, Formatting.Indented));
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.SetClipboardText("ERROR: No created character data, cannot copy.");
|
||||
}
|
||||
}
|
||||
UiShared.AttachToolTip("Use this when reporting mods being rejected from the server.");
|
||||
}
|
||||
|
||||
private void DrawBlockedTransfers()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue