andr-ew / crops

functional UI component system for monome norns (+ grid/arc)
2 stars 0 forks source link

core: support multiple of same device #16

Open andr-ew opened 1 year ago

andr-ew commented 1 year ago

crops.dirty.grid = true -> crops.grid.dirty(id)

crops.connect_grid(render, g, fps) -> crops.connect_grid(render, g, id, fps)

id is optional, when not provided, the flag is located at crops.dirty.grid, and dirties all devices.

if id provided, flag is located at crops.dirty.grids[id]

andr-ew commented 1 year ago

components can still choose to dirty all devices (i.e., to redraw after a change in internal data) but it's less efficient since it could trigger unnecessary redraws on a second device