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.getX( )
Gets the current x-position of the mouse.
Usage
love.mouse.getX( )
Arguments
None
Returns
numberCurrent x-position.
Examples
Example 1: Getting the position of the mouse. function draw()
   local x = love.mouse.getX()
   local y = love.mouse.getY()
   love.graphics.draw("Mouse is at: (" .. x .. "," .. y .. ")", 100, 100)
end