Import zip via drag and drop in project manager.
Dropping a single ZIP file in the project manager will now prompt the import dialog.
This commit is contained in:
parent
3115ac4b60
commit
3629617d36
|
@ -2326,6 +2326,11 @@ void ProjectManager::_install_project(const String &p_zip_path, const String &p_
|
|||
}
|
||||
|
||||
void ProjectManager::_files_dropped(PoolStringArray p_files, int p_screen) {
|
||||
if (p_files.size() == 1 && p_files[0].ends_with(".zip")) {
|
||||
const String file = p_files[0].get_file();
|
||||
_install_project(p_files[0], file.substr(0, file.length() - 4).capitalize());
|
||||
return;
|
||||
}
|
||||
Set<String> folders_set;
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||
for (int i = 0; i < p_files.size(); i++) {
|
||||
|
|
Loading…
Reference in New Issue