class Slider{ String name; boolean hover; boolean selected; int x = 0; int y = 0; int w = 0; int h = 0; Slider(String name, int x, int y){ this.name = name; textFont(menufont); this.x = x; this.y = y; this.w = int(5+textWidth(name)+5); this.h = 100; } void update(){ strokeCap(PROJECT); strokeWeight(3); stroke(190); line(x, y, x, y+h); strokeWeight(1); stroke(255); line(x, y, x, y+h); noStroke(); fill(150); rect(x-2, y+40, 5, 5); } void mouseMoved() { if(mouseX > x && mouseX < x+w && mouseY > y && mouseY < y+h){ hover = true; } else { hover = false; } } }