arranger: theme trait

This commit is contained in:
🪞👃🪞 2024-11-09 17:43:08 +01:00
parent 89cb8d7bbe
commit 0b1193722d
6 changed files with 149 additions and 87 deletions

View file

@ -12,8 +12,8 @@ pub fn delegate <B, C: Command<S>, S> (
Ok(cmd.execute(state)?.map(|x|wrap(x)))
}
pub trait MatchInput<E: Engine, S>: Sized {
fn match_input (state: &S, input: &E::Input) -> Option<Self>;
pub trait InputToCommand<E: Engine, S>: Sized {
fn input_to_command (state: &S, input: &E::Input) -> Option<Self>;
}
pub struct MenuBar<E: Engine, S, C: Command<S>> {
pub menus: Vec<Menu<E, S, C>>,