aboutsummaryrefslogtreecommitdiffstats
path: root/src/drawing.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-07-13 12:00:11 +0200
committerBad Diode <bd@badd10de.dev>2023-07-13 12:00:11 +0200
commit7f57051c51c16c88e5dcaa7bd51ccaec31469c4a (patch)
treeb484dc485d7f9718238343ffb5952428d2f52621 /src/drawing.c
parentd1c68125b6825f0327a4089aa8ddca5105e78ec1 (diff)
downloadstepper-7f57051c51c16c88e5dcaa7bd51ccaec31469c4a.tar.gz
stepper-7f57051c51c16c88e5dcaa7bd51ccaec31469c4a.zip
Add working pattern chaining prototype
Diffstat (limited to 'src/drawing.c')
-rw-r--r--src/drawing.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/drawing.c b/src/drawing.c
index dff5db2..4e793ea 100644
--- a/src/drawing.c
+++ b/src/drawing.c
@@ -1305,11 +1305,16 @@ draw_notif_bar() {
1305 *ptr++ = 'n'; 1305 *ptr++ = 'n';
1306 *ptr++ = ':'; 1306 *ptr++ = ':';
1307 *ptr++ = ' '; 1307 *ptr++ = ' ';
1308 for (size_t i = 0; i < chain.len; i++) { 1308 bool first = true;
1309 if (i != 0) { 1309 for (size_t i = 0; i < MAX_CHAIN; i++) {
1310 if (chain.active[i] != 1) {
1311 continue;
1312 }
1313 if (!first) {
1310 *ptr++ = '-'; 1314 *ptr++ = '-';
1311 } 1315 }
1312 *ptr++ = 'A' + chain.chain[i]; 1316 *ptr++ = 'A' + chain.chain[i];
1317 first = false;
1313 } 1318 }
1314 *ptr++ = '\0'; 1319 *ptr++ = '\0';
1315 txt_drawf_small(msg, x0 + 2, y0 + 1, color); 1320 txt_drawf_small(msg, x0 + 2, y0 + 1, color);
@@ -1338,13 +1343,8 @@ draw_pattern_chain() {
1338 if (chain.active[i]) { 1343 if (chain.active[i]) {
1339 txt_drawc('A' + chain.chain[i], x0 + 4, y0 + 3, color); 1344 txt_drawc('A' + chain.chain[i], x0 + 4, y0 + 3, color);
1340 } 1345 }
1346 if (chain.current == i && chain.len != 0) {
1347 draw_line(x0 + 5, y1 - 2, x1 - 5, y1 - 2, COL_ACC_0);
1348 }
1341 } 1349 }
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");
1350} 1350}