| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>MouseHit (button)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- button = button code (1=Left, 2=Right, 3-Middle)
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- This command returns the number of times a specified mouse button has been hit since the last time you called the MouseHit() command. Also see KeyHit and JoyHit.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/MouseHit.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; MouseHit Example
<br />
-
<br />
- ; Set up the timer
<br />
- current=MilliSecs()
<br />
- Print "Press left mouse button a bunch of times for five seconds..."
<br />
-
<br />
- ; Wait 5 seconds
<br />
- While MilliSecs() < current+5000
<br />
- Wend
<br />
-
<br />
- ; Print the results
<br />
- Print "Pressed left button " + MouseHit(1) + " times."
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=MouseHit&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|