mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-07-17 15:56:57 +02:00
add Screen::area and ::clip to implement Align
This commit is contained in:
parent
ddc53b23c2
commit
482b624169
7 changed files with 85 additions and 37 deletions
24
src/eval.rs
24
src/eval.rs
|
|
@ -119,19 +119,17 @@ pub fn eval_view <'a, O: Screen + 'a, S> (
|
|||
).draw(output),
|
||||
|
||||
// Second `frags.next()` calls returns the namespace member.
|
||||
Some("bsp") => {
|
||||
eval_enum!("bsp", output, state, frags.next(), arg0, Split {
|
||||
"n" => North,
|
||||
"s" => South,
|
||||
"e" => East,
|
||||
"w" => West,
|
||||
"a" => Above,
|
||||
"b" => Below
|
||||
}).half(
|
||||
thunk(move|output: &mut O|{state.interpret(output, &arg0)}),
|
||||
thunk(move|output: &mut O|{state.interpret(output, &arg1)}),
|
||||
).draw(output)
|
||||
},
|
||||
Some("bsp") => eval_enum!("bsp", output, state, frags.next(), arg0, Split {
|
||||
"n" => North,
|
||||
"s" => South,
|
||||
"e" => East,
|
||||
"w" => West,
|
||||
"a" => Above,
|
||||
"b" => Below
|
||||
}).half(
|
||||
thunk(move|output: &mut O|{state.interpret(output, &arg0)}),
|
||||
thunk(move|output: &mut O|{state.interpret(output, &arg1)}),
|
||||
).draw(output),
|
||||
|
||||
Some("align") => {
|
||||
let content = thunk(move|output: &mut O|{state.interpret(output, &arg0)});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue