mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8499 from Robyt3/Client-Spectate-HUD-Cleanup
Remove `Spectate` label from HUD, show `Following {player}` instead
This commit is contained in:
commit
f5d28f155a
|
@ -1384,7 +1384,18 @@ void CHud::RenderSpectatorHud()
|
|||
|
||||
// draw the text
|
||||
char aBuf[128];
|
||||
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Spectate"), GameClient()->m_MultiViewActivated ? Localize("Multi-View") : m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != SPEC_FREEVIEW ? m_pClient->m_aClients[m_pClient->m_Snap.m_SpecInfo.m_SpectatorId].m_aName : Localize("Free-View"));
|
||||
if(GameClient()->m_MultiViewActivated)
|
||||
{
|
||||
str_copy(aBuf, Localize("Multi-View"));
|
||||
}
|
||||
else if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorId != SPEC_FREEVIEW)
|
||||
{
|
||||
str_format(aBuf, sizeof(aBuf), Localize("Following %s", "Spectating"), m_pClient->m_aClients[m_pClient->m_Snap.m_SpecInfo.m_SpectatorId].m_aName);
|
||||
}
|
||||
else
|
||||
{
|
||||
str_copy(aBuf, Localize("Free-View"));
|
||||
}
|
||||
TextRender()->Text(m_Width - 174.0f, m_Height - 15.0f + (15.f - 8.f) / 2.f, 8.0f, aBuf, -1.0f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue