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:
commit
cff2f4ff1f
|
@ -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) ? ">" : " ");
|
||||
|
|
Loading…
Reference in New Issue