Skip to content

isMouseClicked

Checks if a mouse button was just clicked this frame.

Syntax

lua
Ham.isMouseClicked(button)

Parameters

NameTypeDescription
buttonintegerMouse button (0 = Left, 1 = Right, 2 = Middle)

Returns

  • boolean - true if the button was just clicked

Example

lua
if Ham.isMouseClicked(0) then
    print("Left click detected")
end

See Also

Released under the ISC License.