jvcleave / ofxImGui

Use ImGui in openFrameworks
292 stars 123 forks source link

added ofParameter<ofColor> #106

Open moebiussurfing opened 3 years ago

moebiussurfing commented 3 years ago

added to addGroup too

moebiussurfing commented 3 years ago

sorry, my pr is kind of dirty because it's including some garbage.. but also added multicontext to allow multiple instances without crash on exit.… are you interested on this?

moebiussurfing commented 3 years ago

hey @prisonerjohn , here, with the main branch is not working like this: ofParameter<ofColor> myOfColor{ "myOfColor", ofColor::orange }; ofxImGui::AddParameter(this->myOfColor);

Showing All Errors Only
/openFrameworks/addons/ofxImGui/src/ImHelpers.h:164:66: No viable conversion from 'ofColor_<unsigned char>' to 'int'
moebiussurfing commented 3 years ago

also, when adding a paramGroup with some ofColor params, they are not added neither:

                ofParameterGroup g{"group"};
                g.add(myOfColor);
                g.add(myOfFLoatColor);
                ofxImGui::Settings settings;
                ofxImGui::AddGroup(g, settings);

Also, we get this warning: [warning] AddGroup: Could not create GUI element for parameter myOfColor

On my PR code I have implemented both cases: add ofParameter<ofColor> and addGroup.

This happens too with ofParameter<string> when bundled into a group. Should be nice to add strings too. (to show the text, or as input text maybe...) ofParameter<void> is neither implemented.