summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorShatur95 <genaloner@gmail.com>2021-03-04 20:22:47 +0200
committerShatur95 <genaloner@gmail.com>2021-03-06 15:33:52 +0200
commitc26b451afea8757a065c1423454cc6e66d1e262a (patch)
tree70e77212e47fde9907c1d39a0d176cad0e8f5f7b /editor
parent4c10d31bc42f0d01d1b6a8042413a8886d19f987 (diff)
Fix enabling of created plugin
Diffstat (limited to 'editor')
-rw-r--r--editor/plugin_config_dialog.cpp6
-rw-r--r--editor/plugin_config_dialog.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 19c9662162..2a0e7d0732 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -112,7 +112,7 @@ void PluginConfigDialog::_on_confirmed() {
}
#endif
- emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? subfolder_edit->get_text() : "");
+ emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? _to_absolute_plugin_path(subfolder_edit->get_text()) : "");
} else {
EditorNode::get_singleton()->get_project_settings()->update_plugins();
}
@@ -129,6 +129,10 @@ void PluginConfigDialog::_on_required_text_changed(const String &) {
get_ok_button()->set_disabled(script_edit->get_text().get_basename().is_empty() || script_edit->get_text().get_extension() != ext || name_edit->get_text().is_empty());
}
+String PluginConfigDialog::_to_absolute_plugin_path(const String &p_plugin_name) {
+ return "res://addons/" + p_plugin_name + "/plugin.cfg";
+}
+
void PluginConfigDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/plugin_config_dialog.h b/editor/plugin_config_dialog.h
index 50ca417d81..f49f14c881 100644
--- a/editor/plugin_config_dialog.h
+++ b/editor/plugin_config_dialog.h
@@ -56,6 +56,8 @@ class PluginConfigDialog : public ConfirmationDialog {
void _on_cancelled();
void _on_required_text_changed(const String &p_text);
+ static String _to_absolute_plugin_path(const String &p_plugin_name);
+
protected:
virtual void _notification(int p_what);
static void _bind_methods();