diff options
Diffstat (limited to 'src/drawing.c')
-rw-r--r-- | src/drawing.c | 98 |
1 files changed, 66 insertions, 32 deletions
diff --git a/src/drawing.c b/src/drawing.c index 18ee3b9..cfe0321 100644 --- a/src/drawing.c +++ b/src/drawing.c | |||
@@ -1815,6 +1815,28 @@ draw_notif_bar() { | |||
1815 | } | 1815 | } |
1816 | txt_drawf_small(msg, x0 + 2, y0 + 1, color); | 1816 | txt_drawf_small(msg, x0 + 2, y0 + 1, color); |
1817 | } else { | 1817 | } else { |
1818 | if (play_status && chain.len != 0 && chain.enabled) { | ||
1819 | u8 x = x0 + 2; | ||
1820 | u8 y = y0 + 1; | ||
1821 | txt_drawf_small("CHAIN: ", x, y, color); | ||
1822 | x += 4 * 7; | ||
1823 | bool first = true; | ||
1824 | for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { | ||
1825 | if (chain.active[i] != 1) { | ||
1826 | continue; | ||
1827 | } | ||
1828 | if (!first) { | ||
1829 | txt_drawc_small('-', x + 4 * k++, y, COL_FG); | ||
1830 | } | ||
1831 | u8 color = COL_FG; | ||
1832 | if (i == chain.current) { | ||
1833 | color = COL_ACC_2; | ||
1834 | } | ||
1835 | txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); | ||
1836 | first = false; | ||
1837 | } | ||
1838 | return; | ||
1839 | } | ||
1818 | Pattern *pat = &patterns[pattern_selection_loc]; | 1840 | Pattern *pat = &patterns[pattern_selection_loc]; |
1819 | if (input_handler == handle_param_selection_sq1 | 1841 | if (input_handler == handle_param_selection_sq1 |
1820 | || input_handler == handle_param_selection_ch1) { | 1842 | || input_handler == handle_param_selection_ch1) { |
@@ -2015,16 +2037,31 @@ draw_notif_bar() { | |||
2015 | } | 2037 | } |
2016 | 2038 | ||
2017 | if (settings.help == TOGGLE_ON) { | 2039 | if (settings.help == TOGGLE_ON) { |
2018 | if (input_handler == handle_trigger_selection || | 2040 | if (input_handler == handle_trigger_selection) { |
2019 | input_handler == handle_channel_selection) { | 2041 | if (key_pressed(KEY_B) && ctrl.key_b > 10) { |
2020 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | 2042 | txt_drawf_small("D-PAD:NUDGE TRIGGER", x0 + 2, y0 + 1, color); |
2043 | } else if (key_pressed(KEY_SELECT)) { | ||
2044 | txt_drawf_small("SEL+B:COPY TRIG SEL+A:PASTE TRIG", x0 + 2, y0 + 1, color); | ||
2045 | } else { | ||
2046 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | ||
2047 | } | ||
2048 | } else if (input_handler == handle_channel_selection) { | ||
2049 | if (key_pressed(KEY_SELECT)) { | ||
2050 | txt_drawf_small("SEL+B:COPY CHANNEL SEL+A:PASTE CHANNEL", x0 + 2, y0 + 1, color); | ||
2051 | } else { | ||
2052 | txt_drawf_small("L/R:NOTE SEL+L/R:OCTAVE A:PARAMS B:TOGGLE", x0 + 2, y0 + 1, color); | ||
2053 | } | ||
2021 | } else if (input_handler == handle_param_selection_sq1 || | 2054 | } else if (input_handler == handle_param_selection_sq1 || |
2022 | input_handler == handle_param_selection_sq2 || | 2055 | input_handler == handle_param_selection_sq2 || |
2023 | input_handler == handle_param_selection_wave || | 2056 | input_handler == handle_param_selection_wave || |
2024 | input_handler == handle_param_selection_noise) { | 2057 | input_handler == handle_param_selection_noise) { |
2025 | txt_drawf_small("L/R:ADJUST SELECT:COPY", x0 + 2, y0 + 1, color); | 2058 | txt_drawf_small("L/R:ADJUST SELECT:COPY PARAMETERS", x0 + 2, y0 + 1, color); |
2026 | } else if (input_handler == handle_pattern_selection) { | 2059 | } else if (input_handler == handle_pattern_selection) { |
2027 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L+R:CLEAR", x0 + 2, y0 + 1, color); | 2060 | if (key_pressed(KEY_SELECT)) { |
2061 | txt_drawf_small("SEL+B:COPY PATTERN SEL+A:PASTE PATTERN", x0 + 2, y0 + 1, color); | ||
2062 | } else { | ||
2063 | txt_drawf_small("L/R:CHAIN A:PARAMS B:QUEUE SEL+L+R:CLEAR", x0 + 2, y0 + 1, color); | ||
2064 | } | ||
2028 | } else if (input_handler == handle_pattern_chain) { | 2065 | } else if (input_handler == handle_pattern_chain) { |
2029 | switch (param_selection_loc) { | 2066 | switch (param_selection_loc) { |
2030 | case CHAIN_BTN_ENABLE: { | 2067 | case CHAIN_BTN_ENABLE: { |
@@ -2051,11 +2088,30 @@ draw_notif_bar() { | |||
2051 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); | 2088 | txt_drawf_small("B:PAUSE", x0 + 2, y0 + 1, color); |
2052 | } | 2089 | } |
2053 | } else if (right_col_selection_loc == R_COL_BPM) { | 2090 | } else if (right_col_selection_loc == R_COL_BPM) { |
2054 | txt_drawf_small("L/R:TEMPO (1) SEL+L/R:TEMPO (10)", x0 + 2, y0 + 1, color); | 2091 | if (key_pressed(KEY_SELECT)) { |
2092 | int bpm; | ||
2093 | if (settings.global_bpm) { | ||
2094 | bpm = settings.bpm; | ||
2095 | } else { | ||
2096 | bpm = patterns[pattern_selection_loc].bpm; | ||
2097 | } | ||
2098 | txt_drawf_small("TEMPO: %d bpm", x0 + 2, y0 + 1, color, bpm); | ||
2099 | } else { | ||
2100 | txt_drawf_small("L/R:TEMPO (+1) SEL+L/R:TEMPO (+10)", x0 + 2, y0 + 1, color); | ||
2101 | } | ||
2055 | } else if (right_col_selection_loc == R_COL_SETTINGS) { | 2102 | } else if (right_col_selection_loc == R_COL_SETTINGS) { |
2056 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); | 2103 | txt_drawf_small("B:SETTINGS", x0 + 2, y0 + 1, color); |
2057 | } else if (right_col_selection_loc == R_COL_SCALE) { | 2104 | } else if (right_col_selection_loc == R_COL_SCALE) { |
2058 | txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); | 2105 | if (key_pressed(KEY_SELECT)) { |
2106 | const char *roots[12] = { | ||
2107 | "C ", "C#", "D ", "D#", "E ", "F ", | ||
2108 | "F#", "G ", "G#", "A ", "A#", "B ", | ||
2109 | }; | ||
2110 | txt_drawf_small("ROOT: %s SCALE: %s", x0 + 2, y0 + 1, color, | ||
2111 | roots[current_scale_root], scale_long[current_scale]); | ||
2112 | } else { | ||
2113 | txt_drawf_small("L/R:SCALE SEL+L/R:ROOT NOTE", x0 + 2, y0 + 1, color); | ||
2114 | } | ||
2059 | } else if (right_col_selection_loc == R_COL_BANK_A || | 2115 | } else if (right_col_selection_loc == R_COL_BANK_A || |
2060 | right_col_selection_loc == R_COL_BANK_B || | 2116 | right_col_selection_loc == R_COL_BANK_B || |
2061 | right_col_selection_loc == R_COL_BANK_C || | 2117 | right_col_selection_loc == R_COL_BANK_C || |
@@ -2113,32 +2169,10 @@ draw_notif_bar() { | |||
2113 | return; | 2169 | return; |
2114 | } | 2170 | } |
2115 | 2171 | ||
2116 | if (chain.len != 0 && chain.enabled) { | 2172 | if (play_status == 0) { |
2117 | u8 x = x0 + 2; | 2173 | txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); |
2118 | u8 y = y0 + 1; | ||
2119 | txt_drawf_small("CHAIN: ", x, y, color); | ||
2120 | x += 4 * 7; | ||
2121 | bool first = true; | ||
2122 | for (size_t i = 0, k = 0; i < MAX_CHAIN; i++) { | ||
2123 | if (chain.active[i] != 1) { | ||
2124 | continue; | ||
2125 | } | ||
2126 | if (!first) { | ||
2127 | txt_drawc_small('-', x + 4 * k++, y, COL_FG); | ||
2128 | } | ||
2129 | u8 color = COL_FG; | ||
2130 | if (i == chain.current) { | ||
2131 | color = COL_ACC_2; | ||
2132 | } | ||
2133 | txt_drawc_small('A' + chain.chain[i], x + 4 * k++, y, color); | ||
2134 | first = false; | ||
2135 | } | ||
2136 | } else { | 2174 | } else { |
2137 | if (play_status == 0) { | 2175 | txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); |
2138 | txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); | ||
2139 | } else { | ||
2140 | txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); | ||
2141 | } | ||
2142 | } | 2176 | } |
2143 | } | 2177 | } |
2144 | } | 2178 | } |