diff options
author | Bad Diode <bd@badd10de.dev> | 2023-05-30 14:39:30 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-05-30 14:39:30 +0200 |
commit | d813b06a015bd678af7d8262b26373759bf2aacb (patch) | |
tree | 44378d9b77dbf75c7ea83c706452c7f0a2762817 /src/sequencer.c | |
parent | b4593763ec78f14b9c6fb309f595740264969806 (diff) | |
download | stepper-d813b06a015bd678af7d8262b26373759bf2aacb.tar.gz stepper-d813b06a015bd678af7d8262b26373759bf2aacb.zip |
Add settings button and navigation
Diffstat (limited to 'src/sequencer.c')
-rw-r--r-- | src/sequencer.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/sequencer.c b/src/sequencer.c index b2a8468..0efd50c 100644 --- a/src/sequencer.c +++ b/src/sequencer.c | |||
@@ -370,11 +370,12 @@ handle_right_col_selection(void) { | |||
370 | if (right_col_selection_loc == R_COL_STOP) { | 370 | if (right_col_selection_loc == R_COL_STOP) { |
371 | right_col_selection_loc = R_COL_PLAY; | 371 | right_col_selection_loc = R_COL_PLAY; |
372 | } else { | 372 | } else { |
373 | input_handler = handle_trigger_selection; | 373 | if (right_col_selection_loc == R_COL_BPM) { |
374 | switch (right_col_selection_loc) { | 374 | trig_selection_loc = 15; |
375 | case R_COL_BPM: { trig_selection_loc = 15; } break; | 375 | } else { |
376 | default: { trig_selection_loc = 7; } break; | 376 | trig_selection_loc = 7; |
377 | } | 377 | } |
378 | input_handler = handle_trigger_selection; | ||
378 | redraw_params = true; | 379 | redraw_params = true; |
379 | } | 380 | } |
380 | } else if (key_tap(KEY_RIGHT)) { | 381 | } else if (key_tap(KEY_RIGHT)) { |
@@ -382,20 +383,13 @@ handle_right_col_selection(void) { | |||
382 | right_col_selection_loc = R_COL_STOP; | 383 | right_col_selection_loc = R_COL_STOP; |
383 | } else { | 384 | } else { |
384 | input_handler = handle_pattern_selection; | 385 | input_handler = handle_pattern_selection; |
385 | switch (right_col_selection_loc) { | ||
386 | case R_COL_BANK_A: { pattern_selection_loc = 0; } break; | ||
387 | case R_COL_BANK_B: { pattern_selection_loc = 1; } break; | ||
388 | case R_COL_BANK_C: { pattern_selection_loc = 2; } break; | ||
389 | case R_COL_BANK_D: { pattern_selection_loc = 3; } break; | ||
390 | case R_COL_STOP: { pattern_selection_loc = 5; } break; | ||
391 | default: { pattern_selection_loc = 6; } break; | ||
392 | } | ||
393 | redraw_trigs = true; | 386 | redraw_trigs = true; |
394 | } | 387 | } |
395 | } else if (key_tap(KEY_UP)) { | 388 | } else if (key_tap(KEY_UP)) { |
396 | switch (right_col_selection_loc) { | 389 | switch (right_col_selection_loc) { |
397 | case R_COL_PLAY: | 390 | case R_COL_PLAY: |
398 | case R_COL_STOP: { right_col_selection_loc = R_COL_BANK_D; } break; | 391 | case R_COL_STOP: { right_col_selection_loc = R_COL_SETTINGS; } break; |
392 | case R_COL_SETTINGS: { right_col_selection_loc = R_COL_BANK_D; } break; | ||
399 | case R_COL_BPM: { right_col_selection_loc = R_COL_PLAY; } break; | 393 | case R_COL_BPM: { right_col_selection_loc = R_COL_PLAY; } break; |
400 | case R_COL_BANK_A: { right_col_selection_loc = R_COL_BPM; } break; | 394 | case R_COL_BANK_A: { right_col_selection_loc = R_COL_BPM; } break; |
401 | default: { right_col_selection_loc++; } break; | 395 | default: { right_col_selection_loc++; } break; |
@@ -405,7 +399,8 @@ handle_right_col_selection(void) { | |||
405 | case R_COL_PLAY: | 399 | case R_COL_PLAY: |
406 | case R_COL_STOP: { right_col_selection_loc = R_COL_BPM; } break; | 400 | case R_COL_STOP: { right_col_selection_loc = R_COL_BPM; } break; |
407 | case R_COL_BPM: { right_col_selection_loc = R_COL_BANK_A; } break; | 401 | case R_COL_BPM: { right_col_selection_loc = R_COL_BANK_A; } break; |
408 | case R_COL_BANK_D: { right_col_selection_loc = R_COL_PLAY; } break; | 402 | case R_COL_BANK_D: { right_col_selection_loc = R_COL_SETTINGS; } break; |
403 | case R_COL_SETTINGS: { right_col_selection_loc = R_COL_PLAY; } break; | ||
409 | default: { right_col_selection_loc--; } break; | 404 | default: { right_col_selection_loc--; } break; |
410 | } | 405 | } |
411 | } else if (key_tap(KEY_L)) { | 406 | } else if (key_tap(KEY_L)) { |