This commit is contained in:
1 parent
f29712d158
commit
3e053a81ab
123 files changed
+31930
-1404
No files matched your search
@@ -3,8 +3,10 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use bevy::prelude::*;
|
||||
use shared::MaterialAsset;
|
||||
|
||||
use crate::assets::{ASSETS_ROOT, BUILTINS_FOLDER};
|
||||
use crate::asset_db::ImportSettings;
|
||||
use crate::assets::{AssetSelection, ASSETS_ROOT, BUILTINS_FOLDER};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub(crate) enum AssetBrowserView {
|
||||
@@ -41,6 +43,31 @@ pub struct AssetBrowserUiState {
|
||||
pub(crate) recursive: bool,
|
||||
pub(crate) show_details: bool,
|
||||
pub(crate) expanded_folders: HashSet<String>,
|
||||
pub(crate) expanded_assets: HashSet<String>,
|
||||
pub(crate) pending_delete: Option<AssetDeleteRequest>,
|
||||
pub(crate) import_draft: Option<ImportSettingsDraft>,
|
||||
pub(crate) material_draft: Option<MaterialAssetDraft>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct AssetDeleteRequest {
|
||||
pub(crate) selection: AssetSelection,
|
||||
pub(crate) label: String,
|
||||
pub(crate) files: Vec<String>,
|
||||
pub(crate) warnings: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct ImportSettingsDraft {
|
||||
pub(crate) path: String,
|
||||
pub(crate) settings: ImportSettings,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct MaterialAssetDraft {
|
||||
pub(crate) path: String,
|
||||
pub(crate) asset: MaterialAsset,
|
||||
pub(crate) error: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for AssetBrowserUiState {
|
||||
@@ -57,6 +84,10 @@ impl Default for AssetBrowserUiState {
|
||||
recursive: false,
|
||||
show_details: true,
|
||||
expanded_folders,
|
||||
expanded_assets: HashSet::new(),
|
||||
pending_delete: None,
|
||||
import_draft: None,
|
||||
material_draft: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user