mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-03-13 12:10:44 +01:00
This commit is contained in:
parent
f1dda6af07
commit
ecba0cc64f
5 changed files with 322 additions and 270 deletions
|
|
@ -4,7 +4,6 @@ namespace!(State: bool {});
|
|||
namespace!(State: u16 {});
|
||||
namespace!(State: Color {});
|
||||
handle!(TuiIn: |self: State, input|Action::from(input).eval(self).map(|_|None));
|
||||
from!(Action: |input: &TuiIn| todo!());
|
||||
view!(State: TuiOut: [ evaluate_output_expression, evaluate_output_expression_tui ]);
|
||||
draw!(State: TuiOut: [ draw_example ]);
|
||||
#[derive(Debug, Default)] struct State {
|
||||
|
|
@ -12,6 +11,7 @@ namespace!(State: Color {});
|
|||
/** Command history (undo/redo) */ history: Vec<Action>,
|
||||
/** User-controllable value */ cursor: usize,
|
||||
}
|
||||
impl_from!(Action: |input: &TuiIn| todo!());
|
||||
#[derive(Debug)] enum Action {
|
||||
/** Increment cursor */ Next,
|
||||
/** Decrement cursor */ Prev
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue