new tui plugin
This commit is contained in:
parent
441e729dee
commit
723cd0b6e4
4 changed files with 183 additions and 15 deletions
|
|
@ -39,3 +39,4 @@ pub(crate) fn draw_system(
|
|||
})?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,20 +7,6 @@ pub(crate) enum TuiState {
|
|||
InGame,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub(crate) struct InGame;
|
||||
|
||||
impl ComputedStates for InGame {
|
||||
type SourceStates = TuiState;
|
||||
|
||||
fn compute(sources: Self::SourceStates) -> Option<Self> {
|
||||
match sources {
|
||||
TuiState::InGame => Some(Self),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(SubStates, Default, Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
||||
#[source(TuiState = TuiState::MainMenu)]
|
||||
pub(crate) enum ZenState {
|
||||
|
|
@ -36,6 +22,20 @@ pub(crate) enum ConsoleState {
|
|||
Open,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
|
||||
pub(crate) struct InGame;
|
||||
|
||||
impl ComputedStates for InGame {
|
||||
type SourceStates = TuiState;
|
||||
|
||||
fn compute(sources: Self::SourceStates) -> Option<Self> {
|
||||
match sources {
|
||||
TuiState::InGame => Some(Self),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Not for ConsoleState {
|
||||
type Output = Self;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue