From 06eadc45799d3183b81ce324138e98a145410bc4 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Tue, 22 Aug 2023 12:54:55 +0200 Subject: Ensure ALL is shown when appropriate and drawing bugfixes --- src/drawing.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/drawing.c') diff --git a/src/drawing.c b/src/drawing.c index 253a961..3922e09 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1277,7 +1277,10 @@ draw_piano_notes(void) { if (input_handler == handle_channel_selection) { // Show note on current channel only. Pattern *pat = &patterns[current_pattern]; - u8 step = (step_counter - 1) % 16; + if (pat->empty || play_status == 0) { + return; + } + u8 step = step_counter % 16; switch (channel_selection_loc) { case 0: { if (pat->ch1.active && pat->ch1.notes[step].active) { @@ -1295,7 +1298,6 @@ draw_piano_notes(void) { } } break; } - } else if (input_handler == handle_trigger_selection || input_handler == handle_param_selection_sq1 || input_handler == handle_param_selection_sq2 || @@ -1303,12 +1305,17 @@ draw_piano_notes(void) { input_handler == handle_param_selection_noise) { // Show currently selected trigger note. TriggerNote *trig = get_current_trig(); - draw_note(trig->note, COL_OFF); + if (trig->active && !patterns[pattern_selection_loc].empty) { + draw_note(trig->note, COL_OFF); + } } else { // Show last/current played notes in all channels. if (play_status == 1) { Pattern *pat = &patterns[current_pattern]; - u8 step = (step_counter - 1) % 16; + if (pat->empty || play_status == 0) { + return; + } + u8 step = step_counter % 16; if (pat->ch3.active && pat->ch3.notes[step].active) { draw_note(pat->ch3.notes[step].note, COL_OFF); } @@ -1433,6 +1440,9 @@ draw_notif_bar() { } else { params = &ch1_params; } + if (input_handler == handle_param_selection_ch1) { + txt_drawf_small("(ALL)", x0 + NOTIF_W - 7 * 3 - 3, y0 + 1, color); + } switch (param_selection_loc) { case 0: { txt_drawf_small("SHAPE: ", x0 + 2, y0 + 1, color); -- cgit v1.2.1