rx-love.lua 524 B

12345678910111213141516171819202122232425262728293031323334
  1. -- RxLove
  2. -- https://github.com/bjornbytes/RxLove
  3. -- MIT License
  4. local rx = require 'rx'
  5. local events = {
  6. 'directorydropped',
  7. 'draw',
  8. 'filedropped',
  9. 'focus',
  10. 'keypressed',
  11. 'keyreleased',
  12. 'lowmemory',
  13. 'mousefocus',
  14. 'mousemoved',
  15. 'mousepressed',
  16. 'mousereleased',
  17. 'quit',
  18. 'resize',
  19. 'textedited',
  20. 'textinput',
  21. 'touchmoved',
  22. 'touchpressed',
  23. 'touchreleased',
  24. 'threaderror',
  25. 'update',
  26. 'visible',
  27. 'wheelmoved'
  28. }
  29. for _, event in pairs(events) do
  30. love[event] = rx.Subject.create()
  31. end