<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://oxeyegames.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MouseButton</id>
		<title>MouseButton - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://oxeyegames.com/wiki/index.php?action=history&amp;feed=atom&amp;title=MouseButton"/>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=MouseButton&amp;action=history"/>
		<updated>2026-04-13T18:17:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://oxeyegames.com/wiki/index.php?title=MouseButton&amp;diff=373&amp;oldid=prev</id>
		<title>Jeb: Created page with '{{EngineHook| mouseButton(x, y, button, clickCount) | This hook is called when-ever the user clicks on a mouse button or scrolls the mouse wheel. | {{MethodParam|x|An integer|The...'</title>
		<link rel="alternate" type="text/html" href="http://oxeyegames.com/wiki/index.php?title=MouseButton&amp;diff=373&amp;oldid=prev"/>
				<updated>2010-01-29T15:13:47Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#39;{{EngineHook| mouseButton(x, y, button, clickCount) | This hook is called when-ever the user clicks on a mouse button or scrolls the mouse wheel. | {{MethodParam|x|An integer|The...&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{EngineHook|&lt;br /&gt;
mouseButton(x, y, button, clickCount)&lt;br /&gt;
|&lt;br /&gt;
This hook is called when-ever the user clicks on a mouse button or scrolls the mouse wheel.&lt;br /&gt;
|&lt;br /&gt;
{{MethodParam|x|An integer|The on-screen x coordinate of the mouse click.}}&lt;br /&gt;
{{MethodParam|y|An integer|The on-screen y coordinate of the mouse click.}}&lt;br /&gt;
{{MethodParam|button|An integer|Which button that was pressed. Button 0 is LEFT, 1 is RIGHT, 2 is MIDDLE, 3 is WHEEL UP and 4 is WHEEL DOWN}}&lt;br /&gt;
{{MethodParam|clickCount|An integer|This value is usually 1, but if the user clicks the same button rapidly at the same location (within 10 pixels of the previous click), then this value will increase for each click. You can use this to detect double-clicking.}}&lt;br /&gt;
}}&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  local function onMouseButton(x, y, button, clickCount)&lt;br /&gt;
&lt;br /&gt;
    print(x .. &amp;quot;, &amp;quot; .. y .. &amp;quot;, &amp;quot; .. button .. &amp;quot;, &amp;quot; .. clickCount)&lt;br /&gt;
&lt;br /&gt;
    if button == 0 then&lt;br /&gt;
    elseif button == 1 then&lt;br /&gt;
    elseif button == 2 then&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  hook.add(&amp;quot;mouseButton&amp;quot;, onMouseButton)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeb</name></author>	</entry>

	</feed>