feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -73,7 +73,7 @@ void ProjectExportTextureFormatError::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void ProjectExportTextureFormatError::show_for_texture_format(const String &p_friendly_name, const String &p_setting_identifier) {
|
||||
texture_format_error_label->set_text(vformat(TTR("Target platform requires '%s' texture compression. Enable 'Import %s' to fix."), p_friendly_name, p_friendly_name.replace("/", " ")));
|
||||
texture_format_error_label->set_text(vformat(TTR("Target platform requires '%s' texture compression. Enable 'Import %s' to fix."), p_friendly_name, p_friendly_name.replace_char('/', ' ')));
|
||||
setting_identifier = p_setting_identifier;
|
||||
show();
|
||||
}
|
||||
|
|
@ -576,7 +576,7 @@ void ProjectExportDialog::_enc_filters_changed(const String &p_filters) {
|
|||
}
|
||||
|
||||
void ProjectExportDialog::_open_key_help_link() {
|
||||
OS::get_singleton()->shell_open(vformat("%s/contributing/development/compiling/compiling_with_script_encryption_key.html", VERSION_DOCS_URL));
|
||||
OS::get_singleton()->shell_open(vformat("%s/contributing/development/compiling/compiling_with_script_encryption_key.html", GODOT_VERSION_DOCS_URL));
|
||||
}
|
||||
|
||||
void ProjectExportDialog::_enc_pck_changed(bool p_pressed) {
|
||||
|
|
@ -745,7 +745,14 @@ void ProjectExportDialog::_delete_preset_confirm() {
|
|||
|
||||
Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
if (p_from == presets) {
|
||||
int pos = presets->get_item_at_position(p_point, true);
|
||||
int pos = -1;
|
||||
if (p_point == Vector2(Math::INF, Math::INF)) {
|
||||
if (presets->is_anything_selected()) {
|
||||
pos = presets->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = presets->get_item_at_position(p_point, true);
|
||||
}
|
||||
|
||||
if (pos >= 0) {
|
||||
Dictionary d;
|
||||
|
|
@ -766,7 +773,7 @@ Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_
|
|||
return d;
|
||||
}
|
||||
} else if (p_from == patches) {
|
||||
TreeItem *item = patches->get_item_at_position(p_point);
|
||||
TreeItem *item = (p_point == Vector2(Math::INF, Math::INF)) ? patches->get_selected() : patches->get_item_at_position(p_point);
|
||||
|
||||
if (item) {
|
||||
int item_metadata = item->get_metadata(0);
|
||||
|
|
@ -791,7 +798,18 @@ bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant
|
|||
return false;
|
||||
}
|
||||
|
||||
if (presets->get_item_at_position(p_point, true) < 0 && !presets->is_pos_at_end_of_items(p_point)) {
|
||||
int pos = -1;
|
||||
bool end = true;
|
||||
if (p_point == Vector2(Math::INF, Math::INF)) {
|
||||
if (presets->is_anything_selected()) {
|
||||
pos = presets->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = presets->get_item_at_position(p_point, true);
|
||||
end = presets->is_pos_at_end_of_items(p_point);
|
||||
}
|
||||
|
||||
if (pos < 0 && !end) {
|
||||
return false;
|
||||
}
|
||||
} else if (p_from == patches) {
|
||||
|
|
@ -800,7 +818,7 @@ bool ProjectExportDialog::can_drop_data_fw(const Point2 &p_point, const Variant
|
|||
return false;
|
||||
}
|
||||
|
||||
TreeItem *item = patches->get_item_at_position(p_point);
|
||||
TreeItem *item = (p_point == Vector2(Math::INF, Math::INF)) ? patches->get_selected() : patches->get_item_at_position(p_point);
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -818,11 +836,22 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d
|
|||
|
||||
int to_pos = -1;
|
||||
|
||||
if (presets->get_item_at_position(p_point, true) >= 0) {
|
||||
to_pos = presets->get_item_at_position(p_point, true);
|
||||
int pos = -1;
|
||||
bool end = true;
|
||||
if (p_point == Vector2(Math::INF, Math::INF)) {
|
||||
if (presets->is_anything_selected()) {
|
||||
pos = presets->get_selected_items()[0];
|
||||
}
|
||||
} else {
|
||||
pos = presets->get_item_at_position(p_point, true);
|
||||
end = presets->is_pos_at_end_of_items(p_point);
|
||||
}
|
||||
|
||||
if (to_pos == -1 && !presets->is_pos_at_end_of_items(p_point)) {
|
||||
if (pos >= 0) {
|
||||
to_pos = pos;
|
||||
}
|
||||
|
||||
if (to_pos == -1 && !end) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -846,14 +875,20 @@ void ProjectExportDialog::drop_data_fw(const Point2 &p_point, const Variant &p_d
|
|||
Dictionary d = p_data;
|
||||
int from_pos = d["patch"];
|
||||
|
||||
TreeItem *item = patches->get_item_at_position(p_point);
|
||||
TreeItem *item = (p_point == Vector2(Math::INF, Math::INF)) ? patches->get_selected() : patches->get_item_at_position(p_point);
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
int to_pos = item->get_metadata(0);
|
||||
|
||||
if (patches->get_drop_section_at_position(p_point) > 0) {
|
||||
int pos = -1;
|
||||
if (p_point == Vector2(Math::INF, Math::INF)) {
|
||||
pos = patches->get_drop_section_at_position(patches->get_item_rect(item).position);
|
||||
} else {
|
||||
pos = patches->get_drop_section_at_position(p_point);
|
||||
}
|
||||
if (pos > 0) {
|
||||
to_pos++;
|
||||
}
|
||||
|
||||
|
|
@ -1428,11 +1463,13 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
presets->connect(SceneStringName(item_selected), callable_mp(this, &ProjectExportDialog::_edit_preset));
|
||||
duplicate_preset = memnew(Button);
|
||||
duplicate_preset->set_tooltip_text(TTR("Duplicate"));
|
||||
duplicate_preset->set_accessibility_name(TTRC("Duplicate"));
|
||||
duplicate_preset->set_flat(true);
|
||||
preset_hb->add_child(duplicate_preset);
|
||||
duplicate_preset->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_duplicate_preset));
|
||||
delete_preset = memnew(Button);
|
||||
delete_preset->set_tooltip_text(TTR("Delete"));
|
||||
delete_preset->set_accessibility_name(TTRC("Delete"));
|
||||
delete_preset->set_flat(true);
|
||||
preset_hb->add_child(delete_preset);
|
||||
delete_preset->connect(SceneStringName(pressed), callable_mp(this, &ProjectExportDialog::_delete_preset));
|
||||
|
|
@ -1501,6 +1538,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
resources_scroll_container->add_child(resources_vb);
|
||||
|
||||
export_filter = memnew(OptionButton);
|
||||
export_filter->set_accessibility_name(TTRC("Export Mode"));
|
||||
export_filter->add_item(TTR("Export all resources in the project"));
|
||||
export_filter->add_item(TTR("Export selected scenes (and dependencies)"));
|
||||
export_filter->add_item(TTR("Export selected resources (and dependencies)"));
|
||||
|
|
@ -1531,8 +1569,8 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
resources_vb->add_child(server_strip_message);
|
||||
|
||||
{
|
||||
List<StringName> resource_names;
|
||||
ClassDB::get_inheriters_from_class("Resource", &resource_names);
|
||||
LocalVector<StringName> resource_names;
|
||||
ClassDB::get_inheriters_from_class("Resource", resource_names);
|
||||
|
||||
PackedStringArray strippable;
|
||||
for (const StringName &resource_name : resource_names) {
|
||||
|
|
@ -1555,12 +1593,14 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
file_mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
|
||||
|
||||
include_filters = memnew(LineEdit);
|
||||
include_filters->set_accessibility_name(TTRC("Include Filters"));
|
||||
resources_vb->add_margin_child(
|
||||
TTR("Filters to export non-resource files/folders\n(comma-separated, e.g: *.json, *.txt, docs/*)"),
|
||||
include_filters);
|
||||
include_filters->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_filter_changed));
|
||||
|
||||
exclude_filters = memnew(LineEdit);
|
||||
exclude_filters->set_accessibility_name(TTRC("Exclude Filters"));
|
||||
resources_vb->add_margin_child(
|
||||
TTR("Filters to exclude files/folders from project\n(comma-separated, e.g: *.json, *.txt, docs/*)"),
|
||||
exclude_filters);
|
||||
|
|
@ -1635,18 +1675,21 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
sec_vb->add_child(enc_directory);
|
||||
|
||||
enc_in_filters = memnew(LineEdit);
|
||||
enc_in_filters->set_accessibility_name(TTRC("Include Filters"));
|
||||
enc_in_filters->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_enc_filters_changed));
|
||||
sec_vb->add_margin_child(
|
||||
TTR("Filters to include files/folders\n(comma-separated, e.g: *.tscn, *.tres, scenes/*)"),
|
||||
enc_in_filters);
|
||||
|
||||
enc_ex_filters = memnew(LineEdit);
|
||||
enc_ex_filters->set_accessibility_name(TTRC("Exclude Filters"));
|
||||
enc_ex_filters->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_enc_filters_changed));
|
||||
sec_vb->add_margin_child(
|
||||
TTR("Filters to exclude files/folders\n(comma-separated, e.g: *.ctex, *.import, music/*)"),
|
||||
enc_ex_filters);
|
||||
|
||||
script_key = memnew(LineEdit);
|
||||
script_key->set_accessibility_name(TTRC("Encryption Key"));
|
||||
script_key->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_script_encryption_key_changed));
|
||||
script_key_error = memnew(Label);
|
||||
script_key_error->set_text(String::utf8("• ") + TTR("Invalid Encryption Key (must be 64 hexadecimal characters long)"));
|
||||
|
|
@ -1656,6 +1699,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
sections->add_child(sec_scroll_container);
|
||||
|
||||
seed_input = memnew(LineEdit);
|
||||
seed_input->set_accessibility_name(TTRC("Encryption Seed"));
|
||||
seed_input->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_seed_input_changed));
|
||||
sec_vb->add_margin_child(TTR("Initialization vector seed"), seed_input);
|
||||
|
||||
|
|
@ -1674,6 +1718,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
script_vb->set_name(TTR("Scripts"));
|
||||
|
||||
script_mode = memnew(OptionButton);
|
||||
script_mode->set_accessibility_name(TTRC("GDScript Export Mode"));
|
||||
script_vb->add_margin_child(TTR("GDScript Export Mode:"), script_mode);
|
||||
script_mode->add_item(TTR("Text (easier debugging)"), (int)EditorExportPreset::MODE_SCRIPT_TEXT);
|
||||
script_mode->add_item(TTR("Binary tokens (faster loading)"), (int)EditorExportPreset::MODE_SCRIPT_BINARY_TOKENS);
|
||||
|
|
@ -1746,11 +1791,13 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
export_error = memnew(Label);
|
||||
main_vb->add_child(export_error);
|
||||
export_error->hide();
|
||||
export_error->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
export_error->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
|
||||
export_warning = memnew(Label);
|
||||
main_vb->add_child(export_warning);
|
||||
export_warning->hide();
|
||||
export_warning->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
export_warning->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("warning_color"), EditorStringName(Editor)));
|
||||
|
||||
export_templates_error = memnew(HBoxContainer);
|
||||
|
|
@ -1759,6 +1806,7 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
|
||||
Label *export_error2 = memnew(Label);
|
||||
export_templates_error->add_child(export_error2);
|
||||
export_error2->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_WORD_ELLIPSIS);
|
||||
export_error2->add_theme_color_override(SceneStringName(font_color), EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
export_error2->set_text(String::utf8("• ") + TTR("Export templates for this platform are missing:") + " ");
|
||||
|
||||
|
|
@ -1801,6 +1849,3 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
ProjectExportDialog::~ProjectExportDialog() {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue