mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1348
1348: increase max score that can be displayed in scoreboard r=Learath2 a=fokkonaut ![base profile screenshot 2018 10 11 - 22 15 10 80](https://user-images.githubusercontent.com/35420825/46831469-d31c2300-cda3-11e8-9a13-2814fd7621f3.png) its only for the positive numbers because negative should stay at max -999. level server for examples can often reach the players level over 1000, and then the scoreboard is just a mess. also its not looking bad and the numbers arent over the edge, so i personally think this is a good addition. as you can also see, scores over 99.999 (basically 100k) arent shown. another reason: times for ddrace scoreboard can be as long as they want. there is no display limit, so it doesnt make sense have such a small limit for non-ddrace-scoreboard Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
commit
963cec6976
|
@ -415,7 +415,7 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
|
|||
}
|
||||
}
|
||||
else
|
||||
str_format(aBuf, sizeof(aBuf), "%d", clamp(pInfo->m_Score, -999, 999));
|
||||
str_format(aBuf, sizeof(aBuf), "%d", clamp(pInfo->m_Score, -999, 99999));
|
||||
tw = TextRender()->TextWidth(0, FontSize, aBuf, -1);
|
||||
TextRender()->SetCursor(&Cursor, ScoreOffset+ScoreLength-tw, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER);
|
||||
TextRender()->TextEx(&Cursor, aBuf, -1);
|
||||
|
|
Loading…
Reference in a new issue