Add options and flags for menu styles similar to those existing for

popups, from Alexis Hildebrandt. GitHub issue 3650.
This commit is contained in:
nicm
2023-08-08 08:08:47 +00:00
parent 1071ef8fc5
commit dee72ed41f
7 changed files with 115 additions and 27 deletions

View File

@ -713,15 +713,16 @@ screen_write_menu(struct screen_write_ctx *ctx, struct menu *menu, int choice,
name = menu->items[i].name;
if (name == NULL) {
screen_write_cursormove(ctx, cx, cy + 1 + i, 0);
screen_write_hline(ctx, width + 4, 1, 1, lines, gc);
screen_write_hline(ctx, width + 4, 1, 1, lines,
border_gc);
continue;
}
if (choice >= 0 && i == (u_int)choice && *name != '-')
gc = choice_gc;
screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);
for (j = 0; j < width; j++)
screen_write_cursormove(ctx, cx + 1, cy + 1 + i, 0);
for (j = 0; j < width + 2; j++)
screen_write_putc(ctx, gc, ' ');
screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);