From 9344eb1fcad46e7056a4bca37741641300a3526c Mon Sep 17 00:00:00 2001 From: Noah Axon Date: Mon, 8 Jan 2024 14:22:23 -0600 Subject: [PATCH] Fix up arrow glitch, and make it roll over to end of menu too --- m5stick-nemo.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m5stick-nemo.ino b/m5stick-nemo.ino index 2a16012..ea1a192 100644 --- a/m5stick-nemo.ino +++ b/m5stick-nemo.ino @@ -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) ? ">" : " ");