Mouse Toggle Loop
in
Programming Questions
•
2 years ago
Greetings,
This is driving me nuts, because there must be a simple way to do this. I'd like to toggle between loop() and noLoop() with a mouse click. I've tried booleans, I've looked at all the mouse functions in the reference, I've searched the forums and the wider web.
Specifically, while draw is running, I'd like to click the mouse and halt draw. Then I'd like to click the mouse again and resume. In other words, I'm looking for a "pause" feature (not to be confused with delay()). I can stop draw with a left click, and resume with a right click, but that won't work for my application. It needs to be a toggle with the left click only.
Should be simple... what am I overlooking?
TIA,
RA
1