MouseY.htm 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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>MouseY()</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. None
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. This command returns the Y location of the mouse on the screen. This position is always from the range 0 to GraphicsHeight( ) - 1. You can use this command in combination with DrawImage to make a custom mouse pointer, or to control something on the screen directly with the mouse.
  21. <br>
  22. <br>
  23. See also: <a class=small href=MouseX.htm>MouseX</a>, <a class=small href=MouseZ.htm>MouseZ</a>.
  24. </td>
  25. </tr>
  26. </table>
  27. <h1><a href=../2d_examples/MouseY.bb>Example</a></h1>
  28. <table>
  29. <tr>
  30. <td>
  31. Graphics 640,480 <br />
  32. <br />
  33. SetBuffer BackBuffer() <br />
  34. <br />
  35. Repeat <br />
  36. Cls <br />
  37. <br />
  38. Text 320,0,"Click to reset mouse",True <br />
  39. <br />
  40. Text 0,0,"Mouse X:"+MouseX() <br />
  41. Text 0,10,"Mouse Y:"+MouseY() <br />
  42. <br />
  43. If MouseDown(1) Or MouseDown(2) Then MoveMouse 320,240 <br />
  44. <br />
  45. Text MouseX(),MouseY(),"X",True,True <br />
  46. <br />
  47. Flip <br />
  48. <br />
  49. Until KeyHit(1) <br />
  50. <br />
  51. End
  52. </td>
  53. </tr>
  54. </table>
  55. <br>
  56. <a target=_top href=../index.htm>Index</a><br>
  57. <br>
  58. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=MouseY&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  59. </html>