add Screen::area and ::clip to implement Align

This commit is contained in:
facile pop culture reference 2026-07-15 12:57:53 +03:00
parent ddc53b23c2
commit 482b624169
7 changed files with 85 additions and 37 deletions

View file

@ -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)});