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
This commit is contained in:
cutealien 2022-06-23 13:25:55 +00:00
parent f2896fae5a
commit 17c7a1bd6e
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -339,7 +339,7 @@ bool CGUIContextMenu::OnEvent(const SEvent& event)
case EMIE_MOUSE_MOVED:
if (Environment->hasFocus(this))
highlight(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y), true);
return true;
break;
default:
break;
}
@ -423,7 +423,7 @@ u32 CGUIContextMenu::sendClick(const core::position2d<s32>& p)
}
//! returns true, if an element was highligted
//! returns true, if an element was highlighted
bool CGUIContextMenu::highlight(const core::position2d<s32>& p, bool canOpenSubMenu)
{
if (!isEnabled())