Closed GoogleCodeExporter closed 9 years ago
ok, reproduced and fixed with next release (0.7.3)
Original comment by andreas....@lasalle.edu.sg
on 15 May 2012 at 11:41
Original comment by soj...@gmail.com
on 15 May 2012 at 12:15
Original comment by soj...@gmail.com
on 18 May 2012 at 5:07
Andreas, thanks for fixing this. I tested the new release 0.7.3. and saw that
it worked. However in my app it didn't work. I tracked down the problem. If you
call setSize() BEFORE setRange() the value is still capped to 100. If you call
setSize() AFTER setRange all is well. See the example code below. Of course
re-ordering the calls is no problem, so I have adapted this in my app. However
I thought I should let you know, because there is still some involuntary
capping going on somewhere. :D
--[ EXAMPLE SKETCH BEGIN]---
import controlP5.*;
ControlP5 cp5;
int sliderValueOne = 211;
int sliderValueTwo = 222;
void setup() {
size(300, 150);
cp5 = new ControlP5(this);
cp5.addSlider("sliderValueOne").setSize(75, 9).setPosition(75, 50).setRange(0, 255);
cp5.addSlider("sliderValueTwo").setPosition(75, 90).setRange(0, 255).setSize(75, 9);
noStroke();
}
void draw() {
background(sliderValueOne);
fill(sliderValueTwo);
rect(25, 25, width-50, height-50);
}
--[ EXAMPLE SKETCH END]---
Original comment by amnonp5@gmail.com
on 22 May 2012 at 11:06
Original issue reported on code.google.com by
amnonp5@gmail.com
on 5 May 2012 at 5:07