From 5b15eeb42c335696fa0913e9c3f32375b1f32a1a Mon Sep 17 00:00:00 2001 From: Wojciech Jarosz Date: Thu, 4 Jan 2024 14:57:05 +1300 Subject: [PATCH] only accept gestures when ImGui doesn't want input --- CMakeLists.txt | 6 +++++- src/app.cpp | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7487686..f9739af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,11 @@ if(portable-file-dialogs_ADDED) target_include_directories(portable-file-dialogs INTERFACE "${portable-file-dialogs_SOURCE_DIR}") endif() -# set(HELLOIMGUI_USE_GLFW_METAL ON) set(HELLOIMGUI_USE_GLFW_OPENGL3 ON) set(HELLOIMGUI_USE_SDL_OPENGL3 ON) +# set(HELLOIMGUI_USE_GLFW_METAL ON) + +# set(HELLOIMGUI_USE_GLFW_OPENGL3 ON) + +# set(HELLOIMGUI_USE_SDL_OPENGL3 ON) CPMAddPackage("gh:pthom/hello_imgui#8abe2c98dbf99e3a098eb5548b0a079c9f4c8a8f") if(hello_imgui_ADDED) message(STATUS "hello_imgui library added") diff --git a/src/app.cpp b/src/app.cpp index ece0a57..530e761 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -958,7 +958,10 @@ void SampleViewer::draw_editor() bool SampleViewer::process_event(void *e) { -#ifdef HELLOIMGUI_USE_SDL_OPENGL3 +#ifdef HELLOIMGUI_USE_SDL + if (ImGui::GetIO().WantCaptureMouse) + return false; + static bool sPinch = false; SDL_Event *event = static_cast(e); switch (event->type)