|Project:||The Open Toolkit library|
OpenTK.Input.MouseDevice.Move was commented out in revision 1303, because the .XDelta and .YDelta properties were not working properly. The best solution mentioned in this forum thread, was to remove the delta support.
I've attached a patch to /trunk,r1519 that does a few things (I figured that while I was in there mucking about...):
- Re-enables the MouseDevice.Move event, using a new MouseMoveEventArgs class that holds an (X, Y) pair and also a (XDelta, YDelta) pair. XDelta and YDelta are calculated from the last known mouse position.
- Creates a new MouseDevice.WheelChanged event, which uses a new MouseWheelEventArgs class that holds an (X, Y) pair for the current mouse position, a Value and Delta properties. Delta is calculated from the last known wheel value.
- Cleans up MouseDevice.ButtonDown and MouseDevice.ButtonUp to use the same event handler delegate type, which uses a new MouseButtonEventArgs class, that holds an (X, Y) pair and a Button property.
- Cleans up a bit of the doc comments from MouseDevice (mostly just things that were throwing warnings at compile time)
Not that the ButtonDown and ButtonUp changes are not actually a bug fix, just a change to maintain consistency with the other new code.
I have tested these on Windows XP and OpenSUSE, and found no problems.