Update mouse movement handling:
- Separate axis monitoring to prevent direction blocking
- Capture pointer movements outside the window to prevent lost directions
- Pointer no longer confined to threshold region
Basically changed ALL the MouseMoved handling - requires thorough testing!
While you're at mouse events would you please take a look at this PR? https://github.com/oomek/attractplus/pull/108/files
I should have added that up front - this PR is specifically to fix that issue
- https://github.com/oomek/attractplus/issues/107
- https://github.com/oomek/attractplus/pull/108/files
@oomek Why was this branch deleted?
I didn't
My fault. Restored, fetch
Testing. I've had no idea that the mouse pointer is locked to the centre of the screen when the mouse movement is bound to Up/Down controls. Looking good so far. Can you please explain the other issues it fixes, I'm not able to reproduce.
- The priority of the mouse moved event feels inconsistent
The old capture region is a small box in the center of the window. When the mouse escapes this box it triggers a direction, and the mouse is reset to the center.
If you move the mouse diagonally, it will hit one edge of the box before the other, then reset. For example, the "right" direction hits moments before the "up" direction, and all "up" progress is lost when reset.
- If I spin the spinner too fast, it gets "stuck"
When the mouse is moved quickly it has a chance to escape the window. Although AM still tracks it, it doesn't trigger the capture region reset.
To reproduce:
- Set the mouse up/down to control game prev/next.
- Move mouse up/right - but more right than up. "Right" triggers a cursor reset, causing to "up" to never register.
- Mouse the mouse very fast to escape the window. Up/down no longer registers prev/next.