mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
fix HUD widgets not erased properly sometimes
This commit is contained in:
parent
23cff1e384
commit
e0d30bbe6e
13
src/hu_lib.c
13
src/hu_lib.c
@ -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);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user