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

Right click joystick scrolling getting stuck #13300

Closed
dsimmons87 opened this issue May 14, 2017 · 6 comments
Closed

Right click joystick scrolling getting stuck #13300

dsimmons87 opened this issue May 14, 2017 · 6 comments
Labels

Comments

@dsimmons87
Copy link
Contributor

dsimmons87 commented May 14, 2017

I have my mouse set up to right click joystick scrolling (like in generals), however sometimes when issues orders (also with right click), and panning the camera around, the camera seems to randomly start moving one way, and the only way to stop it is to right click, which often means troops end up being sent to the other side of the map.

If it helps, I think it may be something to do with left click too. Immediately left clicking while in a right click joystick move maybe.

I've attached a screenshot of my input settings:

openrainputsettings

To replicate pretty easily:

  1. Enter an openra game.
  2. Make sure you have right mouse scrolling set to joystick in input options as in the screenshot.
  3. In one quick action, right click + hold, move mouse, left click while panning, release right click. This needs to be done pretty quickly.
  4. Screen will continue panning after right mouse is released.
@abcdefg30 abcdefg30 added the Bug label May 14, 2017
@dsimmons87
Copy link
Contributor Author

Ok, I think I've fixed this on a local version of the game. I'll run it for a while to make sure it hasn't broken anything and submit a PR shortly if it's all good.

@rob-v
Copy link
Contributor

rob-v commented May 16, 2017

Hi @dsimmons87, that are good news.
I'm sorry, if I knew you are working on the fix, I wouldn't start. I was just going to send my PR when I noticed your update.
Anyway, feel free to submit your PR, it might be better. I will then close mine, instead of trying to improve it.

@dsimmons87
Copy link
Contributor Author

Well I've tested mine and it's still not perfect. I've fixed the issue with left click which joystick moving making the camera move by overriding the YieldMouseFocus method. Is this the same thing you done?

However there is also another issue I've noticed when testing, where if you are moving the mouse around quickly and right clicking, for example if you are guiding a yak around, it moves the camera because it is triggering the right-click joystick.

I'm not sure if this is another issue entirely, but was going to see if it was easy to fix. The only thought I've had is maybe have a time delay or something?

@rob-v
Copy link
Contributor

rob-v commented May 16, 2017

Yes, exactly, overriding the YieldMouseFocus method to cancel scrolling. It worked, but I had to do another small change.

@rob-v
Copy link
Contributor

rob-v commented May 16, 2017

I think the issue with Yak is that you are not doing it quickly, but that while you do it quickly you move the mouse little while holding right mouse button (which you use for moving and also scrolling), so it works as should.

@dsimmons87
Copy link
Contributor Author

dsimmons87 commented May 16, 2017

Yeah true, it is just to do with the mouse moving while issuing an order. I've also just tested this in Generals, and it does the same thing.

I've tested with your code and it works perfectly for me.

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

No branches or pull requests

3 participants