Skip to content

events

events

SDL3 event pump that dispatches to the nim2d callbacks.

A few things changed from SDL2. Mouse coordinates are floats now, key events carry the scancode directly, and the window sub-events became top-level event types.

dispatch

proc dispatch(nim2d: Nim2d; evt: SDL_Event)

Route one SDL event to the matching engine callback. The play loop calls

this for every pending event each frame.

Parameters

  • nim2d (Nim2d)
  • evt (SDL_Event)
Generated with mkdocstrings-nim