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

Function gnome_create_nhwindow_by_id

outdated/win/gnome/gnbind.c:423–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423void
424gnome_create_nhwindow_by_id(int type, winid i)
425{
426 switch (type) {
427 case NHW_MAP: {
428 gnome_windowlist[i].win = ghack_init_map_window();
429 gnome_windowlist[i].type = NHW_MAP;
430 ghack_main_window_add_map_window(gnome_windowlist[i].win);
431 break;
432 }
433 case NHW_MESSAGE: {
434 gnome_windowlist[i].win = ghack_init_message_window();
435 gnome_windowlist[i].type = NHW_MESSAGE;
436 ghack_main_window_add_message_window(gnome_windowlist[i].win);
437 break;
438 }
439 case NHW_STATUS: {
440 gnome_windowlist[i].win = ghack_init_status_window();
441 gnome_windowlist[i].type = NHW_STATUS;
442 ghack_main_window_add_status_window(gnome_windowlist[i].win);
443 break;
444 }
445 case NHW_WORN: {
446 gnome_windowlist[i].win = ghack_init_worn_window();
447 gnome_windowlist[i].type = NHW_WORN;
448 ghack_main_window_add_worn_window(gnome_windowlist[i].win);
449 break;
450 }
451 case NHW_MENU: {
452 gnome_windowlist[i].type = NHW_MENU;
453 gnome_windowlist[i].win = ghack_init_menu_window();
454 break;
455 }
456 case NHW_TEXT: {
457 gnome_windowlist[i].win = ghack_init_text_window();
458 gnome_windowlist[i].type = NHW_TEXT;
459 break;
460 }
461 }
462}
463
464/* This widget is being destroyed before its time--
465 * clear its entry from the windowlist.

Callers 2

gnome_create_nhwindowFunction · 0.85
gnome_start_menuFunction · 0.85

Tested by

no test coverage detected