shorten TuiIn, TuiOut

This commit is contained in:
🪞👃🪞 2024-12-31 23:42:35 +01:00
parent ca16a91015
commit 21741ebc52
20 changed files with 77 additions and 75 deletions

View file

@ -151,7 +151,7 @@ impl Plugin {
}
}
impl Content<Tui> for Plugin {
fn render (&self, to: &mut TuiOutput) {
fn render (&self, to: &mut TuiOut) {
let area = to.area();
let [x, y, _, height] = area;
let mut width = 20u16;
@ -187,7 +187,7 @@ impl Content<Tui> for Plugin {
}
}
fn draw_header (state: &Plugin, to: &mut TuiOutput, x: u16, y: u16, w: u16) {
fn draw_header (state: &Plugin, to: &mut TuiOut, x: u16, y: u16, w: u16) {
let style = Style::default().gray();
let label1 = format!(" {}", state.name);
to.blit(&label1, x + 1, y, Some(style.white().bold()));