4 int menu_ejecutar(t_Menu opciones, int cant, char *title)
11 items = (ITEM **)calloc(cant+1, sizeof(ITEM *));
13 for(c=0; c<cant; c++) {
14 items[c] = new_item(opciones[c].opt, opciones[c].desc);
18 menu = new_menu((ITEM **)items);
19 menu_win = newwin(cant+4, COLS-2, 3, 1);
20 keypad(menu_win, TRUE);
21 set_menu_mark(menu, " > ");
22 set_menu_win(menu, menu_win);
23 set_menu_sub(menu, derwin(menu_win, cant, COLS-4, 3, 1));
26 mvwaddch(menu_win, 2, 0, ACS_LTEE);
27 mvwhline(menu_win, 2, 1, ACS_HLINE, COLS-3);
28 mvwaddch(menu_win, 2, COLS-3, ACS_RTEE);
29 wattron(menu_win, COLOR_PAIR(COLOR_RED));
30 mvwaddstr(menu_win, 1, 1, title);
31 wattroff(menu_win, COLOR_PAIR(COLOR_RED));
41 menu_driver(menu, REQ_DOWN_ITEM);
44 menu_driver(menu, REQ_UP_ITEM);
50 cur = current_item(menu);
51 for(c=0; c<cant; c++) {
52 if (strcmp(opciones[c].opt, item_name(cur)) == 0) {