Help me understand

well i want to play with ImGui and it seems that it doesnt work by itself, like it need some window to connect to. So I added ClickableTransparentOverlay package and now ImGui magicly working even thought I didnt write any "connection" code between ImGui and ClickableTransparentOverlay window. So my question is how does ImGui knows to which window it should connect?
2 Replies
blueberriesiftheywerecats
code that I wrote
using ClickableTransparentOverlay;
using ImGuiNET;

var window = new CustomOverlay();
await window.Run();

internal class CustomOverlay : Overlay
{
public CustomOverlay() : base(1920, 1080)
{
}

protected override void Render()
{
ImGui.Begin("Test");
ImGui.Text("Works");
}
}
using ClickableTransparentOverlay;
using ImGuiNET;

var window = new CustomOverlay();
await window.Run();

internal class CustomOverlay : Overlay
{
public CustomOverlay() : base(1920, 1080)
{
}

protected override void Render()
{
ImGui.Begin("Test");
ImGui.Text("Works");
}
}
Kouhai
Kouhai4mo ago
Internally ClickableTransparentOverlay calls ImGui.CreateContext() and after your code in Render is executed it internally calls another render method that takes the drawn bitmap from ImGui and draws it to a DX11 device
Want results from more Discord servers?
Add your server