Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix mouse events sent to wrong GUI elements when dragging
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+2
−1
src/gui/guiFormSpecMenu.cpp
|
@@ -3661,7 +3661,8 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event) |
|
|
// Mouse wheel and move events: send to hovered element instead of focused |
|
|
if (event.EventType == EET_MOUSE_INPUT_EVENT && |
|
|
(event.MouseInput.Event == EMIE_MOUSE_WHEEL || |
|
|
event.MouseInput.Event == EMIE_MOUSE_MOVED)) { |
|
|
(event.MouseInput.Event == EMIE_MOUSE_MOVED && |
|
|
event.MouseInput.ButtonStates == 0))) { |
|
|
s32 x = event.MouseInput.X; |
|
|
s32 y = event.MouseInput.Y; |
|
|
gui::IGUIElement *hovered = |
|
|