Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mouse input breakage #11941

Merged
merged 3 commits into from Sep 2, 2016

Conversation

obrakmann
Copy link
Contributor

This re-introduces the bug from #11849 for joystick-scrolling and fixes #11940 for standard-scrolling.

@obrakmann obrakmann added this to the Next release milestone Sep 1, 2016
@pchote
Copy link
Member

pchote commented Sep 1, 2016

This seems to regress the scroll-cursor while drag-scrolling. If you could show that (or even just the default cursor, or anything else but the order cursor) while outside the deadzone it would make the two modes feel more consistent. The "bug" from #11849 is a non-issue for me because the action that happens matches the cursor in the joystick mode.

@abcdefg30
Copy link
Member

Looks good to me. 👍 / ✅

@@ -286,7 +286,8 @@ public override bool HandleMouseInput(MouseInput mi)

if (scrollType == MouseScrollType.Standard || scrollType == MouseScrollType.Inverted)
{
if (mi.Event == MouseInputEvent.Move)
if (mi.Event == MouseInputEvent.Move &&
(isStandardScrolling || (Viewport.LastMousePos - mi.Location).Length > Game.Settings.Game.MouseScrollDeadzone))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be relative to the start of the move, not the last pos. If you move your mouse slow enough it will never trigger.

@obrakmann
Copy link
Contributor Author

Updated.

This re-introduces a bug where releasing the RMB button causes an order to be generated for the selected units if the user didn't move their mouse just prior.
... when edge scrolling was also disabled.
@obrakmann obrakmann force-pushed the fix11940-std-scrolling-deadzone branch from 5ac3d1a to f554531 Compare September 2, 2016 19:34
@pchote pchote merged commit 9e867e2 into OpenRA:bleed Sep 2, 2016
@obrakmann obrakmann deleted the fix11940-std-scrolling-deadzone branch September 2, 2016 19:47
@pchote
Copy link
Member

pchote commented Sep 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a small deadzone for standard scrolling
3 participants