Advertisement
Naida275

mount rushmore

Nov 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /* Naida Enriquez
  2. Mount Rushmore
  3. */
  4.  
  5. PImage MountRushmore;
  6. int x,y;
  7.  
  8. void setup() {
  9. size(640,480);
  10. MountRushmore = loadImage("MountRushmore.jpg");
  11. x = 0;
  12. y = 0;
  13. }
  14.  
  15. void draw() {
  16. image(MountRushmore,x,y);
  17. if(mousePressed){
  18. if(mouseX > 30 && mouseX < 200 && mouseY > 60 && mouseY < 230) {
  19. text("George Washington",30,60);
  20.  
  21. }else if (mouseX > 200 && mouseX < 310 && mouseY > 135 && mouseY < 290) { text("Thomas Jefferson", 200, 130);
  22.  
  23. }else if (310 < mouseX < 595 && 180 < mouseY <380);
  24. { text("Theodore Roosevelt" ,360, 295);
  25.  
  26. }else if (440 < mouseX < 595 && 180 < mouseY < 380);
  27. { text("Abraham Lincoln" ,517,280);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement