isFocused.lua 537 B

123456789101112131415161718192021222324
  1. return {
  2. tag = 'headset-misc',
  3. summary = 'Check if LÖVR has VR input focus.',
  4. description = [[
  5. Returns whether LÖVR has VR input focus. Focus is lost when the VR system menu is shown. The
  6. `lovr.focus` callback can be used to detect when this changes.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. focused = {
  11. type = 'boolean',
  12. description = 'Whether the application is focused.'
  13. }
  14. },
  15. variants = {
  16. {
  17. arguments = {},
  18. returns = { 'focused' }
  19. }
  20. },
  21. related = {
  22. 'lovr.focus'
  23. }
  24. }