Use create script dialog for script-type resources

This commit is contained in:
Chris Cranford 2025-07-01 21:17:59 -04:00
parent 235a32ad11
commit 23b6f129c7
No known key found for this signature in database
GPG key ID: 8B8088D41181D04B

View file

@ -2722,6 +2722,10 @@ void FileSystemDock::_resource_created() {
make_shader_dialog->config(fpath.path_join("new_shader"), false, false, type_name);
make_shader_dialog->popup_centered();
return;
} else if (ClassDB::is_parent_class(type_name, "Script")) {
make_script_dialog->config("Node", fpath.path_join("new_script"), false, false);
make_script_dialog->popup_centered();
return;
}
Variant c = new_resource_dialog->instantiate_selected();