Browse Source

Add defaultSurfaces.xml to avoid saved surface.xml conflicts when pulling new versions later

master
Krisjanis Rijnieks 11 years ago
parent
commit
1afc57eb7b
  1. 1
      example/bin/.gitignore
  2. 0
      example/bin/data/defaultSurfaces.xml
  3. 9
      example/src/ofApp.cpp

1
example/bin/.gitignore

@ -1,3 +1,4 @@
*.app
data/*.jpg
data/settings.xml
data/surfaces.xml

0
example/bin/data/surfaces.xml → example/bin/data/defaultSurfaces.xml

9
example/src/ofApp.cpp

@ -14,7 +14,14 @@ void ofApp::setup()
surfaceManager.getSurface(1)->setVertex(2, ofVec2f(300, 400));
*/
surfaceManager.loadXmlSettings("surfaces.xml");
// check if the surfaces.xml file is there
// if not - load defaultSurfaces.xml
if ( ofFile::doesFileExist("surfaces.xml") ) {
surfaceManager.loadXmlSettings("surfaces.xml");
} else {
surfaceManager.loadXmlSettings("defaultSurfaces.xml");
}
gui.setSurfaceManager( &surfaceManager );
}

Loading…
Cancel
Save