You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ((mouseX > 120) && (mouseX < 370) && (mouseY > 120) && (mouseY < 370))// I could have used just this and function also ; by adding the mousepressed as an && another condition.
rectcolourchangemousepress2();
}
void rectcolourchangemousepress2(){
if (mousePressed == true)
fill(random(256), random(256), random(256));
rect(120, 120, 250, 250);
}
// OMG THIS IDEA WORKED !!!!!!!!!!!! I thought about it when I was asleep, I was literally coding in my head when I was asleep, like trying different options, and then I got the idea to do what I did with the ballbouncewithmousepart, you know create two different funcitons and an if loop for running that function inside draw(){}? !!!!!!!!!!!!!