summaryrefslogtreecommitdiff
path: root/editor/project_export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r--editor/project_export.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index bdbb79df6d..9f87fc82b5 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -81,7 +81,14 @@ void ProjectExportDialog::popup_export() {
if (EditorSettings::get_singleton()->has_setting("interface/dialogs/export_bounds")) {
popup(EditorSettings::get_singleton()->get("interface/dialogs/export_bounds"));
} else {
- popup_centered_ratio();
+
+ Size2 popup_size = Size2(900, 700) * editor_get_scale();
+ Size2 window_size = get_viewport_rect().size;
+
+ popup_size.x = MIN(window_size.x * 0.8, popup_size.x);
+ popup_size.y = MIN(window_size.y * 0.8, popup_size.y);
+
+ popup_centered(popup_size);
}
}
@@ -207,9 +214,9 @@ void ProjectExportDialog::_edit_preset(int p_index) {
TreeItem *patch_add = patches->create_item(patch_root);
patch_add->set_metadata(0, patchlist.size());
if (patchlist.size() == 0)
- patch_add->set_text(0, "Add initial export..");
+ patch_add->set_text(0, "Add initial export...");
else
- patch_add->set_text(0, "Add previous patches..");
+ patch_add->set_text(0, "Add previous patches...");
patch_add->add_button(0, get_icon("folder", "FileDialog"), 1);
@@ -703,9 +710,9 @@ void ProjectExportDialog::_export_pck_zip_selected(const String &p_path) {
ERR_FAIL_COND(platform.is_null());
if (p_path.ends_with(".zip")) {
- platform->save_zip(current, p_path);
+ platform->export_zip(current, export_pck_zip_debug->is_pressed(), p_path);
} else if (p_path.ends_with(".pck")) {
- platform->save_pack(current, p_path);
+ platform->export_pack(current, export_pck_zip_debug->is_pressed(), p_path);
}
}
@@ -803,7 +810,7 @@ ProjectExportDialog::ProjectExportDialog() {
preset_vb->add_child(preset_hb);
add_preset = memnew(MenuButton);
- add_preset->set_text(TTR("Add.."));
+ add_preset->set_text(TTR("Add..."));
add_preset->get_popup()->connect("index_pressed", this, "_add_preset");
preset_hb->add_child(add_preset);
MarginContainer *mc = memnew(MarginContainer);
@@ -981,6 +988,11 @@ ProjectExportDialog::ProjectExportDialog() {
export_debug->set_pressed(true);
export_project->get_vbox()->add_child(export_debug);
+ export_pck_zip_debug = memnew(CheckButton);
+ export_pck_zip_debug->set_text(TTR("Export With Debug"));
+ export_pck_zip_debug->set_pressed(true);
+ export_pck_zip->get_vbox()->add_child(export_pck_zip_debug);
+
set_hide_on_ok(false);
editor_icons = "EditorIcons";