diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-24 16:35:32 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-24 16:35:32 +0200 |
commit | 1e8c7a50b4295383b0d16ab105a4b8f26bbaa438 (patch) | |
tree | 43312f786bdf80e454dd3cd1b055cc61e424e523 | |
parent | 5d86238b8cc3c6dba95e90eed9fb444bb276f02e (diff) | |
download | stepper-1e8c7a50b4295383b0d16ab105a4b8f26bbaa438.tar.gz stepper-1e8c7a50b4295383b0d16ab105a4b8f26bbaa438.zip |
Fix a couple of UI bugs
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/scale.c | 6 | ||||
-rw-r--r-- | src/sequencer.c | 7 |
3 files changed, 18 insertions, 3 deletions
@@ -14,6 +14,8 @@ WITH REGARD TO THIS SOFTWARE. | |||
14 | // UI tweaks. | 14 | // UI tweaks. |
15 | // - Add custom user themes | 15 | // - Add custom user themes |
16 | // - Animations for cursor movement/current step highlight. (A fade out maybe?) | 16 | // - Animations for cursor movement/current step highlight. (A fade out maybe?) |
17 | // - Should the channel parameters reset after leaving them? Is it more or | ||
18 | // less confusing this way? | ||
17 | // | 19 | // |
18 | // Quality of life improvements. | 20 | // Quality of life improvements. |
19 | // - When not on play mode, adjusting a note or a parameter triggers the sound. | 21 | // - When not on play mode, adjusting a note or a parameter triggers the sound. |
@@ -66,6 +68,11 @@ WITH REGARD TO THIS SOFTWARE. | |||
66 | // - Add CREDITS to the documentation for now, should probably be a menu item | 68 | // - Add CREDITS to the documentation for now, should probably be a menu item |
67 | // later. | 69 | // later. |
68 | // | 70 | // |
71 | // Bug notes (catbeat): | ||
72 | // | ||
73 | // + Bug: GUI scale disappeared | ||
74 | // + Bug: cut and pasted note on noise voice and showed parameter paste but | ||
75 | // not note, had to push B again for note | ||
69 | 76 | ||
70 | #include "gba/gba.h" | 77 | #include "gba/gba.h" |
71 | 78 | ||
@@ -186,6 +193,7 @@ update(void) { | |||
186 | redraw_play_pause = true; | 193 | redraw_play_pause = true; |
187 | redraw_piano_note = true; | 194 | redraw_piano_note = true; |
188 | redraw_params = true; | 195 | redraw_params = true; |
196 | redraw_scale = true; | ||
189 | } | 197 | } |
190 | last_trig_loc = trig_selection_loc; | 198 | last_trig_loc = trig_selection_loc; |
191 | last_channel_loc = channel_selection_loc; | 199 | last_channel_loc = channel_selection_loc; |
diff --git a/src/scale.c b/src/scale.c index 51d46fe..7704815 100644 --- a/src/scale.c +++ b/src/scale.c | |||
@@ -18,6 +18,9 @@ typedef enum Scales { | |||
18 | SCALE_NUM, | 18 | SCALE_NUM, |
19 | } Scales; | 19 | } Scales; |
20 | 20 | ||
21 | int current_scale = SCALE_CHRM; | ||
22 | int current_scale_root = 0; | ||
23 | |||
21 | char *scale_short[] = { | 24 | char *scale_short[] = { |
22 | "CHRM", | 25 | "CHRM", |
23 | "MAJR", | 26 | "MAJR", |
@@ -77,9 +80,6 @@ Scale scales[] = { | |||
77 | {1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0}, // HIRA | 80 | {1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0}, // HIRA |
78 | }; | 81 | }; |
79 | 82 | ||
80 | int current_scale = SCALE_CHRM; | ||
81 | int current_scale_root = 0; | ||
82 | |||
83 | s32 | 83 | s32 |
84 | scale_note(s32 current, s32 inc) { | 84 | scale_note(s32 current, s32 inc) { |
85 | if (inc > 1 || inc < -1) { | 85 | if (inc > 1 || inc < -1) { |
diff --git a/src/sequencer.c b/src/sequencer.c index 609ccee..0558323 100644 --- a/src/sequencer.c +++ b/src/sequencer.c | |||
@@ -683,6 +683,7 @@ handle_right_col_selection(void) { | |||
683 | if (current_scale < 0) { | 683 | if (current_scale < 0) { |
684 | current_scale = SCALE_NUM - 1; | 684 | current_scale = SCALE_NUM - 1; |
685 | } | 685 | } |
686 | // TODO: add root note change & keyboard viz. | ||
686 | redraw_scale = true; | 687 | redraw_scale = true; |
687 | } break; | 688 | } break; |
688 | } | 689 | } |
@@ -807,6 +808,9 @@ handle_pattern_selection(void) { | |||
807 | clipboard_copy(); | 808 | clipboard_copy(); |
808 | } | 809 | } |
809 | if (key_tap(KEY_A)) { | 810 | if (key_tap(KEY_A)) { |
811 | if (patterns[pattern_selection_loc].empty) { | ||
812 | clear_pattern(pattern_selection_loc); | ||
813 | } | ||
810 | clipboard_paste(); | 814 | clipboard_paste(); |
811 | redraw_bpm = true; | 815 | redraw_bpm = true; |
812 | redraw_trigs = true; | 816 | redraw_trigs = true; |
@@ -1337,6 +1341,9 @@ handle_trigger_selection(void) { | |||
1337 | redraw_piano_note = true; | 1341 | redraw_piano_note = true; |
1338 | } else if (key_tap(KEY_A)) { | 1342 | } else if (key_tap(KEY_A)) { |
1339 | if (key_hold(KEY_SELECT)) { | 1343 | if (key_hold(KEY_SELECT)) { |
1344 | if (patterns[pattern_selection_loc].empty) { | ||
1345 | clear_pattern(pattern_selection_loc); | ||
1346 | } | ||
1340 | clipboard_paste(); | 1347 | clipboard_paste(); |
1341 | redraw_bpm = true; | 1348 | redraw_bpm = true; |
1342 | redraw_trigs = true; | 1349 | redraw_trigs = true; |