UInputMan:MouseButtonHeld

From Data Realms Wiki

Jump to: navigation, search
Function
SyntaxUInputMouseButtonHeld( Number )
Description:
Returns whether or not a mouse button is held down.
ReturnsBoolean




Example
DescriptionPrints 1 if left mouse button is held, 0 if not.
Code
  1. if UInputMan:MouseButtonHeld(0) then print(1) else print(0) end
  2.  --0 is left button, 1 is right, and 2 is middle.
OutputPrints 1 or 0 to console.
Personal tools