LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: ndhb on February 21, 2008, 19:28:01

Title: Bug or intentional? setGrabbed resets mouse wheel
Post by: ndhb on February 21, 2008, 19:28:01
Hi all!

Am I the only thinking it's rather odd that the mouse wheel value ("dwheel") is reset in "setGrabbed" (via the "resetMouse" method)?

It means that we have to poll the value for the mouse wheel, e.g. Mouse.getDWheel() BEFORE changing grabbed status (or that method will always be returning "0"). My application works by grabbing the mouse when a mouse button is pressed (to move around) and then releasing grab when a mouse button is released.

Any thoughts?  ::)
Title: Re: Bug or intentional? setGrabbed resets mouse wheel
Post by: bobjob on February 27, 2008, 22:11:52
1 option is to always have the mouse grabbed, and draw a custom mouse icon when not holding down the mouse key
Title: Re: Bug or intentional? setGrabbed resets mouse wheel
Post by: ndhb on February 28, 2008, 10:34:29
You have a good point.

However, I was more looking for any reasons why doing resetting the mouse wheel at the point, was a good idea.