fix: feed mouse input to ImGui — sliders and buttons now clickable

- ImGui.GetIO().MousePos set from IInputState.MouseX/MouseY each frame
- ImGui.GetIO().MouseDown[0-2] set from MouseLeft/Right/Middle
- DisplaySize also updated each frame (was only set at init)
- Done before BeginImGuiFrame() / ImGui.NewFrame()
This commit is contained in:
emil28092005
2026-06-18 21:50:08 +03:00
parent 29a58d204b
commit 203c22fa98
+7
View File
@@ -152,6 +152,13 @@ class Program
if (hasImGui)
{
var io = ImGui.GetIO();
io.DisplaySize = new System.Numerics.Vector2(window.Width, window.Height);
io.MousePos = new System.Numerics.Vector2(input.MouseX, input.MouseY);
io.MouseDown[0] = input.MouseLeft;
io.MouseDown[1] = input.MouseRight;
io.MouseDown[2] = input.MouseMiddle;
renderer.BeginImGuiFrame();
ImGui.Begin("Cortex Engine Debug");