Difference between revisions of "love.mouse.isDown"

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 ===
===Example :===
 
 
 
 
<source lang="lua">
 
<source lang="lua">
 
if love.mouse.isDown("r") then
 
if love.mouse.isDown("r") then
Line 17: Line 15:
 
end
 
end
 
</source>
 
</source>
 
 
== See Also ==
 
== See Also ==
 
 
* [[MouseConstant|Mouse Constant / buttons]]
 
* [[MouseConstant|Mouse Constant / buttons]]
 
* [[parent::love.mouse]]
 
* [[parent::love.mouse]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Checks whether a certain button is down.}}
 
{{#set:Description=Checks whether a certain button is down.}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.mouse.isDown}}
 
{{i18n|love.mouse.isDown}}

Revision as of 10:35, 25 March 2011

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


Other Languages