Fix up arrow glitch, and make it roll over to end of menu too

This commit is contained in:
Noah Axon 2024-01-08 14:22:23 -06:00
parent c2f150d4ff
commit 9344eb1fca
1 changed files with 3 additions and 0 deletions

View File

@ -212,6 +212,9 @@ void drawmenu(MENU thismenu[], int size) {
DISP.fillScreen(BGCOLOR);
DISP.setCursor(0, 5, 1);
// scrolling menu
if (cursor < 0) {
cursor = size - 1; // rollover hack for up-arrow on cardputer
}
if (cursor > 5) {
for ( int i = 0 + (cursor - 5) ; i < size ; i++ ) {
DISP.print((cursor == i) ? ">" : " ");