Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #55 from n0xa/fix-up-arrow
Browse files Browse the repository at this point in the history
Fix up arrow glitch, and make it roll over to end of menu too
  • Loading branch information
n0xa committed Jan 8, 2024
2 parents c2f150d + 9344eb1 commit cff2f4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions m5stick-nemo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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) ? ">" : " ");
Expand Down

0 comments on commit cff2f4f

Please sign in to comment.