We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a question about event handling.
Some of my code is not working properly, and I suspect it is because I am unfamiliar with the way processing handles mouse events.
So, say I am dong something in the draw function.
And I also have a mousePressed function implemented.
When someone clicks their mouse, what happens with the draw function? Does it pause until the mousePressed function exits, or do they happen asyncronously via multi-threading?
(It seems not to be asyncronous to me.)
If it does pause and wait, does it resume at the point it paused at or does it start at the beginning of the loop?
My best guess is that when someone clicks their mouse, that event doesn't get acted upon until the draw function finishes its current iteration, then the event gets taken care of and the draw function resumes at the beginning of the next iteration. Is this correct?
As a side note, is there stuff that you should only do in the draw function? for example, in my event handlers, I am using resetMatrix() this doesn't seem to cause any trouble, but processing (.js atleast) seems to be picky about some stuff.