func_input_mousedown.rst 706 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. _func_input_mousedown:
  2. =========
  3. MouseDown
  4. =========
  5. MouseDown -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. MouseDown( button )
  10. Check for mouse button down state
  11. @button should be 1 for the left mouse button, 2 for the right mouse button or 3 for the
  12. middle mouse button.
  13. Parameters
  14. ==========
  15. Return Values
  16. =============
  17. #True if @button is currently down
  18. Examples
  19. ========
  20. .. code-block:: blitzmax
  21. ' mousedown.bmx
  22. graphics 640,480
  23. while not keyhit(KEY_ESCAPE)
  24. cls
  25. if mousedown(1) drawrect 0,0,200,200
  26. if mousedown(2) drawrect 200,0,200,200
  27. if mousedown(3) drawrect 400,0,200,200
  28. flip
  29. wend
  30. See Also
  31. ========