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

Function tty_preference_update

win/tty/wintty.c:595–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593}
594
595void
596tty_preference_update(const char *pref)
597{
598 boolean newstatuslines = (!strcmp(pref, "statuslines")
599 && iflags.window_inited);
600
601 if (newstatuslines) {
602 new_status_window();
603 newclipping(u.ux, u.uy);
604 }
605
606#if defined(WIN32CON)
607 consoletty_preference_update(pref);
608#else
609 genl_preference_update(pref);
610#endif
611#ifdef TTY_PERM_INVENT
612 /* the boundary box around persistent inventory is drawn with wall
613 symbols, so if player changes to a different symbol set (other
614 than temporary switch to the rogue one), redraw perm_invent; not
615 only might individual symbols change (punctuation vs line drawing),
616 the way to render them might change too (Handling: DEC/UTF8/&c) */
617 if ((!strcmp(pref, "symset") || !strcmp(pref, "perm_invent"))
618 && iflags.window_inited) {
619 if (WIN_INVEN != WIN_ERR)
620 tty_invent_box_glyph_init(wins[WIN_INVEN]);
621 }
622 /* if newstatuslines has been toggled between 2 and 3 or vice versa
623 then we want to reposition the perm_invent window to match */
624 if (newstatuslines && WIN_INVEN != WIN_ERR) {
625 perm_invent_toggled(TRUE); /*TEMP?*/
626 tty_destroy_nhwindow(WIN_INVEN), WIN_INVEN = WIN_ERR;
627 perm_invent_toggled(FALSE); /*TEMP?*/
628 }
629#endif
630 return;
631}
632
633void
634tty_player_selection(void)

Callers

nothing calls this directly

Calls 6

new_status_windowFunction · 0.85
newclippingFunction · 0.85
genl_preference_updateFunction · 0.85
perm_invent_toggledFunction · 0.85
tty_destroy_nhwindowFunction · 0.85

Tested by

no test coverage detected