Dplug
Dplug copied to clipboard
When a widget is dragged, should other elements be "isMouseOver"?
EDIT: independently reported by QA as an issue.
Found this: you are dragging an object, go into another UIelement while dragging, and then the new Element highlights since you could click it. However, you cannot really click it, as you are dragging.
Either
- A. needs
isDraggingAnotherElement
, - B. or to change
isMouseOver
so that it's false when dragging another UIElement. (preffered)
This is absolutely endemic, for example when you drag a knob, every other widget is mouse over.
Current algorithm:
void receive-mouse-movement(pos):
root.mouse-is-moving(pos)
if (no widget was found to be "mouseover")
"mouseover" becomes null
void mouse-is-moving(e, pos):
recurse mouse-is-moving(highz children, pos)
if (isDragged) onMouseDrag
if (visible and contain mouse):
if first in stack, become the "mouseover" widget
onMouseMove, even if not "mouseover" (!)
recurse mouse-is-moving(lowz children, pos)
Changes needed:
- [x] when a drag is stopped, find the mouseover element again
- [x] mouse over can't become null during a drag operation
- [x] dragged widget does receive onMouseDrag but not onMouseMove at the same time, this is redundant.
- [x] only the mouseOver widget receive mouseMove callbacks, and not all widgets in the stack
- [x]
isDragged
impliesisMouseOver
when true
futureMouseDrag not very recommended for now... I don't really like the end result either. Not having mouseOver is a bit "stale" while dragging. It still gives useful "this is draggable" information.
futureMouseDrag
can be kept, eventually we can stop later forcing the dragged widget to be the mouseover one.
But it doesn't really make interface worse, some developers might like it better.
Remaining bug was fixed too.