engine/character_window/src/inventory/map_right_side.rs

27 lines
526 B
Rust

use crate::*;
use std::sync::Arc;
use super::super::traits::*;
pub struct MapRightSide {
snippet: Arc<GuiSnippet>,
}
impl MapRightSide {
pub fn new(engine: &Arc<Engine>, file: &str) -> Result<Self> {
let snippet = GuiSnippet::from_str(engine.gui_handler(), file)?;
Ok(Self { snippet })
}
}
impl RightSide for MapRightSide {
fn refresh(&mut self, _engine: &Engine, _hero: Entity) -> Result<()> {
Ok(())
}
fn base(&self) -> &Arc<GuiSnippet> {
&self.snippet
}
}