controlP5 ControlGroup ... How to Add a ColorPicker to a Control Group.
in
Contributed Library Questions
•
2 years ago
I need a color picker attached to a controlgroup that has a bang toggle in it to control what colors are changed by the colorpicker ... i need to be able to hide and show the control group with bang and colorpicker. Everything works as intended in the code below, but when I include line 15 in my code to, I get a compile error, The method setGroup(ControllerGroup) in the type ControllerGroup is not applicable for the arguments (int).
- controlP5 = new ControlP5(this);
- controlP5.addSlider("Speed",1,20,3,width-176,height-15,100,10);
- ControlGroup l = controlP5.addGroup("Settings",0,10);
- l.setBackgroundColor(color(102, 102, 255,200));
- l.setBackgroundHeight(200);
- l.setMoveable(true);
- l.setWidth(600);
- l.close();
- controlP5.addToggle("scrolling",true,10,20,10,10).setGroup(l);
- controlP5.addToggle("DeskBack",true,10,44,10,10).setGroup(l);
- controlP5.addToggle("TitleBack",true,10,68,10,10).setGroup(l);
- controlP5.addSlider("BackAlpha",1,255,130,40,44,100,10).setGroup(l);
- controlP5.addSlider("TitleBack",1,255,130,40,68,100,10).setGroup(l);
- cp = controlP5.addColorPicker("picker",10,106,255,20);
- cp.setGroup(1);
1