Closed don41382 closed 3 years ago
I think the simplest solution is to keep the callback as a function in the sketch then have a global id variable that selects which Sprite instance is to be used. I do not know where this labmda id is so unfortunately this is not something I can help with.
Hi,
I am trying to load multiple sprite images. My problem is that
TJpgDec.setCallback(...)
set's the callback globaly. So when I am trying to call:This doesn't work, because I can't access the
id
variable inside the lambda function. If I define it with captures, the signature ofSketchCallback
is working anymore.Do you have any idea how to accomplish this? Thanks for you help in advance!