mousepressed.lua 816 B

1234567891011121314151617181920212223242526272829303132
  1. return {
  2. tag = 'callbacks',
  3. summary = 'Called when a mouse button is pressed.',
  4. description = 'This callback is called when a mouse button is pressed.',
  5. arguments = {
  6. {
  7. name = 'x',
  8. type = 'number',
  9. description = 'The x position of the mouse when the button was pressed.'
  10. },
  11. {
  12. name = 'y',
  13. type = 'number',
  14. description = 'The y position of the mouse when the button was pressed.'
  15. },
  16. {
  17. name = 'button',
  18. type = 'number',
  19. description = [[
  20. The button that was pressed. Will be 1 for the primary button, 2 for the secondary button,
  21. or 3 for the middle mouse button.
  22. ]]
  23. }
  24. },
  25. returns = {},
  26. related = {
  27. 'lovr.mousereleased',
  28. 'lovr.mousemoved',
  29. 'lovr.wheelmoved',
  30. 'lovr.system.isMouseDown'
  31. }
  32. }