mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Scoreboard headline for score can now be Time when on DDRace
This commit is contained in:
parent
f0cce859ef
commit
5c1dfe6b65
|
@ -285,9 +285,10 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
|
|||
// render headlines
|
||||
y += 50.0f;
|
||||
float HeadlineFontsize = 22.0f;
|
||||
float ScoreWidth = TextRender()->TextWidth(0, HeadlineFontsize, Localize("Score"), -1);
|
||||
const char* pScore = (m_IsGameTypeRace && g_Config.m_ClDDRaceScoreBoard && m_pClient->m_AllowTimeScore[g_Config.m_ClDummy]) ? Localize("Time") : Localize("Score");
|
||||
float ScoreWidth = TextRender()->TextWidth(0, HeadlineFontsize, pScore, -1);
|
||||
tw = ScoreLength > ScoreWidth ? ScoreLength : ScoreWidth;
|
||||
TextRender()->Text(0, ScoreOffset+ScoreLength-tw, y + (HeadlineFontsize * 2.f - HeadlineFontsize) / 2.f, HeadlineFontsize, Localize("Score"), -1);
|
||||
TextRender()->Text(0, ScoreOffset+ScoreLength-tw, y + (HeadlineFontsize * 2.f - HeadlineFontsize) / 2.f, HeadlineFontsize, pScore, -1);
|
||||
|
||||
TextRender()->Text(0, NameOffset, y + (HeadlineFontsize * 2.f - HeadlineFontsize) / 2.f, HeadlineFontsize, Localize("Name"), -1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue