Toggle lake = controlP5.addToggle("Lake",false,40,40,100,10);
lake.setWindow(controlWindow);
}
void draw(){
if (mousePressed){
if(lake==true) {
noStroke();
ellipse(230,430,100,200);
fill(255,255,0);
}
}
}
I had hoped that the true/false part of the Toggle-function would be what I'm searching for, but if I set boolean lake = true, I can't hide the ellipse. And if I set it to false it doesn't even show.
What am I missing? Should I look at (controlEvent)?