Type Boolean Event mouse Revision Release 2022.3683 Keywords mouse, isPrimaryButtonDown
Indicates if the mouse's primary button was held down at the time the mouse event occurred.
Note that the primary button is typically the left mouse button, unless the end-user has had it swapped with the right mouse button.
-- Called when a mouse event has been received. local function onMouseEvent( event ) if event.isPrimaryButtonDown then -- The mouse's primary/left button is currently pressed down. else -- The mouse's primary/left button is not being pressed. end end -- Add the mouse event listener. Runtime:addEventListener( "mouse", onMouseEvent )
© 2020-2023 Solar2D All Rights Reserved.
Help us help you! If you notice a problem with this page, please report it.