| 1463 | } |
| 1464 | |
| 1465 | void DisplayManager_::drawMenuIndicator(int cur, int total, uint32_t color) |
| 1466 | { |
| 1467 | int menuItemWidth = 1; |
| 1468 | int totalWidth = total * menuItemWidth + (total - 1); |
| 1469 | int leftMargin = (MATRIX_WIDTH - totalWidth) / 2; |
| 1470 | int pixelSpacing = 1; |
| 1471 | for (int i = 0; i < total; i++) |
| 1472 | { |
| 1473 | int x = leftMargin + i * (menuItemWidth + pixelSpacing); |
| 1474 | if (i == cur) |
| 1475 | { |
| 1476 | drawLine(x, 7, x + menuItemWidth - 1, 7, color); |
| 1477 | } |
| 1478 | else |
| 1479 | { |
| 1480 | drawLine(x, 7, x + menuItemWidth - 1, 7, 0x666666); |
| 1481 | } |
| 1482 | } |
| 1483 | } |
| 1484 | |
| 1485 | void DisplayManager_::drawBarChart(int16_t x, int16_t y, const int data[], byte dataSize, bool withIcon, uint32_t color, uint32_t barBG) |
| 1486 | { |