crownengine / crown

The flexible game engine.

Home Page:https://www.crownengine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tools: restore window state

dbartolini opened this issue · comments

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

Level Editor's main window creation:

if (this.active_window == null) {

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.

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.