mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
full block piano roll, pt.4
This commit is contained in:
parent
501e47cd85
commit
f2fdf3dd12
1 changed files with 10 additions and 5 deletions
|
|
@ -267,11 +267,16 @@ impl PhraseViewMode {
|
|||
for (x, target_x) in (x0..x0+w).enumerate() {
|
||||
for (y, target_y) in (y0..y0+h).enumerate() {
|
||||
let source_x = time_start + x;
|
||||
let source_y = note_hi - y;
|
||||
let target_cell = target.get_mut(target_x, target_y);
|
||||
target_cell.set_char('x');
|
||||
if let Some(source_cell) = source.get(source_x, source_y) {
|
||||
*target_cell = source_cell.clone();
|
||||
let source_y = note_hi - y;
|
||||
// TODO: enable loop rollover:
|
||||
//let source_x = (time_start + x) % source.width.max(1);
|
||||
//let source_y = (note_hi - y) % source.height.max(1);
|
||||
if source_x < source.width && source_y < source.height {
|
||||
let target_cell = target.get_mut(target_x, target_y);
|
||||
target_cell.set_char('x');
|
||||
if let Some(source_cell) = source.get(source_x, source_y) {
|
||||
*target_cell = source_cell.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue