focus.lua 736 B

12345678910111213141516171819202122
  1. return {
  2. tag = 'callbacks',
  3. summary = 'Called when the application gains or loses input focus.',
  4. description = [[
  5. The `lovr.focus` callback is called whenever the application acquires or loses focus (for
  6. example, when opening or closing the Steam dashboard). The callback receives a single argument,
  7. focused, which is a boolean indicating whether or not the application is now focused. It may
  8. make sense to pause the game or reduce visual fidelity when the application loses focus.
  9. ]],
  10. arguments = {
  11. {
  12. name = 'focused',
  13. type = 'boolean',
  14. description = 'Whether the program is now focused.'
  15. }
  16. },
  17. returns = {},
  18. related = {
  19. 'lovr.headset.isFocused',
  20. 'lovr.visible'
  21. }
  22. }