Create reader/writer- pause on mouseRelease
in
Programming Questions
•
6 months ago
I'm trying to make a reader/writer that records what is drawn in one program and plays it back in the next. No problem, except I can't figure out how to pause the output to text file when the mouse is not being pressed. This causes really ugly jumps in the drawing on playback. What piece of the puzzle am I missing here?
- void mouseDragged(){
- output.println(mouseX + "$" + mouseY); // Write the coordinate to the file
- line(mouseX-lRectX,mouseY-rectRy,pmouseX-lRectX,pmouseY-rectRy);
- }
- void mouseReleased(){
- output.println(pmouseX + "$" + pmouseY);
- //this didn't work
- }
1