menu: Add arrows to indicate overflow for many menu entries

This commit is contained in:
mintsuki 2022-10-07 08:49:13 +02:00
parent af80341c8c
commit d10d2baded

View File

@ -765,7 +765,15 @@ refresh:
print(serial ? "/" : "\xda");
for (size_t i = 0; i < term->cols - 2; i++) {
print(serial ? "-" : "\xc4");
switch (i) {
case 1: case 2: case 3:
if (tree_offset > 0) {
print(serial ? "^" : "\x18"); break;
}
// FALLTHRU
default:
print(serial ? "-" : "\xc4"); break;
}
}
print(serial ? "\\" : "\xbf");
@ -792,6 +800,12 @@ refresh:
{
size_t x, y;
term->get_cursor_pos(term, &x, &y);
if (tree_offset + (term->rows - 10) < max_entries) {
set_cursor_pos_helper(2, term->rows - 2);
print(serial ? "vvv" : "\x19\x19\x19");
}
set_cursor_pos_helper(0, 3);
if (editor_enabled && selected_menu_entry->sub == NULL) {
print(" \e[32mARROWS\e[0m Select \e[32mENTER\e[0m Boot \e[32mE\e[0m Edit");