Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: restore window state #152

Open
dbartolini opened this issue May 10, 2023 · 2 comments
Open

tools: restore window state #152

dbartolini opened this issue May 10, 2023 · 2 comments

Comments

@dbartolini
Copy link
Collaborator

https://developer.gnome.org/documentation/tutorials/save-state.html

Level Editor's main window creation:

if (this.active_window == null) {

@dbartolini dbartolini changed the title tools: save/restore window state May 21, 2023
@SeanKuehl
Copy link
Contributor

Hey, been working on the code and have a question. Restore the window state to the size it was when it was left/focused away from? If so, when should the state be saved since the level editor window doesn't seem to be the one with the on_focus_out function? I'll commit my latest code to the pull request if needed for reference.

@dbartolini
Copy link
Collaborator Author

This is for saving/restoring window state across sessions, so you load the SJSON in LevelEditor.startup() and save in LevelEditor.shutdown(). It should be similar if not equal to _settings's management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment