wgui: Separate user and wgui assets, topmost widgets (poc)
This commit is contained in:
12
wgui/src/assets_internal.rs
Normal file
12
wgui/src/assets_internal.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
#[derive(rust_embed::Embed)]
|
||||
#[folder = "assets/"]
|
||||
pub struct AssetInternal;
|
||||
|
||||
impl crate::assets::AssetProvider for AssetInternal {
|
||||
fn load_from_path(&mut self, path: &str) -> anyhow::Result<Vec<u8>> {
|
||||
match AssetInternal::get(path) {
|
||||
Some(data) => Ok(data.data.to_vec()),
|
||||
None => anyhow::bail!("internal file {path} not found"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user