Skip to content

Mouse wheel delta #83

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

Closed
immortalx74 opened this issue May 27, 2019 · 6 comments
Closed

Mouse wheel delta #83

immortalx74 opened this issue May 27, 2019 · 6 comments
Labels

Comments

@immortalx74
Copy link

immortalx74 commented May 27, 2019

There seems to be a mouse wheel delta issue with specific mice. I described the problem in imgui's issues here: url

@eliasdaler
Copy link
Contributor

Please write a test program which catches sf::Event::MouseWheelMoved and writes event.mouseWheel.delta to console. What values do you get when you rotate the mouse?

@eliasdaler
Copy link
Contributor

eliasdaler commented May 27, 2019

Ah, I see that it has been deprecated in SFML 2.5.
Try out this event: sf::Event::MouseWheelScrollEvent and see what values event.mouseWheelScroll.delta outputs.

See this

@eliasdaler eliasdaler added the bug label May 27, 2019
@immortalx74
Copy link
Author

Thanks for looking in to this. When I move the wheel slowly (in which case it actually doesn't scroll at all) I get this output:
wheel type: vertical wheel movement: 0.75 mouse x: 464 mouse y: 265 wheel type: vertical wheel movement: -0.5 mouse x: 464 mouse y: 265 wheel type: vertical wheel movement: -0.25 mouse x: 464 mouse y: 265 wheel type: vertical wheel movement: -0.25 mouse x: 464 mouse y: 265 wheel type: vertical wheel movement: -0.25 mouse x: 464 mouse y: 265 wheel type: vertical wheel movement: -0.25 mouse x: 464 mouse y: 265

And when I move it fast (which is when it actually scrolls) I get this:
wheel type: vertical wheel movement: -1 mouse x: 379 mouse y: 321 wheel type: vertical wheel movement: -1 mouse x: 379 mouse y: 321 wheel type: vertical wheel movement: -1.5 mouse x: 379 mouse y: 321 wheel type: vertical wheel movement: -1.75 mouse x: 378 mouse y: 320 wheel type: vertical wheel movement: -1 mouse x: 374 mouse y: 311 wheel type: vertical wheel movement: -1 mouse x: 370 mouse y: 302 wheel type: vertical wheel movement: -0.75 mouse x: 368 mouse y: 299 wheel type: vertical wheel movement: -1 mouse x: 368 mouse y: 296

@eliasdaler
Copy link
Contributor

Okay.
Can you try out this branch, please?
https://github.com/eliasdaler/imgui-sfml/tree/mouse-scroll-fix

@immortalx74
Copy link
Author

That works perfectly! Thank you very much for taking the time to do it!

@eliasdaler
Copy link
Contributor

Nice. I'll merge it into master and release 2.0.2 later today. :)

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

2 participants