Add standalone testbed

This commit is contained in:
goaaats 2025-04-07 20:05:11 +02:00
parent 5ddf473450
commit b8ce2d4001
21 changed files with 948 additions and 2 deletions

View file

@ -0,0 +1,36 @@
using Dalamud.Bindings.ImGui;
namespace StandaloneImGuiTestbed;
public class Testbed
{
private bool showDemoWindow = false;
public unsafe void Draw()
{
if (ImGui.Begin("Testbed"))
{
ImGui.Text("Hello!");
if (ImGui.Button("Open demo"))
{
this.showDemoWindow = true;
}
if (this.showDemoWindow)
{
ImGui.ShowDemoWindow(ref this.showDemoWindow);
}
if (ImGui.Button("Access context"))
{
var context = ImGui.GetCurrentContext();
var currentWindow = context.CurrentWindow;
ref var dc = ref currentWindow.DC; // BREAKPOINT HERE, currentWindow will be invalid
dc.CurrLineTextBaseOffset = 0;
}
ImGui.End();
}
}
}