public class SpringSlider extends Slider{ SpringSlider(PApplet parent, Box b){ super(parent, b); minVal = 0; maxVal = 1.5; pos = 0.08; } void draw(){ super.draw(); textAlign(LEFT); textFont(meta12); fill(0.4); text("Spring strength", round(b.left + textAscent()*.5), round(yPos - textDescent()*2)); if(b.containsMouse() || grabbed){ textAlign(CENTER); text(getPosition(), xPos, yPos+6+textAscent()); } } }