|
|
Function
love.mouse.setPosition( x, y )
Sets the current position of the mouse. Note that this generates a mousemoved event.
If you just want to confine the mouse to the screen area, take a look at love.system.grabInput.
Synopsis
love.mouse.setPosition( x, y )
Arguments
x
The new x-position.
y
The new y-position.
Returns
(Nothing)
See Also
Examples
Example 4: Setting the mouse position
-- Press a key to move the mouse to -- some random point. function keypressed(k) local x, y = math.random(0,800), math.random(0,600) love.mouse.setPosition(x, y) end
Copyright © 2006-2008 LÖVE Development Team.
|