summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp9
-rw-r--r--editor/editor_export.h4
-rw-r--r--editor/project_settings_editor.cpp14
-rw-r--r--editor/project_settings_editor.h4
4 files changed, 28 insertions, 3 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 951bec2c83..16e69734d3 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -512,10 +512,18 @@ void EditorExportPlugin::add_ios_framework(const String &p_path) {
ios_frameworks.push_back(p_path);
}
+void EditorExportPlugin::add_ios_embedded_framework(const String &p_path) {
+ ios_embedded_frameworks.push_back(p_path);
+}
+
Vector<String> EditorExportPlugin::get_ios_frameworks() const {
return ios_frameworks;
}
+Vector<String> EditorExportPlugin::get_ios_embedded_frameworks() const {
+ return ios_embedded_frameworks;
+}
+
void EditorExportPlugin::add_ios_plist_content(const String &p_plist_content) {
ios_plist_content += p_plist_content + "\n";
}
@@ -592,6 +600,7 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
ClassDB::bind_method(D_METHOD("add_ios_framework", "path"), &EditorExportPlugin::add_ios_framework);
+ ClassDB::bind_method(D_METHOD("add_ios_embedded_framework", "path"), &EditorExportPlugin::add_ios_embedded_framework);
ClassDB::bind_method(D_METHOD("add_ios_plist_content", "plist_content"), &EditorExportPlugin::add_ios_plist_content);
ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
diff --git a/editor/editor_export.h b/editor/editor_export.h
index e31b53ad67..bb701b94ec 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -290,6 +290,7 @@ class EditorExportPlugin : public Reference {
bool skipped;
Vector<String> ios_frameworks;
+ Vector<String> ios_embedded_frameworks;
Vector<String> ios_project_static_libs;
String ios_plist_content;
String ios_linker_flags;
@@ -304,6 +305,7 @@ class EditorExportPlugin : public Reference {
_FORCE_INLINE_ void _export_end() {
ios_frameworks.clear();
+ ios_embedded_frameworks.clear();
ios_bundle_files.clear();
ios_plist_content = "";
ios_linker_flags = "";
@@ -322,6 +324,7 @@ protected:
void add_shared_object(const String &p_path, const Vector<String> &tags);
void add_ios_framework(const String &p_path);
+ void add_ios_embedded_framework(const String &p_path);
void add_ios_project_static_lib(const String &p_path);
void add_ios_plist_content(const String &p_plist_content);
void add_ios_linker_flags(const String &p_flags);
@@ -337,6 +340,7 @@ protected:
public:
Vector<String> get_ios_frameworks() const;
+ Vector<String> get_ios_embedded_frameworks() const;
Vector<String> get_ios_project_static_libs() const;
String get_ios_plist_content() const;
String get_ios_linker_flags() const;
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 89feb436d8..82ac225ddb 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -113,11 +113,17 @@ void ProjectSettingsEditor::_add_setting() {
inspector->set_current_section(setting.get_slice("/", 1));
}
-void ProjectSettingsEditor::_delete_setting() {
+void ProjectSettingsEditor::_delete_setting(bool p_confirmed) {
String setting = _get_setting_name();
Variant value = ps->get(setting);
int order = ps->get_order(setting);
+ if (!p_confirmed) {
+ del_confirmation->set_text(vformat(TTR("Are you sure you want to delete '%s'?"), setting));
+ del_confirmation->popup_centered();
+ return;
+ }
+
undo_redo->create_action(TTR("Delete Item"));
undo_redo->add_do_method(ps, "clear", setting);
@@ -394,7 +400,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
del_button = memnew(Button);
del_button->set_flat(true);
- del_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_delete_setting));
+ del_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_delete_setting), varray(false));
hbc->add_child(del_button);
error_label = memnew(Label);
@@ -466,6 +472,10 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
timer->set_one_shot(true);
add_child(timer);
+ del_confirmation = memnew(ConfirmationDialog);
+ del_confirmation->connect("confirmed", callable_mp(this, &ProjectSettingsEditor::_delete_setting), varray(true));
+ add_child(del_confirmation);
+
get_ok()->set_text(TTR("Close"));
set_hide_on_ok(true);
}
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 0d7e19b242..4ecd28e514 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -77,6 +77,8 @@ class ProjectSettingsEditor : public AcceptDialog {
OptionButton *feature_override;
Label *error_label;
+ ConfirmationDialog *del_confirmation;
+
Label *restart_label;
TextureRect *restart_icon;
PanelContainer *restart_container;
@@ -94,7 +96,7 @@ class ProjectSettingsEditor : public AcceptDialog {
void _setting_edited(const String &p_name);
void _setting_selected(const String &p_path);
void _add_setting();
- void _delete_setting();
+ void _delete_setting(bool p_confirmed);
void _editor_restart_request();
void _editor_restart();