Difference between revisions of "love.mouse.isDown"

(Returns)
(Removed potentially confusing line in example)
Line 13: Line 13:
  
 
<source lang="lua">
 
<source lang="lua">
 
 
if love.mouse.isDown("r") then
 
if love.mouse.isDown("r") then
 
+
   -- do something awesome
   omg.lols():getWTF()
 
 
 
 
end
 
end
 
 
 
</source>
 
</source>
  

Revision as of 21:41, 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
   -- do something awesome
end

See Also