From 8fa42f9f9107f460b49fa7ab171529942e66e7ea Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Wed, 12 Jul 2023 19:34:25 +0200 Subject: Add optional help prompt to the notif bar --- src/drawing.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'src/drawing.c') diff --git a/src/drawing.c b/src/drawing.c index b488ed1..18504bc 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1261,11 +1261,40 @@ draw_notif_bar() { } txt_drawf_small(msg, x0 + 2, y0 + 1, color); } else { - // if (notif.time > -16) { - // notif.time--; - // return; - // } - // TODO: More context dependent messages? Use instructions? + if (settings.help == HELP_ON) { + if (input_handler == handle_trigger_selection || + input_handler == handle_channel_selection) { + txt_drawf_small("L/R:NOTE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); + } else if (input_handler == handle_param_selection_sq1 || + input_handler == handle_param_selection_sq2 || + input_handler == handle_param_selection_wave || + input_handler == handle_param_selection_noise) { + txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); + } else if (input_handler == handle_pattern_selection) { + txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE", x0 + 2, y0 + 1, color); + } else if (input_handler == handle_right_col_selection) { + if (right_col_selection_loc == R_COL_STOP) { + txt_drawf_small("B:STOP", x0 + 2, y0 + 1, color); + } else if (right_col_selection_loc == R_COL_PLAY) { + if (play_status == 0) { + txt_drawf_small("B:PLAY", x0 + 2, y0 + 1, color); + } else { + txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); + } + } else if (right_col_selection_loc == R_COL_BPM) { + txt_drawf_small("L/R:TEMPO", x0 + 2, y0 + 1, color); + } else if (right_col_selection_loc == R_COL_SETTINGS) { + txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); + } else if (right_col_selection_loc == R_COL_BANK_A || + right_col_selection_loc == R_COL_BANK_B || + right_col_selection_loc == R_COL_BANK_C || + right_col_selection_loc == R_COL_BANK_D) { + txt_drawf_small("B:SAVE CURRENT BANK AND SWITCH", x0 + 2, y0 + 1, color); + } + } + return; + } + if (play_status == 0) { txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); } else { -- cgit v1.2.1