support multipass layout, barely

This commit is contained in:
facile pop culture reference 2026-08-04 07:59:20 +03:00
parent 083ce8ba76
commit 7f9b7091e2
20 changed files with 1581 additions and 1783 deletions

View file

@ -48,8 +48,8 @@ macro_rules! border {
#[derive(Copy, Clone)] pub struct $T(pub bool, pub Style);
//impl Layout<Tui> for $T {}
impl Draw<Tui> for $T {
fn draw (self, to: &mut Tui) -> Perhaps<XYWH<u16>> {
when(self.enabled(), draw(|to: &mut Tui|BorderStyle::draw(self, to).map(Some))).draw(to)
fn draw (&self, to: &mut Tui) -> Perhaps<XYWH<u16>> {
when(self.enabled(), draw(|to: &mut Tui|BorderStyle::draw(*self, to).map(Some))).draw(to)
}
}
)+}