From 95147ee8a27926a58e92ae4677d43b6afe19b35f Mon Sep 17 00:00:00 2001 From: halx99 Date: Fri, 4 Oct 2024 17:29:06 +0800 Subject: [PATCH] Improve ImGuiPresenter, prevent mouse scroll event when handled --- extensions/ImGui/src/ImGui/ImGuiPresenter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ImGui/src/ImGui/ImGuiPresenter.cpp b/extensions/ImGui/src/ImGui/ImGuiPresenter.cpp index 0e34e6f56ac..1df872047be 100644 --- a/extensions/ImGui/src/ImGui/ImGuiPresenter.cpp +++ b/extensions/ImGui/src/ImGui/ImGuiPresenter.cpp @@ -185,7 +185,7 @@ class ImGuiSceneEventTracker : public ImGuiEventTracker } }; auto mouseListener = EventListenerMouse::create(); - mouseListener->onMouseDown = mouseListener->onMouseUp = stopAnyMouse; + mouseListener->onMouseDown = mouseListener->onMouseUp = mouseListener->onMouseMove = mouseListener->onMouseScroll = stopAnyMouse; _trackLayer->getEventDispatcher()->addEventListenerWithSceneGraphPriority(mouseListener, _trackLayer); scene->addChild(_trackLayer, INT_MAX); #endif