fix(draw): mismatches
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
same mf who else 2026-03-25 22:39:39 +02:00
parent 30d378a6ee
commit bea88ac58d
5 changed files with 27 additions and 15 deletions

View file

@ -35,7 +35,7 @@ impl Y<u16> for Tui {
fn h (&self) -> u16 { self.1.3 }
}
impl Tui {
fn update (&mut self, callback: &impl Fn(&mut Cell, u16, u16)) -> XYWH<u16> {
pub fn update (&mut self, callback: &impl Fn(&mut Cell, u16, u16)) -> XYWH<u16> {
for row in 0..self.h() {
let y = self.y() + row;
for col in 0..self.w() {
@ -49,14 +49,14 @@ impl Tui {
}
self.xywh()
}
fn tint_all (&mut self, fg: Color, bg: Color, modifier: Modifier) {
pub fn tint_all (&mut self, fg: Color, bg: Color, modifier: Modifier) {
for cell in self.0.content.iter_mut() {
cell.fg = fg;
cell.bg = bg;
cell.modifier = modifier;
}
}
fn blit (&mut self, text: &impl AsRef<str>, x: u16, y: u16, style: Option<Style>) {
pub fn blit (&mut self, text: &impl AsRef<str>, x: u16, y: u16, style: Option<Style>) {
let text = text.as_ref();
let style = style.unwrap_or(Style::default());
if x < self.0.area.width && y < self.0.area.height {