getWindowDimensions.lua 660 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'system-window',
  3. summary = 'Get the dimensions of the window.',
  4. description = 'Returns the dimensions of the desktop window.',
  5. arguments = {},
  6. returns = {
  7. width = {
  8. type = 'number',
  9. description = 'The width of the desktop window.'
  10. },
  11. height = {
  12. type = 'number',
  13. description = 'The height of the desktop window.'
  14. }
  15. },
  16. variants = {
  17. {
  18. arguments = {},
  19. returns = { 'width', 'height' }
  20. }
  21. },
  22. notes = 'If the window is not open, this will return zeros.',
  23. related = {
  24. 'lovr.system.getWindowWidth',
  25. 'lovr.system.getWindowHeight',
  26. 'lovr.system.isWindowOpen'
  27. }
  28. }