lovr.system.wasMouseReleased

Edit

Returns whether a button on the mouse was released this frame.

released = lovr.system.wasMouseReleased(button)

Arguments

NameTypeDescription
buttonnumber The index of a button to check. Use 1 for the primary mouse button, 2 for the secondary button, and 3 for the middle button. Other indices can be used, but are hardware-specific.

Returns

NameTypeDescription
releasedboolean Whether the mouse button was released this frame.

Notes

Technically this returns whether the button was released between the last 2 calls to lovr.system.pollEvents, but that function is called automatically at the beginning of each frame in lovr.run, so it all works out!

See also