rezaali / ofxUI

[DEPRECATED] UI Addon for openFrameworks
http://www.syedrezaali.com/#/ofxui-project-showcase/
518 stars 202 forks source link

ofxUIButton, cannot customize colors #236

Open dimitre opened 9 years ago

dimitre commented 9 years ago

I can't customize ofxUIButton colors. Similar code works on ofxUIToggle and the rest of the widgets.

else if (tipo == "button") {
    parametrosBool[nome] = def;
    guiMap[guiName]->addButton(nome, &parametrosBool[nome], 16, 16);
    ofxUIButton *s = (ofxUIButton *) guiMap[guiName]->getWidget(nome);
    s->setColorBack(parametrosColor["back"]);
    s->setColorFill(parametrosColor["fill"]);
    s->setColorFillHighlight(parametrosColor["fillhighlight"]);
    s->setColorOutlineHighlight(parametrosColor["outlinehighlight"]);
}

Thanks!