};
enum {
- MENU_MARGIN_TOP = 2,
- MENU_MARGIN_BOTTOM = 3,
+ MENU_MARGIN_TOP = 3,
+ MENU_MARGIN_BOTTOM = 2,
MENU_MARGIN_LEFT = 3,
MENU_ENTRIES_HEIGHT = 1 + BADGE_FONT_HEIGHT,
MENU_ENTRIES_VISIBLE = (BADGE_DISPLAY_HEIGHT - MENU_MARGIN_TOP - MENU_MARGIN_BOTTOM) / MENU_ENTRIES_HEIGHT
size_t first_used_row = 0;
size_t used_rows = MENU_ENTRIES_VISIBLE;
+ if(selected >= n) {
+ selected = n - 1;
+ }
+
if(n <= MENU_ENTRIES_VISIBLE) {
*first_visible = 0;
used_rows = n;