I am currently running into trouble having the color being selected and drawing… The colors will not work when pressed on? Not exactly sure why it is not working
PImage myElonStart, myMonroe, myLennon,
myBlueCan, myRedCan, myPinkCan, myGreenCan, myTanCan,
mySave, myRestart, myBrush1, myBrush2, myBrush3;
PFont thePopArtFont;
boolean saveTheImage =false;
boolean justSaved = false;
//***********COLORS*****************
color bluePaint = color(0, 144, 255);
color currentColor = color(0, 144, 255);
color black = color(0);
color redPaint = color(255, 4, 4);
color greenPaint = color (92, 207, 102);
color pinkPaint = color (253, 80, 116);
color tanPaint = color (245, 170, 91);
color orgBackground = color (255, 122, 10);
boolean typeIsCan=true;
void setup() {
size (1280, 720);
background(orgBackground);
//load images
myElonStart = loadImage("elonData.png");
myMonroe = loadImage("monroeData.png");
myLennon = loadImage("lennonData.png");
myBlueCan = loadImage("blueCan.png");
myRedCan = loadImage("redCan.png");
myPinkCan = loadImage("pinkCan.png");
myGreenCan = loadImage("greenCan.png");
myTanCan = loadImage("tanCan.png");
mySave = loadImage("save.png");
myRestart = loadImage("restart.png");
myBrush1 = loadImage("brush1.png");
myBrush2 = loadImage("brush2.png");
myBrush3 = loadImage("brush3.png");
//load font
thePopArtFont = createFont("GoldenHillsDEMO.ttf", 50);
textFont(thePopArtFont);
}
void draw() {
fill(black);
text("Pop Art Paint Program", width/3, 50);
fill(bluePaint);
text("Pop Art Paint Program", width/3.01, 47);
checkRollovers();
myBorder(); //Draws blue border around window
myDrawPeople(); //puts three pictures of options to paint
myButtonLayout();
if (mousePressed)
{
noStroke();
fill(black);
if (typeIsCan)
{
if ((mouseX>10) && (mouseX<80) && (mouseY>5) && (mouseY<121))
{
fill(bluePaint);
} else {
fill(bluePaint);
ellipse(mouseX, mouseY, 20, 20);
ellipse(pmouseX, pmouseY, 20, 20);
}
if ((mouseX>10) && (mouseX<80) && (mouseY>130) && (mouseY>246))
{
fill(redPaint);
} else {
fill(redPaint);
ellipse(mouseX, mouseY, 20, 20);
ellipse(pmouseX, pmouseY, 20, 20);
}
}
}
}