{{newin|[[0.9.0]]|090|type=function}}
Sets the current mouse cursor.

== Function ==
=== Synopsis ===
<source lang="lua">
love.mouse.setCursor( cursor )
</source>
=== Arguments ===
{{param|Cursor|cursor|The Cursor object to use as the current mouse cursor.}}
=== Returns ===
Nothing.

== Function ==
=== Synopsis ===
<source lang="lua">
love.mouse.setCursor( )
</source>
=== Arguments ===
None.
=== Returns ===
Nothing.
=== Notes ===
Resets the current mouse cursor to the default.

== Examples ==
<source lang="lua">
function love.load()
    cursor = love.mouse.getSystemCursor("hand")
    -- Alternative: cursor = love.mouse.newCursor("pig.png", 0, 0)
end

function love.mousepressed(x, y, button)
    -- Use a custom cursor when the left mouse button is pressed.
    if button == 1 then
        love.mouse.setCursor(cursor)
    end
end

function love.mousereleased(x, y, button)
    -- Go back to the default cursor when the left mouse button is released.
    if button == 1 then
        love.mouse.setCursor()
    end
end
</source>

== See Also ==
* [[parent::love.mouse]]
* [[love.mouse.newCursor]]
* [[love.mouse.getCursor]]
[[Category:Functions]]
{{#set:Description=Sets the current mouse cursor.}}
== Other Languages ==
{{i18n|love.mouse.setCursor}}