mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
Finish time in HUD: Show hours
This commit is contained in:
parent
b3769a069c
commit
0748ad7a6b
|
@ -943,6 +943,9 @@ void CHud::RenderDDRaceEffects()
|
||||||
char aBuf[64];
|
char aBuf[64];
|
||||||
if(m_FinishTime)
|
if(m_FinishTime)
|
||||||
{
|
{
|
||||||
|
if(m_DDRaceTime > 360000)
|
||||||
|
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d:%02d.%02d", m_DDRaceTime / 360000, (m_DDRaceTime % 360000) / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
||||||
|
else
|
||||||
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d.%02d", m_DDRaceTime / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
str_format(aBuf, sizeof(aBuf), "Finish time: %02d:%02d.%02d", m_DDRaceTime / 6000, m_DDRaceTime / 100 - m_DDRaceTime / 6000 * 60, m_DDRaceTime % 100);
|
||||||
TextRender()->Text(0, 150 * Graphics()->ScreenAspect() - TextRender()->TextWidth(0, 12, aBuf, -1, -1.0f) / 2, 20, 12, aBuf, -1.0f);
|
TextRender()->Text(0, 150 * Graphics()->ScreenAspect() - TextRender()->TextWidth(0, 12, aBuf, -1, -1.0f) / 2, 20, 12, aBuf, -1.0f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue