Version 0.3.2
LÖVE Documentation
OverviewLicenseCreditsInstallingGetting started
Devices
love.graphicslove.audiolove.keyboardlove.mouselove.filesystemlove.timerlove.system
Types
AnimationColorFontFileImageMusicParticleSystemSound
Callbacks
loadupdatedrawmousepressedmousereleasedkeypressedkeyreleased
Miscellaneous
ConstantsConfig filesKeyboard shortcuts
Function
love.mouse.setPosition( x, y )
Sets the current position of the mouse. Note that this generates a mousemoved event.
Usage
love.mouse.setPosition( x, y )
Arguments
xThe new x-position.
yThe new y-position.
Returns
Nothing
Examples
Example 1: Moving the mouse to the center of the screen. function load()
   local w = love.graphics.getWidth()
   local h = love.graphics.getHeight()
   love.mouse.setPosition(w/2, h/2)
end