hi there.
1) the variables that would tell you the states you are looking for are not visible, they are protected inside controlP5, i will make them public for future releases. meanwhile this example might help? whenever you move the slider, function mySlider will be called and tells you when the slider has been pressed or changed.
Code:
import controlP5.*;
ControlP5 controlP5;
Slider s;
void setup() {
size(400,400);
controlP5 = new ControlP5(this);
s = controlP5.addSlider("mySlider",100,167,128,100,160,10,100);
s.setColorBackground(color(255,0,0));
}
void draw() {
background(0);
}
public void mySlider(float theValue) {
// when a slider is pressed, it will execute an
// event and notify its listeners, in this case function
// mySlider - mySlider isa function with the same
// name as the slider itself.
println("slider mySlider has fired an event. value is : "+theValue);
}
2)
see above example.
Code:
s.setColorBackground(color(255,0,0));
best,
andreas