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

What's todays (10-2017) common way to have a config.xml/.json to position several elements on cavas?

$
0
0

@hansipete wrote:

Hello there,

I'm quite new to openFrameworks and having some troubles to find a good way to store "settings" in an accessable file outside of my openFrameworks .cpp files.

There are so many options offered but non of those I could get working for my case. I would like to have an file like this

<videos>
        <video x="0" y="0" file="1.mov"/>
        <video x="200" y="0" file="2.mov"/>
        <video x="400" y="100" file="3.mov"/>
</videos>

JSON would be also fine:

videos: [
   {x: 0, y: 100, file: "1.mov"},
   {x: 400, y: 100, file: "2.mov"},
   {x: 800, y: 100, file: "3.mov"}
]

I tried the ofxXMLsettings, plain ofXML, ofxJSONsettings (and some more I can't remember). Some of those didn't had the functionality to loop over an "array" of videos. Some other should have it, but did not work for me.

In general it's a bit confusing to me, what's TODAYS best way to do it. As i understood for example the ofxXMLsettings is outdated and somehow replaced by "native" ofXML functionality.

Can anyone give me a kickstart?

Thanks alot in advance,
Hans

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles