MouseDrag Values

BlitzMax Forums/BlitzMax Beginners Area/MouseDrag Values

Dezzo(Posted 2011) [#1]
How can i get acurate Values when i drag the Mouse.

Example Code:



If i drag the Mouse faster then the Value gets more inacurate. A really fast Mousedrag results in just a minor Change of the Variable.

cheers,
D


Midimaster(Posted 2011) [#2]
there is no inacurycy when using MouseYSpeed(). In case of high speed moving MouseYSpeed() returns higher values.

Your test is not valid: You should not only add +1 or -1.

Graphics 200,800
val=0
Repeat 
	yspeed = MouseYSpeed()
	y = MouseY()
	'If MouseDown(1)
		val= val + yspeed
	'EndIf
	
	DrawText "x " + yspeed + "  " + y , 0,0
	DrawText val ,0, 50
	
	
	Flip;Cls
Until KeyDown( Key_ESCAPE ) Or AppTerminate()
End