From 203c22fa985e75162502b79d362f732c32eff464 Mon Sep 17 00:00:00 2001 From: emil28092005 Date: Thu, 18 Jun 2026 21:50:08 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20feed=20mouse=20input=20to=20ImGui=20?= =?UTF-8?q?=E2=80=94=20sliders=20and=20buttons=20now=20clickable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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() --- src/CortexEngine.App/Program.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CortexEngine.App/Program.cs b/src/CortexEngine.App/Program.cs index 1cd0bad..0cc5b2f 100644 --- a/src/CortexEngine.App/Program.cs +++ b/src/CortexEngine.App/Program.cs @@ -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");