Difference between revisions of "love.mouse.isDown"

(Returns)
Line 9: Line 9:
 
=== Returns ===
 
=== Returns ===
 
{{param|boolean|down|True if the specified button is down.}}
 
{{param|boolean|down|True if the specified button is down.}}
 +
 +
===Example :===
 +
 +
<source lang="lua">
 +
 +
if love.mouse.isDown("r") then
 +
 +
  omg.lols():getWTF()
 +
 +
end
 +
 +
 +
</source>
 +
 
== See Also ==
 
== See Also ==
  

Revision as of 08:14, 26 September 2010

Checks whether a certain button is down.

Function

Synopsis

down = love.mouse.isDown( button )

Arguments

MouseConstant button
The button to check.

Returns

boolean down
True if the specified button is down.

Example :

if love.mouse.isDown("r") then

   omg.lols():getWTF()

end

See Also