Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Nested parameters with ofxGui and ofParameters

$
0
0

@edapx wrote:

Hello, I'm using ofxGui and ofParameter in order to save the seetings of the GUI in differents XML files. Everything works fine, I can save and load parameters .
the xml file look like this:

<settings>
<rule>F -> |[-F][+F]</rule>
<axiom>F</axiom>
<maxDepth>5</maxDepth>
</settings>

Now i would like is to read(not to modify, in this case) a field as a nested field, that can contains multiple items, like the field rules in this example:

<settings>
<rules>
  <rule>B -> F[-B]+B</rule>
  <rule>F -> FF</rule>
</rules>
<axiom>F</axiom>
<maxDepth>5</maxDepth>
</settings>

I first tried something obvious like ofParameter<vector<string>> rules, but ofParameter does not support vectors. Is there a workaround for this case?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles