mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-12 19:18:20 +00:00
no goals hud when empty
This commit is contained in:
parent
edab7c0e8c
commit
379d93ae7b
|
@ -90,10 +90,8 @@ void CScoreboard::RenderGoals(float x, float y, float w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CScoreboard::RenderSpectators(float x, float y, float w)
|
void CScoreboard::RenderSpectators(float x, float y, float w, float h)
|
||||||
{
|
{
|
||||||
float h = 140.0f;
|
|
||||||
|
|
||||||
// background
|
// background
|
||||||
Graphics()->BlendNormal();
|
Graphics()->BlendNormal();
|
||||||
Graphics()->TextureClear();
|
Graphics()->TextureClear();
|
||||||
|
@ -686,9 +684,16 @@ void CScoreboard::OnRender()
|
||||||
RenderScoreboard(Width / 2 + 5.0f, 150.0f, w, TEAM_BLUE, pBlueClanName ? pBlueClanName : Localize("Blue team"), NumPlayers);
|
RenderScoreboard(Width / 2 + 5.0f, 150.0f, w, TEAM_BLUE, pBlueClanName ? pBlueClanName : Localize("Blue team"), NumPlayers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(m_pClient->m_Snap.m_pGameInfoObj && (m_pClient->m_Snap.m_pGameInfoObj->m_ScoreLimit || m_pClient->m_Snap.m_pGameInfoObj->m_TimeLimit || (m_pClient->m_Snap.m_pGameInfoObj->m_RoundNum && m_pClient->m_Snap.m_pGameInfoObj->m_RoundCurrent)))
|
||||||
|
{
|
||||||
RenderGoals(Width / 2 - w / 2, 150 + 760 + 10, w);
|
RenderGoals(Width / 2 - w / 2, 150 + 760 + 10, w);
|
||||||
RenderSpectators(Width / 2 - w / 2, 150 + 760 + 10 + 50 + 10, w);
|
RenderSpectators(Width / 2 - w / 2, 150 + 760 + 10 + 50 + 10, w, 160.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RenderSpectators(Width / 2 - w / 2, 150 + 760 + 10, w, 200.0f);
|
||||||
|
}
|
||||||
|
|
||||||
RenderRecordingNotification((Width / 7) * 4 + 20);
|
RenderRecordingNotification((Width / 7) * 4 + 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
class CScoreboard : public CComponent
|
class CScoreboard : public CComponent
|
||||||
{
|
{
|
||||||
void RenderGoals(float x, float y, float w);
|
void RenderGoals(float x, float y, float w);
|
||||||
void RenderSpectators(float x, float y, float w);
|
void RenderSpectators(float x, float y, float w, float h);
|
||||||
void RenderScoreboard(float x, float y, float w, int Team, const char *pTitle, int NumPlayers = -1);
|
void RenderScoreboard(float x, float y, float w, int Team, const char *pTitle, int NumPlayers = -1);
|
||||||
void RenderRecordingNotification(float x);
|
void RenderRecordingNotification(float x);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue