mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-16 04:47:47 +01:00
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Dalamud.Plugin;
|
|
using ImGuiNET;
|
|
using OtterGui.Raii;
|
|
using OtterGui.Services;
|
|
using Penumbra.Api.IpcSubscribers;
|
|
|
|
namespace Penumbra.Api.IpcTester;
|
|
|
|
public class MetaIpcTester(IDalamudPluginInterface pi) : IUiService
|
|
{
|
|
private int _gameObjectIndex;
|
|
|
|
public void Draw()
|
|
{
|
|
using var _ = ImRaii.TreeNode("Meta");
|
|
if (!_)
|
|
return;
|
|
|
|
ImGui.InputInt("##metaIdx", ref _gameObjectIndex, 0, 0);
|
|
using var table = ImRaii.Table(string.Empty, 3, ImGuiTableFlags.SizingFixedFit);
|
|
if (!table)
|
|
return;
|
|
|
|
IpcTester.DrawIntro(GetPlayerMetaManipulations.Label, "Player Meta Manipulations");
|
|
if (ImGui.Button("Copy to Clipboard##Player"))
|
|
{
|
|
var base64 = new GetPlayerMetaManipulations(pi).Invoke();
|
|
ImGui.SetClipboardText(base64);
|
|
}
|
|
|
|
IpcTester.DrawIntro(GetMetaManipulations.Label, "Game Object Manipulations");
|
|
if (ImGui.Button("Copy to Clipboard##GameObject"))
|
|
{
|
|
var base64 = new GetMetaManipulations(pi).Invoke(_gameObjectIndex);
|
|
ImGui.SetClipboardText(base64);
|
|
}
|
|
}
|
|
}
|