fix HUD widgets not erased properly sometimes

This commit is contained in:
Roman Fomin 2023-12-24 01:37:05 +07:00
parent 23cff1e384
commit e0d30bbe6e
2 changed files with 2 additions and 12 deletions

View File

@ -512,18 +512,7 @@ void HUlib_erase_widget (const hu_widget_t *const w)
const int height = m->numlines * f->line_height;
const int y = vert_align_widget(w, m, f, w->h_align, w->v_align);
if (y < scaledviewy || y >= scaledviewy + scaledviewheight)
{
// erase entire line
R_VideoErase(0, y, video.unscaledw, height);
}
else
{
// erase left border
R_VideoErase(0, y, scaledviewx, height);
// erase right border
R_VideoErase(scaledviewx + scaledviewwidth, y, scaledviewx, height);
}
R_VideoErase(0, y, video.unscaledw, height);
}
//----------------------------------------------------------------------------

View File

@ -1521,6 +1521,7 @@ void HU_Ticker(void)
boom_widget = boom_widgets[hud_active];
plr = &players[displayplayer]; // killough 3/7/98
HU_Erase();
HU_disable_all_widgets();
draw_crispy_hud = false;