24 lines
631 B
Rust
24 lines
631 B
Rust
use crate::*;
|
|
|
|
use std::sync::Arc;
|
|
|
|
use crate::content::ContentWrapper;
|
|
|
|
#[allow(unused)]
|
|
pub trait PageContentWrapper: Send + Sync {
|
|
fn content(&self) -> &dyn ContentWrapper;
|
|
fn content_mut(&mut self) -> &mut dyn ContentWrapper;
|
|
fn tooltip(&self) -> &Arc<GuiSnippet>;
|
|
fn right_side(&self) -> &dyn RightSide;
|
|
fn right_side_mut(&mut self) -> &mut dyn RightSide;
|
|
}
|
|
|
|
pub trait RightSide: Send + Sync {
|
|
fn refresh(&mut self, engine: &Engine, hero: Entity) -> Result<()>;
|
|
|
|
fn disable(&mut self, _engine: &Engine, _hero: Entity) -> Result<()> {
|
|
Ok(())
|
|
}
|
|
|
|
fn base(&self) -> &Arc<GuiSnippet>;
|
|
}
|