engine/character_window/src/inventory/map_right_side.rs

28 lines
520 B
Rust
Raw Normal View History

2024-08-25 12:30:03 +00:00
use crate::*;
use std::sync::Arc;
use super::super::traits::*;
pub struct MapRightSide {
snippet: Arc<GuiSnippet>,
}
impl MapRightSide {
pub fn new(game_handle: &GameHandle, path: &str) -> Result<Self> {
let snippet = game_handle.gui_snippet(path)?;
Ok(Self { snippet })
}
}
impl RightSide for MapRightSide {
fn refresh(&mut self, _game_handle: &GameHandle, _hero: Entity) -> Result<()> {
Ok(())
}
fn base(&self) -> &Arc<GuiSnippet> {
&self.snippet
}
}