Skip to content

Instantly share code, notes, and snippets.

@moebiussurfing
Last active January 28, 2020 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moebiussurfing/d70020ba4929c11072258cf7b5c3600b to your computer and use it in GitHub Desktop.
Save moebiussurfing/d70020ba4929c11072258cf7b5c3600b to your computer and use it in GitHub Desktop.
//--------------------------------------------------------------
void ofxFontAnimator::saveWindow()
{
//save window settings
ofWindowSettings AppWindow;
AppWindow.setPosition(glm::vec2(ofGetWindowPositionX(), ofGetWindowPositionY()));
AppWindow.setSize(ofGetWindowSize().x, ofGetWindowSize().y);
AppWindow.windowMode = ofGetCurrentWindow()->getWindowMode();
ofJson j;
to_json(j, AppWindow);
ofSavePrettyJson("AppWindow.json", j);
}
//--------------------------------------------------------------
void ofxFontAnimator::loadWindow()
{
//load window settings
ofJson j = ofLoadJson("AppWindow.json");
ofx::Serializer::ApplyWindowSettings(j);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment