diff options
-rw-r--r-- | doc/classes/AudioEffectRecord.xml | 1 | ||||
-rw-r--r-- | editor/editor_export.cpp | 19 | ||||
-rw-r--r-- | editor/editor_export.h | 2 | ||||
-rw-r--r-- | editor/project_export.cpp | 1 | ||||
-rw-r--r-- | editor/property_editor.cpp | 29 | ||||
-rw-r--r-- | editor/property_editor.h | 2 | ||||
-rw-r--r-- | modules/regex/SCsub | 2 |
7 files changed, 50 insertions, 6 deletions
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 4dac81322f..a217342d98 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -4,6 +4,7 @@ Audio effect used for recording sound from a microphone. </brief_description> <description> + Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link> diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 716ead9afc..25594bf7c8 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -90,6 +90,19 @@ Ref<EditorExportPlatform> EditorExportPreset::get_platform() const { return platform; } +void EditorExportPreset::update_files_to_export() { + Vector<String> to_remove; + for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { + if (!FileAccess::exists(E->get())) { + to_remove.push_back(E->get()); + } + } + for (int i = 0; i < to_remove.size(); ++i) { + selected_files.erase(to_remove[i]); + } + EditorExport::singleton->save_presets(); +} + Vector<String> EditorExportPreset::get_files_to_export() const { Vector<String> files; for (Set<String>::Element *E = selected_files.front(); E; E = E->next()) { @@ -1298,7 +1311,11 @@ void EditorExport::load_config() { Vector<String> files = config->get_value(section, "export_files"); for (int i = 0; i < files.size(); i++) { - preset->add_export_file(files[i]); + if (!FileAccess::exists(files[i])) { + preset->remove_export_file(files[i]); + } else { + preset->add_export_file(files[i]); + } } } diff --git a/editor/editor_export.h b/editor/editor_export.h index 4978b39248..8ad8326f10 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -94,6 +94,8 @@ public: bool has(const StringName &p_property) const { return values.has(p_property); } + void update_files_to_export(); + Vector<String> get_files_to_export() const; void add_export_file(const String &p_path); diff --git a/editor/project_export.cpp b/editor/project_export.cpp index e5372a5d47..c53a59604a 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -163,6 +163,7 @@ void ProjectExportDialog::_update_presets() { if (preset->is_runnable()) { name += " (" + TTR("Runnable") + ")"; } + preset->update_files_to_export(); presets->add_item(name, preset->get_platform()->get_logo()); } diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c6efcc944b..49b9ca167b 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -326,6 +326,9 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: menu->set_size(Size2(1, 1) * EDSCALE); for (int i = 0; i < MAX_VALUE_EDITORS; i++) { + if (i < MAX_VALUE_EDITORS / 4) { + value_hboxes[i]->hide(); + } value_editor[i]->hide(); value_label[i]->hide(); if (i < 4) { @@ -1701,6 +1704,14 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int set_size(Size2(cell_margin + p_label_w + (cell_width + cell_margin + p_label_w) * p_columns, cell_margin + (cell_height + cell_margin) * rows) * EDSCALE); for (int i = 0; i < MAX_VALUE_EDITORS; i++) { + if (i < MAX_VALUE_EDITORS / 4) { + if (i <= p_amount / 4) { + value_hboxes[i]->show(); + } else { + value_hboxes[i]->hide(); + } + } + int c = i % p_columns; int r = i / p_columns; @@ -1729,13 +1740,23 @@ CustomPropertyEditor::CustomPropertyEditor() { read_only = false; updating = false; + value_vbox = memnew(VBoxContainer); + add_child(value_vbox); + for (int i = 0; i < MAX_VALUE_EDITORS; i++) { - value_editor[i] = memnew(LineEdit); - add_child(value_editor[i]); + if (i < MAX_VALUE_EDITORS / 4) { + value_hboxes[i] = memnew(HBoxContainer); + value_vbox->add_child(value_hboxes[i]); + value_hboxes[i]->hide(); + } + int hbox_idx = i / 4; value_label[i] = memnew(Label); - add_child(value_label[i]); - value_editor[i]->hide(); + value_hboxes[hbox_idx]->add_child(value_label[i]); value_label[i]->hide(); + value_editor[i] = memnew(LineEdit); + value_hboxes[hbox_idx]->add_child(value_editor[i]); + value_editor[i]->set_h_size_flags(Control::SIZE_EXPAND_FILL); + value_editor[i]->hide(); value_editor[i]->connect("text_entered", callable_mp(this, &CustomPropertyEditor::_modified)); value_editor[i]->connect("focus_entered", callable_mp(this, &CustomPropertyEditor::_focus_enter)); value_editor[i]->connect("focus_exited", callable_mp(this, &CustomPropertyEditor::_focus_exit)); diff --git a/editor/property_editor.h b/editor/property_editor.h index 5b7db3b83f..75c6fd372b 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -100,6 +100,8 @@ class CustomPropertyEditor : public PopupPanel { List<String> field_names; int hint; String hint_text; + HBoxContainer *value_hboxes[MAX_VALUE_EDITORS / 4]; + VBoxContainer *value_vbox; LineEdit *value_editor[MAX_VALUE_EDITORS]; int focused_value_editor; Label *value_label[MAX_VALUE_EDITORS]; diff --git a/modules/regex/SCsub b/modules/regex/SCsub index 753650adcb..2afacc1d9c 100644 --- a/modules/regex/SCsub +++ b/modules/regex/SCsub @@ -7,7 +7,7 @@ env_regex = env_modules.Clone() if env["builtin_pcre2"]: thirdparty_dir = "#thirdparty/pcre2/src/" - thirdparty_flags = ["PCRE2_STATIC", "HAVE_CONFIG_H"] + thirdparty_flags = ["PCRE2_STATIC", "HAVE_CONFIG_H", "SUPPORT_UNICODE"] if env["builtin_pcre2_with_jit"]: thirdparty_flags.append("SUPPORT_JIT") |