Fix up arrow glitch, and make it roll over to end of menu too
This commit is contained in:
parent
c2f150d4ff
commit
9344eb1fca
|
@ -212,6 +212,9 @@ void drawmenu(MENU thismenu[], int size) {
|
||||||
DISP.fillScreen(BGCOLOR);
|
DISP.fillScreen(BGCOLOR);
|
||||||
DISP.setCursor(0, 5, 1);
|
DISP.setCursor(0, 5, 1);
|
||||||
// scrolling menu
|
// scrolling menu
|
||||||
|
if (cursor < 0) {
|
||||||
|
cursor = size - 1; // rollover hack for up-arrow on cardputer
|
||||||
|
}
|
||||||
if (cursor > 5) {
|
if (cursor > 5) {
|
||||||
for ( int i = 0 + (cursor - 5) ; i < size ; i++ ) {
|
for ( int i = 0 + (cursor - 5) ; i < size ; i++ ) {
|
||||||
DISP.print((cursor == i) ? ">" : " ");
|
DISP.print((cursor == i) ? ">" : " ");
|
||||||
|
|
Loading…
Reference in New Issue