border: add bottom border

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Tim Culverhouse 2024-03-05 15:46:30 -06:00
parent 778346feea
commit 7db582b4f3

View file

@ -40,3 +40,13 @@ pub fn right(win: Window, style: Style) Window {
} }
return win.initChild(0, 0, .{ .limit = w - 1 }, .expand); return win.initChild(0, 0, .{ .limit = w - 1 }, .expand);
} }
pub fn bottom(win: Window, style: Style) Window {
const h = win.height;
const w = win.width;
var i: usize = 0;
while (i < w) : (i += 1) {
win.writeCell(i, h - 1, .{ .char = horizontal, .style = style });
}
return win.initChild(0, 0, .expand, .{ .limit = h - 1 });
}