love.mouse.getRelativeMode

love.mouse.getRelativeMode Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets whether relative mode is enabled for the mouse. If relative mode is enabled, the cursor is hidden and doesn't move when the mouse does, but relative mouse motion events are still generated via love.mousemoved. This lets the mouse move in any direction indefinitely without the cursor getting stuck at the edges of the screen. The reported position of the mouse is not updated while

love.mouse.getSystemCursor

love.mouse.getSystemCursor Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets a Cursor object representing a system-native hardware cursor. Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. Function Synopsis cursor

love.mouse.getX

love.mouse.getX Returns the current x-position of the mouse. Function Synopsis x = love.mouse.getX( ) Arguments None. Returns number x The position of the mouse along the x-axis. Examples Draw a vertical line at the mouse's x-position. function love.draw() local x = love.mouse.getX() love.graphics.line(x,0, x,love.graphics.getHeight()) end See Also love.mouse love.mouse.getY love.mouse.getPosition

love.mouse.getY

love.mouse.getY Returns the current y-position of the mouse. Function Synopsis y = love.mouse.getY( ) Arguments None. Returns number y The position of the mouse along the y-axis. Examples Draw a horizontal line at the mouse's y-position. function love.draw() local y = love.mouse.getY() love.graphics.line(0,y, love.graphics.getWidth(),y) end See Also love.mouse love.mouse.getX love.mouse.getPosition

love.mouse.hasCursor

love.mouse.hasCursor Available since LÖVE 0.10.0 This function is not supported in earlier versions. Gets whether cursor functionality is supported. If it isn't supported, calling love.mouse.newCursor and love.mouse.getSystemCursor will cause an error. Mobile devices do not support cursors. Function Synopsis hascursor = love.mouse.hasCursor( ) Arguments None. Returns boolean hascursor Whether the system has cursor functionality. See Also love.mouse

love.mouse.isDown

love.mouse.isDown Checks whether a certain mouse button is down. This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. Function Available since LÖVE 0.10.0 This variant is not supported in earlier versions. Synopsis down = love.mouse.isDown( button, ... ) Arguments number button The index of a button to check. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the mid

love.mouse.isGrabbed

love.mouse.isGrabbed Checks if the mouse is grabbed. Function Synopsis grabbed = love.mouse.isGrabbed( ) Arguments None. Returns boolean grabbed True if the cursor is grabbed, false if it is not. Examples Toggles whether the mouse is grabbed by pressing tab, using love.mouse.setGrabbed. function love.keypressed(key) if key == "tab" then local state = not love.mouse.isGrabbed() -- the opposite of whatever it currently is love.mouse.setGrabbed(state) --Use love.mouse.setGra

love.mouse.isVisible

love.mouse.isVisible Checks if the cursor is visible. Function Synopsis visible = love.mouse.isVisible( ) Arguments None. Returns boolean visible True if the cursor to visible, false if the cursor is hidden. Examples Toggle mouse visibility by pressing tab (using setVisible). function love.keypressed(key) if key == "tab" then local state = not love.mouse.isVisible() -- the opposite of whatever it currently is love.mouse.setVisible(state) end end See Also love.mouse

love.mouse.newCursor

love.mouse.newCursor Available since LÖVE 0.9.0 This function is not supported in earlier versions. Creates a new hardware Cursor object from an image file or ImageData. Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates. The hot spot is the point th

love.mouse.setCursor

love.mouse.setCursor Available since LÖVE 0.9.0 This function is not supported in earlier versions. Sets the current mouse cursor. Function Synopsis love.mouse.setCursor( cursor ) Arguments Cursor cursor The Cursor object to use as the current mouse cursor. Returns Nothing. Function Synopsis love.mouse.setCursor( ) Arguments None. Returns Nothing. Notes Resets the current mouse cursor to the default. Examples function love.load() cursor = love.mouse.getSystemCursor("hand") -