Housekeeping for shapes drawn on grids and/or norns’s screen?
When doing my first steps in Lua with norns and grids, I wanted to
(a) draw shapes on the grid and
(b) interact with these grid shapes, i.e. detecting user pressing grid keys belonging to a shape, brightening or dimming a shape.
Being a rookie at this, I found that I have to do “double book-keeping” for this, i.e. I had to create (and maintain) these shapes in both function gridkey (x, y, z) and function gridredraw(). I found this to be error-prone, as I had to keep track of the coordinates of these shapes in both functions.
I guess I can overcome this by creating a function that simultaneously draws a shape and returns values if buttons belonging to a shape have been pressed.
Reading that the community is contemplating adding rotate_pattern() to the norns’s Lua library, does it make sense to add functions to norns’s Lua library that draw shapes onto the grid and/or norns’s screen? Or do these already exist and I just did not search for them thoroughly? Or is this double housekeeping expected?