Tall cursor backdrop

This commit is contained in:
Dejvino
2026-02-19 00:10:10 +01:00
parent 66c20de208
commit de6775a7d7
6 changed files with 26 additions and 28 deletions
+7 -4
View File
@@ -246,6 +246,7 @@ void UIManager::updateLeds(const Step sequence[][NUM_STEPS], int playbackStep, b
int x = s % 8;
int yBase = (s / 8) * 4;
uint32_t color = 0, dimColor = 0;
bool isCursorHere = (isPlaying && s == playbackStep);
if (sequence[0][s].note != -1) {
color = getNoteColor(sequence[0][s].note, sequence[0][s].tie);
dimColor = getNoteColor(sequence[0][s].note, true);
@@ -257,7 +258,7 @@ void UIManager::updateLeds(const Step sequence[][NUM_STEPS], int playbackStep, b
else if (octave < 4) { c[2] = color; if (sequence[0][s].accent) c[1] = dimColor; }
else { c[1] = color; if (sequence[0][s].accent) { c[0] = dimColor; c[2] = dimColor; } }
}
uint32_t cursorColor = 0;
uint32_t cursorColor = pixels.Color(0, 0, 50);
if (isPlaying) {
cursorColor = pixels.Color(0, 50, 0);
if (songModeEnabled && s >= 8) {
@@ -266,10 +267,12 @@ void UIManager::updateLeds(const Step sequence[][NUM_STEPS], int playbackStep, b
}
}
bool isCursorHere = (isPlaying && s == playbackStep);
if (cursorColor != 0) {
if (isCursorHere) c[3] = cursorColor;
else {
if (isCursorHere) {
for(int i=0; i<4; i++) {
if (c[i] == 0) c[i] = cursorColor;
}
} else {
uint8_t r = (uint8_t)(cursorColor >> 16), g = (uint8_t)(cursorColor >> 8), b = (uint8_t)cursorColor;
c[3] = pixels.Color(r/5, g/5, b/5);
}