Extensions Button Down

boolean mmf.mouse.buttonDown ( number button )

Test if one of the mouse buttons is currently held down.  A list of valid mouse constants can be found here.

Parameters

button One of the mouse button constants

Return Values

boolean true if the button is held down, false otherwise

Example

local leftDown = mmf.mouse.buttonDown(mmf.MOUSE_LEFT)
 
if (leftDown) then
  assert(mmf.mouse.buttonUp(mmf.MOUSE_LEFT) == false)
end


See also:
     Button Up, Key Down, Key Up

Copyright 2010 Justin Aquadro