Draw an ofxGui widget without ofxGuiGroup or ofxPanel

Hey

I’m trying to draw ofxGui widgets like ofxButton without a “container” type objet like ofxPanel or ofxGuiGroup. Basically I’m looking for a way to place widget around an interface/window.

I saw that ofxGuiGroup or ofxPanel call draw() in their render() method but when I call draw on a widget in ofApp::draw nothing shows up.

I also tried calling generateDraw before draw like so:

class FloatingButton : public ofxButton
{
public:
    FloatingButton() : ofxButton(){}
    void forcedraw() {generateDraw();  render(); draw();}
};

Am I missing something?

you need to call setup first so it sets up the correct dimensions, events… then you should just need to call draw()

Great that works! Thanks!