- *selected = badge_menu(menu_index, i, first_visible, *selected);
+ strcpy(menu_buf[i], "exit");
+ menu_index[i] = menu_buf[i];
+ size_t choice = badge_menu(menu_index, i + 1, first_visible, *selected);
+
+ if(choice == levelcount) {
+ return 1; // exit
+ }