- Player icons that are taller than the small font will now expand the vertical size of the

player bars on the scoreboard.
- Fixed: Having +showscores down during the intermission would draw both the regular intermission
  scoreboard plus the HUD scoreboard.
- Fixed: hu_scores used the player icon's unscaled width when calculating sizes.


SVN r3815 (trunk)
This commit is contained in:
Randy Heit 2012-08-10 02:49:41 +00:00
commit 5c702e66e2
4 changed files with 39 additions and 24 deletions

View file

@ -1588,8 +1588,8 @@ void WI_updateNetgameStats ()
void WI_drawNetgameStats ()
{
int i, x, y, height;
int maxnamewidth, maxscorewidth;
int i, x, y, ypadding, height, lineheight;
int maxnamewidth, maxscorewidth, maxiconheight;
int pwidth = IntermissionFont->GetCharWidth('%');
int icon_x, name_x, kills_x, bonus_x, secret_x;
int bonus_len, secret_len;
@ -1602,8 +1602,10 @@ void WI_drawNetgameStats ()
y = WI_drawLF();
HU_GetPlayerWidths(maxnamewidth, maxscorewidth);
HU_GetPlayerWidths(maxnamewidth, maxscorewidth, maxiconheight);
height = SmallFont->GetHeight() * CleanYfac;
lineheight = MAX(height, maxiconheight * CleanYfac);
ypadding = (lineheight - height + 1) / 2;
y += 16*CleanYfac;
bonus_label = (gameinfo.gametype & GAME_Raven) ? "BONUS" : "ITEMS";
@ -1642,27 +1644,27 @@ void WI_drawNetgameStats ()
continue;
player = &players[i];
HU_DrawColorBar(x, y, height, i);
HU_DrawColorBar(x, y, lineheight, i);
color = (EColorRange)HU_GetRowColor(player, i == consoleplayer);
if (player->mo->ScoreIcon.isValid())
{
FTexture *pic = TexMan[player->mo->ScoreIcon];
screen->DrawTexture(pic, icon_x, y, DTA_CleanNoMove, true, TAG_DONE);
}
screen->DrawText(SmallFont, color, name_x, y, player->userinfo.netname, DTA_CleanNoMove, true, TAG_DONE);
WI_drawPercent(SmallFont, kills_x, y, cnt_kills[i], wbs->maxkills, false, color);
screen->DrawText(SmallFont, color, name_x, y + ypadding, player->userinfo.netname, DTA_CleanNoMove, true, TAG_DONE);
WI_drawPercent(SmallFont, kills_x, y + ypadding, cnt_kills[i], wbs->maxkills, false, color);
missed_kills -= cnt_kills[i];
if (ng_state >= 4)
{
WI_drawPercent(SmallFont, bonus_x, y, cnt_items[i], wbs->maxitems, false, color);
WI_drawPercent(SmallFont, bonus_x, y + ypadding, cnt_items[i], wbs->maxitems, false, color);
missed_items -= cnt_items[i];
if (ng_state >= 6)
{
WI_drawPercent(SmallFont, secret_x, y, cnt_secret[i], wbs->maxsecret, false, color);
WI_drawPercent(SmallFont, secret_x, y + ypadding, cnt_secret[i], wbs->maxsecret, false, color);
missed_secrets -= cnt_secret[i];
}
}
y += height + CleanYfac;
y += lineheight + CleanYfac;
}
// Draw "MISSED" line