From 2aa963fc37dbf61a008031d82e2aac87bf89f9db Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 28 Dec 2023 15:30:36 -0500 Subject: use WantCaptureMouse instead of trying to detect hovering in ImGui --- editor/editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/editor.cpp b/editor/editor.cpp index 542769a..008c51f 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -186,7 +186,7 @@ void PkeEditor_Tick(double delta) { hoveredEntity = EntityHandle_MAX; } - bool imGuiHovered = ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow); + bool imGuiHovered = ImGui::GetIO().WantCaptureMouse; if (selectedEntity != EntityHandle_MAX && !imGuiHovered) { auto holder = PkeInput_Query(dbgCtrl_ClearSelection); -- cgit v1.2.3