Difference between revisions of "love.mousemoved"

(Undo revision 14737 by Rmcode (talk) ... Second time this happened today :()
m
Line 7: Line 7:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|x|Mouse x position.}}
+
{{param|number|x|The mouse position on the x-axis.}}
{{param|number|y|Mouse y position.}}
+
{{param|number|y|The mouse position on the y-axis.}}
 
{{param|number|dx|The amount moved along the x-axis since the last time love.mousemoved was called.}}
 
{{param|number|dx|The amount moved along the x-axis since the last time love.mousemoved was called.}}
 
{{param|number|dy|The amount moved along the y-axis since the last time love.mousemoved was called.}}
 
{{param|number|dy|The amount moved along the y-axis since the last time love.mousemoved was called.}}

Revision as of 10:17, 25 March 2015

Available since LÖVE 0.9.2
This function is not supported in earlier versions.

Callback function triggered when the mouse is moved.

Function

Synopsis

love.mousemoved( x, y, dx, dy )

Arguments

number x
The mouse position on the x-axis.
number y
The mouse position on the y-axis.
number dx
The amount moved along the x-axis since the last time love.mousemoved was called.
number dy
The amount moved along the y-axis since the last time love.mousemoved was called.

Returns

Nothing.

Notes

If Relative Mode is enabled for the mouse, the dx and dy arguments of this callback will update but x and y will not.

See Also


Other Languages