Files
cell/scripts/event.js

16 lines
442 B
JavaScript

var event = this
event.push_event[cell.DOC] = `Push a custom user event into SDL's queue, passing a callback function.
:param event: A function to call when this event is consumed.
:return: None
`
event.engine_input[cell.DOC] = `Poll all system events (keyboard, mouse, etc.) and call the given function with each event object.
:param callback: A function that executes on each event consumed from the poll.
:return: None
`
return event