Ejemplo n.º 1
0
void Vision::setupGui(xmlgui::SimpleGui &gui) {
    gui.addToggle("draw tracker", drawTracker);
    gui.addToggle("flip horizontal", flipHorizontal);
    gui.addColorPicker("tracking colour", pickedColour);
    gui.addToggle("pick colour", pickColour);
    gui.addSlider("tracking threshold", threshold, 0,255);
}
Ejemplo n.º 2
0
void testApp::doGui(AudioEffect *e) {
	gui.clear();
	Parameters params;
	e->initParameters(params);
	for(int i = 0; i < params.params.size(); i++) {
		Parameter *p = params.params[i];
		if(p->type=="slider") {
			SliderParameter *s = (SliderParameter*)p;
			gui.addSlider(s->name, *s->value, s->min, s->max);
		} else if(p->type=="intslider") {
			IntSliderParameter *s = (IntSliderParameter*)p;
			gui.addSlider(s->name, *s->value, s->min, s->max);
		} else if(p->type=="meter") {
			MeterParameter *s = (MeterParameter*)p;
			gui.addMeter(s->name, *s->value);
			
		} else if(p->type=="toggle") {
			ToggleParameter *t = (ToggleParameter*)p;
			gui.addToggle(t->name, *t->value);
		} else if(p->type=="switch") {
			SwitchParameter *s = (SwitchParameter*)p;
			gui.addSegmented(s->name, *s->value, s->options);
		}
	}
}