mirror of https://github.com/godotengine/godot
Fix enabling of created plugin
This commit is contained in:
parent
4c10d31bc4
commit
c26b451afe
|
|
@ -112,7 +112,7 @@ void PluginConfigDialog::_on_confirmed() {
|
||||||
}
|
}
|
||||||
#endif
|
#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 {
|
} else {
|
||||||
EditorNode::get_singleton()->get_project_settings()->update_plugins();
|
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());
|
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) {
|
void PluginConfigDialog::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_VISIBILITY_CHANGED: {
|
case NOTIFICATION_VISIBILITY_CHANGED: {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ class PluginConfigDialog : public ConfirmationDialog {
|
||||||
void _on_cancelled();
|
void _on_cancelled();
|
||||||
void _on_required_text_changed(const String &p_text);
|
void _on_required_text_changed(const String &p_text);
|
||||||
|
|
||||||
|
static String _to_absolute_plugin_path(const String &p_plugin_name);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void _notification(int p_what);
|
virtual void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue