mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-14 02:54:16 -04:00
[GUI] Improve file and folder loading (drag&drop)
- Added support for drag&drop of multiple folders - Open/Export dialog can now also use a path taken from drag&drop items
This commit is contained in:
@ -143,14 +143,8 @@ namespace AssetStudioGUI
|
||||
{
|
||||
ResetForm();
|
||||
assetsManager.SpecifyUnityVersion = specifyUnityVersion.Text;
|
||||
if (paths.Length == 1 && Directory.Exists(paths[0]))
|
||||
{
|
||||
await Task.Run(() => assetsManager.LoadFolder(paths[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
await Task.Run(() => assetsManager.LoadFiles(paths));
|
||||
}
|
||||
await Task.Run(() => assetsManager.LoadFilesAndFolders(out openDirectoryBackup, paths));
|
||||
saveDirectoryBackup = openDirectoryBackup;
|
||||
BuildAssetStructures();
|
||||
}
|
||||
}
|
||||
@ -161,9 +155,8 @@ namespace AssetStudioGUI
|
||||
if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
ResetForm();
|
||||
openDirectoryBackup = Path.GetDirectoryName(openFileDialog1.FileNames[0]);
|
||||
assetsManager.SpecifyUnityVersion = specifyUnityVersion.Text;
|
||||
await Task.Run(() => assetsManager.LoadFiles(openFileDialog1.FileNames));
|
||||
await Task.Run(() => assetsManager.LoadFilesAndFolders(out openDirectoryBackup, openFileDialog1.FileNames));
|
||||
BuildAssetStructures();
|
||||
}
|
||||
}
|
||||
@ -175,9 +168,8 @@ namespace AssetStudioGUI
|
||||
if (openFolderDialog.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
ResetForm();
|
||||
openDirectoryBackup = openFolderDialog.Folder;
|
||||
assetsManager.SpecifyUnityVersion = specifyUnityVersion.Text;
|
||||
await Task.Run(() => assetsManager.LoadFolder(openFolderDialog.Folder));
|
||||
await Task.Run(() => assetsManager.LoadFilesAndFolders(out openDirectoryBackup, openFolderDialog.Folder));
|
||||
BuildAssetStructures();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user