MCPcopy Create free account
hub / github.com/NetHack/NetHack / mswin_end_menu

Function mswin_end_menu

win/win32/mswproc.c:1187–1200  ·  view source on GitHub ↗

end_menu(window, prompt) -- Stop adding entries to the menu and flushes the window to the screen (brings to front?). Prompt is a prompt to give the user. If prompt is NULL, no prompt will be printed. ** This probably shouldn't flush the window any more (if ** it ever did). That should be sel

Source from the content-addressed store, hash-verified

1185 ** it ever did). That should be select_menu's job. -dean
1186*/
1187void
1188mswin_end_menu(winid wid, const char *prompt)
1189{
1190 logDebug("mswin_end_menu(%d, %s)\n", wid, prompt);
1191 if ((wid >= 0) && (wid < MAXWINDOWS)
1192 && (GetNHApp()->windowlist[wid].win != NULL)) {
1193 MSNHMsgEndMenu data;
1194 ZeroMemory(&data, sizeof(data));
1195 data.text = prompt;
1196
1197 SendMessage(GetNHApp()->windowlist[wid].win, WM_MSNH_COMMAND,
1198 (WPARAM) MSNH_MSG_ENDMENU, (LPARAM) &data);
1199 }
1200}
1201
1202/*
1203int select_menu(windid window, int how, menu_item **selected)

Callers

nothing calls this directly

Calls 2

logDebugFunction · 0.70
GetNHAppFunction · 0.70

Tested by

no test coverage detected