natiny.input.get_mouse_button_released

Lua
natiny.input.get_mouse_button_released(button) -> boolean

Returns true only on the frame when the specified mouse button was released.

Parameters

Name Type Description
button number Mouse button - a natiny.input.MOUSE_BUTTON_* constant, e.g. natiny.input.MOUSE_BUTTON_LEFT

Returns

Type Description
boolean true on the frame the button was released, false otherwise

Example

Lua
if natiny.input.get_mouse_button_released(natiny.input.MOUSE_BUTTON_LEFT) then
    finish_drag()
end

Notes

  • Returns true for the frame that consumes a pressed-to-released transition.