MouseSpeed using events

BlitzMax Forums/BlitzMax Beginners Area/MouseSpeed using events

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Nevermind, I've figured it out:
Global mouse_down
Global mouse_X
Global mouse_Y
Global mouse_dX
Global mouse_dY
FlushMouse

While 1
	WaitEvent()
	Select EventID()
		Case EVENT_MOUSEDOWN
			mouse_down=EventData()
		Case EVENT_MOUSEUP
			mouse_down=0
		Case EVENT_MOUSEMOVE
			mouse_dX=EventX()-mouse_X
			mouse_dY=EventY()-mouse_Y
			mouse_X=EventX()
			mouse_Y=EventY()