Type Boolean Event mouse Revision 2017.3060 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 )
© 2017 Corona Labs Inc. All Rights Reserved. (Last updated: 18-Mar-2017)
Help us help you! If you notice a problem with this page, please report it.