add RenderThunk, LayoutThunk, Map::new, fold some components into arranger methods

This commit is contained in:
🪞👃🪞 2025-01-07 17:38:28 +01:00
parent 38e2e64751
commit b2fb71b405
8 changed files with 268 additions and 178 deletions

View file

@ -25,7 +25,9 @@ render!(TuiOut: |self: PianoHorizontalNotes<'a>, render|{
let is_in_y = source_y < source.height;
if is_in_x && is_in_y {
if let Some(source_cell) = source.get(source_x, source_y) {
*render.buffer.get_mut(screen_x, screen_y) = source_cell.clone();
if let Some(cell) = render.buffer.cell_mut(ratatui::prelude::Position::from((screen_x, screen_y))) {
*cell = source_cell.clone();
}
}
}
}