class Button{ boolean active = true; String name; int x1,y1,x2,y2; Button(String name, int x1, int y1, int x2, int y2){ this.name = name; this.x1 = x1; this.x2 = x2; this.y1 = y1; this.y2 = y2; } void draw(){ noStroke(); if(active) { fill(0,0); } else { fill(0,100); } rect(x1,y1,x2-x1,y2-y1); } void activate(){ active = true; } }