Skip to content

how can I use the ofParameter helper class from ofxImGui?  #2

@moebiussurfing

Description

@moebiussurfing

hey @eduardfrigola ,
I tried to include the helpers from ofxImGui to allow add parameters easy...

I added this files:
Helpers.h, Helpers.cpp, (maybe this one could help too: `imconfig.h)

But I am stuck when tried to tweak this method of Helpers.cpp:

//--------------------------------------------------------------
const char * ofxImGui::GetUniqueName(const std::string& candidate)
{
	std::string result = candidate;
	while (std::find(windowOpen.usedNames.top().begin(), windowOpen.usedNames.top().end(), result) != windowOpen.usedNames.top().end())
	{
		result += " ";
	}
	windowOpen.usedNames.top().push_back(result);
	return windowOpen.usedNames.top().back().c_str();
}

It's crashing when adding an ofParameter because it seems related to other classes from ofxImGui and how it handles the window/context...

I have only added #include "Helpers.h" to my project but maybe I must instantiate the class?

Any tip around this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions