getMousePosition.lua 614 B

123456789101112131415161718192021222324252627
  1. return {
  2. tag = 'system-mouse',
  3. summary = 'Get the position of the mouse.',
  4. description = 'Returns the position of the mouse.',
  5. arguments = {},
  6. returns = {
  7. x = {
  8. type = 'number',
  9. description = 'The x position of the mouse, relative to the top-left of the window.'
  10. },
  11. y = {
  12. type = 'number',
  13. description = 'The y position of the mouse, relative to the top-left of the window.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'x', 'y' }
  20. }
  21. },
  22. related = {
  23. 'lovr.system.getMouseX',
  24. 'lovr.system.getMouseY',
  25. 'lovr.mousemoved'
  26. }
  27. }