Making an Image Opaque, Deleting it, Stop drawing it when MousePressed
in
Programming Questions
•
1 years ago
I want to layer .jpg images that I have loaded into my sketch and then when the mouse is pressed/clicked on one of those images it disappears or goes opaque or simply is not visible and only the images below it become visible. Please HELP!!!
Here is what I have so far:
PImage a;
PImage b;
PImage c;
boolean showimage = true;
void setup() {
size (700, 600);
background(0);
a = loadImage ("Family_4.jpg");
b = loadImage ("Family_2.jpg");
c = loadImage ("Family_3.jpg");
}
void draw() {
if(showimage){
image(a, 0, 0);
}
if(mousePressed)showimage = false;
}
1