int select_menu(windid window, int how, menu_item **selected) -- Return the number of items selected; 0 if none were chosen, -1 when explicitly cancelled. If items were selected, then selected is filled in with an allocated array of menu_item structures, one for each selected line. The caller must free th
| 1225 | create_nhwindow() time. |
| 1226 | */ |
| 1227 | int |
| 1228 | mswin_select_menu(winid wid, int how, MENU_ITEM_P **selected) |
| 1229 | { |
| 1230 | int nReturned = -1; |
| 1231 | |
| 1232 | logDebug("mswin_select_menu(%d, %d)\n", wid, how); |
| 1233 | |
| 1234 | if ((wid >= 0) && (wid < MAXWINDOWS) |
| 1235 | && (GetNHApp()->windowlist[wid].win != NULL)) { |
| 1236 | ShowWindow(GetNHApp()->windowlist[wid].win, SW_SHOW); |
| 1237 | nReturned = mswin_menu_window_select_menu( |
| 1238 | GetNHApp()->windowlist[wid].win, how, selected, |
| 1239 | !(iflags.perm_invent && wid == WIN_INVEN |
| 1240 | && how == PICK_NONE) /* don't activate inventory window if |
| 1241 | perm_invent is on */ |
| 1242 | ); |
| 1243 | } |
| 1244 | return nReturned; |
| 1245 | } |
| 1246 | |
| 1247 | /* |
| 1248 | -- Indicate to the window port that the inventory has been changed. |
nothing calls this directly
no test coverage detected