summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-03 00:35:08 +0200
committerGitHub <noreply@github.com>2018-10-03 00:35:08 +0200
commitd675d04f0935ce6dea17fc9cfb5a5fa751c61fba (patch)
tree5abebc1f7b81143f891733f5cb88e8e10ad2288e
parentf511fa35e52a6727f26d7727b51418dc39c2cbf0 (diff)
parent9f76b6a5a517506005b492e98e784e09ad649e3e (diff)
Merge pull request #22645 from merumelu/plugin-ready-path
PluginConfigDialog: pass subfolder name instead of plugin name on creation
-rw-r--r--editor/plugin_config_dialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 93bed035a5..a334f79f5a 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -76,7 +76,10 @@ void PluginConfigDialog::_on_confirmed() {
"extends EditorPlugin\n"
"\n"
"func _enter_tree():\n"
- "\tpass");
+ "\tpass\n"
+ "\n"
+ "func _exit_tree():\n"
+ "\tpass\n");
String script_path = path.plus_file(script_edit->get_text());
gdscript->set_path(script_path);
ResourceSaver::save(script_path, gdscript);
@@ -84,7 +87,7 @@ void PluginConfigDialog::_on_confirmed() {
}
//TODO: other languages
- emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? name_edit->get_text() : "");
+ emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? subfolder_edit->get_text() : "");
} else {
EditorNode::get_singleton()->get_project_settings()->update_plugins();
}