aboutsummaryrefslogtreecommitdiffstats
path: root/src/drawing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drawing.c')
-rw-r--r--src/drawing.c54
1 files changed, 50 insertions, 4 deletions
diff --git a/src/drawing.c b/src/drawing.c
index 18504bc..dff5db2 100644
--- a/src/drawing.c
+++ b/src/drawing.c
@@ -1251,7 +1251,7 @@ draw_notif_bar() {
1251 if (notif.time > 0) { 1251 if (notif.time > 0) {
1252 char msg[32] = {0}; 1252 char msg[32] = {0};
1253 if (notif.time <= 32) { 1253 if (notif.time <= 32) {
1254 for (size_t i = 0; i < notif.time; i++) { 1254 for (s16 i = 0; i < notif.time; i++) {
1255 msg[i] = notif.msg[i + 32 - notif.time]; 1255 msg[i] = notif.msg[i + 32 - notif.time];
1256 } 1256 }
1257 } else { 1257 } else {
@@ -1295,10 +1295,56 @@ draw_notif_bar() {
1295 return; 1295 return;
1296 } 1296 }
1297 1297
1298 if (play_status == 0) { 1298 if (chain.len != 0) {
1299 txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color); 1299 char msg[64] = {0};
1300 char *ptr = msg;
1301 *ptr++ = 'c';
1302 *ptr++ = 'h';
1303 *ptr++ = 'a';
1304 *ptr++ = 'i';
1305 *ptr++ = 'n';
1306 *ptr++ = ':';
1307 *ptr++ = ' ';
1308 for (size_t i = 0; i < chain.len; i++) {
1309 if (i != 0) {
1310 *ptr++ = '-';
1311 }
1312 *ptr++ = 'A' + chain.chain[i];
1313 }
1314 *ptr++ = '\0';
1315 txt_drawf_small(msg, x0 + 2, y0 + 1, color);
1300 } else { 1316 } else {
1301 txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color); 1317 if (play_status == 0) {
1318 txt_drawf_small("STOPPED", x0 + 2, y0 + 1, color);
1319 } else {
1320 txt_drawf_small("PLAYING", x0 + 2, y0 + 1, color);
1321 }
1322 }
1323 }
1324}
1325
1326void
1327draw_pattern_chain() {
1328 clear_parameters();
1329 for (size_t i = 0; i < 16; i++) {
1330 u8 color = COL_FG;
1331 size_t offset_x = PAT_TRIG_OFFSET_X * (i % 8);
1332 size_t offset_y = i < 8 ? 0 : 0 + PAT_TRIG_OFFSET_Y;
1333 size_t x0 = PAT_TRIG_START_X + offset_x;
1334 size_t x1 = PAT_TRIG_START_X + offset_x + PAT_TRIG_W;
1335 size_t y0 = PAT_TRIG_START_Y + offset_y;
1336 size_t y1 = PAT_TRIG_START_Y + offset_y + PAT_TRIG_H;
1337 draw_rect(x0, y0, x1, y1, color);
1338 if (chain.active[i]) {
1339 txt_drawc('A' + chain.chain[i], x0 + 4, y0 + 3, color);
1302 } 1340 }
1303 } 1341 }
1342 // draw_rect(
1343 // PARAMS_START_X,
1344 // PARAMS_START_Y + 6,
1345 // PARAMS_START_X + PARAMS_W,
1346 // PARAMS_START_Y + PARAMS_H - 6, COL_FG);
1347 // txt_drawf_small("Current pattern: %s", PARAMS_START_X + 3, PARAMS_START_Y + 8, COL_FG, "A");
1348 // txt_drawf_small("Next pattern: %s", PARAMS_START_X + 3, PARAMS_START_Y + 8 * 2, COL_FG, "A");
1349 // txt_drawf_small("Chain: %s", PARAMS_START_X + 3, PARAMS_START_Y + 8 * 3, COL_FG, "A - B - B - A - B");
1304} 1350}