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.cpp34
1 files changed, 28 insertions, 6 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index d15a37a19c..9f87fc82b5 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -56,6 +56,12 @@ void ProjectExportDialog::_notification(int p_what) {
case NOTIFICATION_POPUP_HIDE: {
EditorSettings::get_singleton()->set("interface/dialogs/export_bounds", get_rect());
} break;
+ case NOTIFICATION_THEME_CHANGED: {
+ delete_preset->set_icon(get_icon("Remove", "EditorIcons"));
+ Control *panel = custom_feature_display->get_parent_control();
+ if (panel)
+ panel->add_style_override("panel", get_stylebox("bg", "Tree"));
+ } break;
}
}
@@ -75,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);
}
}
@@ -201,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);
@@ -697,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);
}
}
@@ -797,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);
@@ -975,11 +988,20 @@ 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";
default_filename = EditorSettings::get_singleton()->get_project_metadata("export_options", "default_filename", String());
+
+ if (default_filename == "") {
+ default_filename = ProjectSettings::get_singleton()->get("application/config/name");
+ }
}
ProjectExportDialog::~ProjectExportDialog() {