Last active
January 28, 2020 19:30
-
-
Save moebiussurfing/d70020ba4929c11072258cf7b5c3600b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
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