Posted By

S_Park on 08/04/10


Tagged

input mouse


Versions (?)

Mouse clicking (Right & Double)


 / Published in: PHP
 

  1. void draw() {
  2. stroke(255);
  3. if(mousePressed) {
  4. if (mouseEvent.getClickCount()==2) {
  5. background(0,0,random(0,255));
  6. println("<double click>");
  7. }
  8. if (mouseEvent.getButton()==MouseEvent.BUTTON3) {
  9. background(0,random(0,255),0);
  10. println("<right button>");
  11. }
  12. }
  13. }

Report this snippet  

You need to login to post a comment.