From 17c7a1bd6e78c830e89d0f7e7138dfa2f1ee7b0a Mon Sep 17 00:00:00 2001 From: cutealien Date: Thu, 23 Jun 2022 13:25:55 +0000 Subject: [PATCH] CGUIContextMenu no longer marks EMIE_MOUSE_MOVED as handled This got in the way of allowing to move a camera with right-mouse-button while having a context menu. Hard to tell which way is "more" correct as this break of behavior probably can also mess up some situations. There also would be 3rd option of only catching the event when highlighting happens. Anyway - usually if this should be caught it should be caught for all ui elements and people will check focused or hovered. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6412 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 1 + source/Irrlicht/CGUIContextMenu.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changes.txt b/changes.txt index 9ac5eb81..5648e352 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,7 @@ -------------------------- Changes in 1.9 (not yet released) +- CGUIContextMenu no longer marks EMIE_MOUSE_MOVED as handled - core::array::linear_search and linear_reverse_search can now work with any types as long as corresponding operator== is implemented. - Add checks for sane image sizes in some image loaders (so far: bmp, jpg, tga, png). Thanks @sfan5 for the original patch (got modified a bit): https://github.com/minetest/irrlicht/commit/dbd39120e7ed8c0c97e48e2df62347627f3c1d42 diff --git a/source/Irrlicht/CGUIContextMenu.cpp b/source/Irrlicht/CGUIContextMenu.cpp index d38ceeda..fb866dc7 100644 --- a/source/Irrlicht/CGUIContextMenu.cpp +++ b/source/Irrlicht/CGUIContextMenu.cpp @@ -339,7 +339,7 @@ bool CGUIContextMenu::OnEvent(const SEvent& event) case EMIE_MOUSE_MOVED: if (Environment->hasFocus(this)) highlight(core::position2d(event.MouseInput.X, event.MouseInput.Y), true); - return true; + break; default: break; } @@ -423,7 +423,7 @@ u32 CGUIContextMenu::sendClick(const core::position2d& p) } -//! returns true, if an element was highligted +//! returns true, if an element was highlighted bool CGUIContextMenu::highlight(const core::position2d& p, bool canOpenSubMenu) { if (!isEnabled())