Merge pull request #3 from borti4938/master

Select previous item (dbl klick) on first element wraps around to last item
This commit is contained in:
sanni 2016-08-22 10:17:00 +02:00 committed by GitHub
commit 1160b9bd94

View File

@ -861,9 +861,9 @@ unsigned char questionBox_OLED(const char* question, char answers[7][20], int nu
break; break;
} }
} }
else if (choice > 0) { else
choice--; choice = (choice > 0) ? choice - 1 : num_answers - 1;
}
// draw selection box // draw selection box
display.drawPixel(0, 8 * choice + 12, WHITE); display.drawPixel(0, 8 * choice + 12, WHITE);