ofxSimpleGuiToo - drawing image as button

Dear friends,

i was cycling through the source-code but i wasn’t sure where to embed the graphic with “loadImage”. I am also sure that somone already used images as buttons within this class, so he could give me some advice before i start struggeling.

Thank you very much

lg

Hey circassia my friend,

voila les fichiers!

you will find here the “ofxsimpleGuiWebStyleButton” class, which allows you to add an image to the function.

usage in testApp:
gui.addWebButton(“myButton”, myboolVariable, myofImage);

You have to add following statements too
ofxSimpleGuiToo.h

ofxSimpleGuiWebStyleButton &addWebButton(string name, bool &value, ofImage &texture);

ofxSimpleGuiToo.cpp

ofxSimpleGuiWebStyleButton &ofxSimpleGuiToo::addWebButton(string name, bool &value, ofImage &texture) {
if(!config) setup();
return pages[currentPage]->addWebButton(name, value, texture);
}

ofxSimpleGuiPage.h
ofxSimpleGuiWebStyleButton &addWebButton(string name, bool &value, ofImage &texture);

ofxSimpleGuiPage.cpp

ofxSimpleGuiWebStyleButton &ofxSimpleGuiToo::addWebButton(string name, bool &value, ofImage &texture) {
if(!config) setup();
return pages[currentPage]->addWebButton(name, value, texture);
}

thank you :wink:

ofxSimpleGuiWebStyleButton.rar