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

Function rearrange_windows

outdated/win/gem/wingem1.c:527–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525 mar_set_fontbyid(type, id, size);
526}
527void
528rearrange_windows(void)
529{
530 GRECT area;
531 int todo = TRUE;
532 if (WIN_MAP != WIN_ERR && Gem_nhwindow[WIN_MAP].gw_window) {
533 scroll_map.px_hline =
534 mar_set_tile_mode(FAIL) ? Tile_width : map_font.cw;
535 scroll_map.px_vline =
536 mar_set_tile_mode(FAIL) ? Tile_heigth : map_font.ch;
537 if (todo) {
538 calc_std_winplace(FAIL, &area);
539 todo = FALSE;
540 }
541 calc_std_winplace(NHW_MAP, &area);
542 Gem_nhwindow[WIN_MAP].gw_window->max.g_w = area.g_w;
543 Gem_nhwindow[WIN_MAP].gw_window->max.g_h = area.g_h;
544 Gem_nhwindow[WIN_MAP].gw_window->max.g_w = area.g_w;
545 window_reinit(Gem_nhwindow[WIN_MAP].gw_window, md, md, NULL, FALSE,
546 FALSE);
547 {
548 int buf[8];
549 buf[3] = K_CTRL;
550 buf[4] = C('L');
551 AvSendMsg(ap_id, AV_SENDKEY, buf);
552 }
553 }
554 if (WIN_MESSAGE != WIN_ERR && Gem_nhwindow[WIN_MESSAGE].gw_window) {
555 if (todo) {
556 calc_std_winplace(FAIL, &area);
557 todo = FALSE;
558 }
559 calc_std_winplace(NHW_MESSAGE, &area);
560 Gem_nhwindow[WIN_MESSAGE].gw_window->min_h = area.g_h;
561 window_size(Gem_nhwindow[WIN_MESSAGE].gw_window, &area);
562 redraw_window(Gem_nhwindow[WIN_MESSAGE].gw_window, NULL);
563 }
564 if (WIN_STATUS != WIN_ERR && Gem_nhwindow[WIN_STATUS].gw_window) {
565 if (todo) {
566 calc_std_winplace(FAIL, &area);
567 todo = FALSE;
568 }
569 calc_std_winplace(NHW_STATUS, &area);
570 Gem_nhwindow[WIN_STATUS].gw_window->min_h = area.g_h;
571 window_size(Gem_nhwindow[WIN_STATUS].gw_window, &area);
572 redraw_window(Gem_nhwindow[WIN_STATUS].gw_window, NULL);
573 }
574}
575void
576my_color_area(GRECT *area, int col)
577{

Callers 4

mar_set_status_alignFunction · 0.85
mar_set_msg_alignFunction · 0.85
mar_set_msg_visibleFunction · 0.85
mar_set_fontbyidFunction · 0.85

Calls 2

mar_set_tile_modeFunction · 0.85
calc_std_winplaceFunction · 0.85

Tested by

no test coverage detected