push.lua 802 B

12345678910111213141516171819202122232425262728
  1. return {
  2. summary = 'Manually push an event onto the queue.',
  3. description = [[
  4. Pushes an event onto the event queue. It will be processed the next time `lovr.event.poll` is
  5. called. For an event to be processed properly, there needs to be a function in the
  6. `lovr.handlers` table with a key that's the same as the event name.
  7. ]],
  8. arguments = {
  9. {
  10. name = 'name',
  11. type = 'string',
  12. description = 'The name of the event.'
  13. },
  14. {
  15. name = '...',
  16. type = '*',
  17. description = 'The arguments for the event. Currently, up to 4 are supported.'
  18. }
  19. },
  20. returns = {},
  21. notes = [[
  22. Only nil, booleans, numbers, strings, and LÖVR objects are supported types for event data.
  23. ]],
  24. related = {
  25. 'lovr.event.poll',
  26. 'lovr.event.quit'
  27. }
  28. }