summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-24 23:37:07 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-24 23:37:07 +0100
commit65c9432714c166cd79bdc24c07b18d8b15670063 (patch)
treef691a4fcff6d4381d2e5a923d615a18735d3cde8
parentIntegrate ImGUI main calls (diff)
downloadilt-65c9432714c166cd79bdc24c07b18d8b15670063.tar.bz2
ilt-65c9432714c166cd79bdc24c07b18d8b15670063.tar.xz
ilt-65c9432714c166cd79bdc24c07b18d8b15670063.zip
Don't process input events which ImGui handled
-rw-r--r--ui/mainApplication.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/mainApplication.cpp b/ui/mainApplication.cpp
index d843ef1..6cb1037 100644
--- a/ui/mainApplication.cpp
+++ b/ui/mainApplication.cpp
@@ -36,6 +36,8 @@ MainApplication::processInputs()
return;
}
ImGui_ImplSDL2_ProcessEvent(&e);
- windows.applyOne(&Window::handleInput, e);
+ if (!ImGui::GetIO().WantCaptureMouse) {
+ windows.applyOne(&Window::handleInput, e);
+ }
}
}