MouseHit.htm 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>MouseHit (button)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. button = button code (1=Left, 2=Right, 3-Middle)
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. 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.
  21. </td>
  22. </tr>
  23. </table>
  24. <h1><a href=../2d_examples/MouseHit.bb>Example</a></h1>
  25. <table>
  26. <tr>
  27. <td>
  28. ; MouseHit Example <br />
  29. <br />
  30. ; Set up the timer <br />
  31. current=MilliSecs() <br />
  32. Print "Press left mouse button a bunch of times for five seconds..." <br />
  33. <br />
  34. ; Wait 5 seconds <br />
  35. While MilliSecs() < current+5000 <br />
  36. Wend <br />
  37. <br />
  38. ; Print the results <br />
  39. Print "Pressed left button " + MouseHit(1) + " times." <br />
  40. </td>
  41. </tr>
  42. </table>
  43. <br>
  44. <a target=_top href=../index.htm>Index</a><br>
  45. <br>
  46. 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>
  47. </html>