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 the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused!
cursor = love.mouse.newCursor( imageData, hotx, hoty )
ImageData imageData
number hotx (0)
number hoty (0)
Cursor cursor
cursor = love.mouse.newCursor( filename, hotx, hoty )
string filename
number hotx (0)
number hoty (0)
Cursor cursor
cursor = love.mouse.newCursor( fileData, hotx, hoty )
FileData fileData
number hotx (0)
number hoty (0)
Cursor cursor
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.mouse.newCursor