diff options
author | Ray Koopa <raykoopa@users.noreply.github.com> | 2017-03-02 22:43:56 +0100 |
---|---|---|
committer | Ray Koopa <raykoopa@users.noreply.github.com> | 2017-03-03 18:45:53 +0100 |
commit | 7623fd10bf10086f0b2b90bc6ceaa7e32279e645 (patch) | |
tree | 04c17c3b996e8b5f8a564aaa0a9eb5129a3aad84 /tools/editor/project_export.cpp | |
parent | 74eace2b14b337e23d0dc552f3bc3e60f1710f65 (diff) |
Make Editor, Export and Project settings dialogs resizable and store their bounds
Diffstat (limited to 'tools/editor/project_export.cpp')
-rw-r--r-- | tools/editor/project_export.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index f6593a4895..fc6d8793d8 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -46,10 +46,14 @@ void ProjectExportDialog::_notification(int p_what) { - if (p_what==NOTIFICATION_READY) { - delete_preset->set_icon(get_icon("Del","EditorIcons")); - connect("confirmed",this,"_export_pck_zip"); - + switch (p_what) { + case NOTIFICATION_READY: { + delete_preset->set_icon(get_icon("Del","EditorIcons")); + connect("confirmed",this,"_export_pck_zip"); + } break; + case NOTIFICATION_POPUP_HIDE: { + EditorSettings::get_singleton()->set("interface/dialogs/export_bounds", get_rect()); + } break; } } @@ -66,7 +70,13 @@ void ProjectExportDialog::popup_export() { } _update_presets(); - popup_centered_ratio(); + + // Restore valid window bounds or pop up at default size. + if (EditorSettings::get_singleton()->has("interface/dialogs/export_bounds")) { + popup(EditorSettings::get_singleton()->get("interface/dialogs/export_bounds")); + } else { + popup_centered_ratio(); + } } void ProjectExportDialog::_add_preset(int p_platform) { @@ -664,6 +674,9 @@ void ProjectExportDialog::_bind_methods() { } ProjectExportDialog::ProjectExportDialog() { + set_title(TTR("Export")); + set_resizable(true); + HBoxContainer *hbox = memnew( HBoxContainer ); add_child(hbox); |