push.lua 866 B

1234567891011121314151617181920212223242526272829303132
  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. name = {
  10. type = 'string',
  11. description = 'The name of the event.'
  12. },
  13. ['...'] = {
  14. type = '*',
  15. description = 'The arguments for the event. Currently, up to 4 are supported.'
  16. }
  17. },
  18. returns = {},
  19. variants = {
  20. {
  21. arguments = { 'name', '...' },
  22. returns = {}
  23. }
  24. },
  25. notes = [[
  26. Only nil, booleans, numbers, strings, and LÖVR objects are supported types for event data.
  27. ]],
  28. related = {
  29. 'lovr.event.poll',
  30. 'lovr.event.quit'
  31. }
  32. }