Skip to content

Commit

Permalink
Client: HUD: DeathNoticePanel: Fix minimum size
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Nov 25, 2023
1 parent f997b8d commit d0f24a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/game/client/hud/death_notice_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ CHudDeathNoticePanel::CHudDeathNoticePanel()
void CHudDeathNoticePanel::VidInit()
{
m_HUD_d_skull = gHUD.GetSpriteIndex("d_skull");

int cornerWide, cornerTall;
GetCornerTextureSize(cornerWide, cornerTall);

int minRowTall = std::max(cornerTall * 2, gHUD.GetSpriteRect(m_HUD_d_skull).GetHeight());
m_iRowTall = std::max(m_iRowHeight, minRowTall);
}

void CHudDeathNoticePanel::InitHudData()
Expand Down Expand Up @@ -184,12 +190,6 @@ void CHudDeathNoticePanel::AddItem(int killerId, int victimId, const char *kille
void CHudDeathNoticePanel::ApplySettings(KeyValues *inResourceData)
{
BaseClass::ApplySettings(inResourceData);

int cornerWide, cornerTall;
GetCornerTextureSize(cornerWide, cornerTall);

int minRowTall = std::max(cornerTall * 2, SKULL_SPRITE_HEIGHT);
m_iRowTall = std::max(m_iRowHeight, minRowTall);
}

void CHudDeathNoticePanel::PaintBackground()
Expand Down

0 comments on commit d0f24a7

Please sign in to comment.