add_menu(winid wid, const glyph_info *glyphinfo, const anything identifier, char accelerator, char groupacc, int attr, int color, char *str, unsigned int itemflags) -- Add a text line str to the given menu window. If identifier is 0, th
| 693 | menu is displayed, set bit MENU_ITEMFLAGS_SELECTED. |
| 694 | */ |
| 695 | void |
| 696 | curses_add_menu(winid wid, const glyph_info *glyphinfo, |
| 697 | const ANY_P *identifier, |
| 698 | char accelerator, char group_accel, int attr, |
| 699 | int clr, const char *str, unsigned itemflags) |
| 700 | { |
| 701 | int curses_attr; |
| 702 | |
| 703 | attr &= ~(ATR_URGENT | ATR_NOHISTORY); |
| 704 | curses_attr = curses_convert_attr(attr); |
| 705 | |
| 706 | /* 'inv_update': 0 for normal menus, 1 and up for perminv window */ |
| 707 | if (inv_update) { |
| 708 | /* persistent inventory window; nothing is selectable; |
| 709 | omit glyphinfo because perm_invent is to the side of |
| 710 | the map so usually cramped for horizontal space */ |
| 711 | curs_add_invt(inv_update, accelerator, curses_attr, clr, str); |
| 712 | inv_update++; |
| 713 | return; |
| 714 | } |
| 715 | |
| 716 | curses_add_nhmenu_item(wid, glyphinfo, identifier, |
| 717 | accelerator, group_accel, |
| 718 | curses_attr, clr, str, itemflags); |
| 719 | } |
| 720 | |
| 721 | /* |
| 722 | end_menu(window, prompt) |
no test coverage detected