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

Function curses_create_nhwindow

win/curses/cursmain.c:433–450  ·  view source on GitHub ↗

Create a window of type "type" which can be NHW_MESSAGE (top line) NHW_STATUS (bottom lines) NHW_MAP (main dungeon) NHW_MENU (inventory or other "corner" windows) NHW_TEXT (help/text, full screen paged window) */

Source from the content-addressed store, hash-verified

431 NHW_TEXT (help/text, full screen paged window)
432*/
433winid
434curses_create_nhwindow(int type)
435{
436 winid wid = curses_get_wid(type);
437
438 if (curses_is_menu(wid))
439 curses_parse_wid_colors(MENU_WIN, iflags.wcolors[wcolor_menu].fg,
440 iflags.wcolors[wcolor_menu].bg);
441 else if (curses_is_text(wid))
442 curses_parse_wid_colors(TEXT_WIN, iflags.wcolors[wcolor_text].fg,
443 iflags.wcolors[wcolor_text].bg);
444 if (curses_is_menu(wid) || curses_is_text(wid)) {
445 curses_start_menu(wid, MENU_BEHAVE_STANDARD);
446 curses_add_wid(wid);
447 }
448
449 return wid;
450}
451
452
453/* Clear the given window, when asked to. */

Callers

nothing calls this directly

Calls 6

curses_get_widFunction · 0.85
curses_is_menuFunction · 0.85
curses_parse_wid_colorsFunction · 0.85
curses_is_textFunction · 0.85
curses_start_menuFunction · 0.85
curses_add_widFunction · 0.85

Tested by

no test coverage detected