I always write it like this:
void mousePressed () {
if (mouseX>x1 &&
mouseX<x2 &&
mouseY>y1 &&
mouseY<y2 ) {
counter++;
}
println(counter);
}
I always write it like this:
void mousePressed () {
if (mouseX>x1 &&
mouseX<x2 &&
mouseY>y1 &&
mouseY<y2 ) {
counter++;
}
println(counter);
}