rust 2024
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#[derive(rust_embed::Embed)]
|
||||
#[folder = "src/gui/assets/"]
|
||||
#[folder = "src/assets/"]
|
||||
pub struct GuiAsset;
|
||||
|
||||
impl wgui::assets::AssetProvider for GuiAsset {
|
||||
fn load_from_path(&mut self, path: &str) -> anyhow::Result<Vec<u8>> {
|
||||
match GuiAsset::get(path) {
|
||||
match Self::get(path) {
|
||||
Some(data) => Ok(data.data.to_vec()),
|
||||
None => anyhow::bail!("embedded file {} not found", path),
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ impl OverlayRenderer for GuiPanel {
|
||||
_alpha: f32,
|
||||
) -> anyhow::Result<bool> {
|
||||
self.context.update_viewport(tgt.extent_u32arr(), 1.0)?;
|
||||
self.layout.update(tgt.extent_vec2(), self.timestep.alpha);
|
||||
self.layout.update(tgt.extent_vec2(), self.timestep.alpha)?;
|
||||
|
||||
let mut cmd_buf = app
|
||||
.gfx
|
||||
|
||||
Reference in New Issue
Block a user