Skip to content

touch

touch

Touch polling.

The touchpressed, touchmoved and touchreleased callbacks (see events) cover most needs and report positions in pixels. This reads the live set of touches the same way, for when polling fits better.

getTouches

proc getTouches(nim2d: Nim2d): seq[tuple[id: int64, x, y, pressure: float]]

The active touch points across all touch devices, with x and y in pixels.

Parameters

  • nim2d (Nim2d)

Returns

seq[tuple[id: int64, x, y, pressure: float]]

Generated with mkdocstrings-nim