mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
Select previous item (dbl klick) on first element wraps around to last item
This commit is contained in:
parent
2aa75f02b5
commit
f1219e411c
@ -861,9 +861,9 @@ unsigned char questionBox_OLED(const char* question, char answers[7][20], int nu
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (choice > 0) {
|
else
|
||||||
choice--;
|
choice = (choice > 0) ? choice - 1 : num_answers - 1;
|
||||||
}
|
|
||||||
|
|
||||||
// draw selection box
|
// draw selection box
|
||||||
display.drawPixel(0, 8 * choice + 12, WHITE);
|
display.drawPixel(0, 8 * choice + 12, WHITE);
|
||||||
|
Loading…
Reference in New Issue
Block a user