Merge pull request #55 from n0xa/fix-up-arrow

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:23:10 -06:00 committed by GitHub
commit cff2f4ff1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) ? ">" : " ");