mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 09:12:19 +00:00
Add spectator clans rendering in scoreboard
Show client ID before spectator clan
This commit is contained in:
parent
ef6fd80bc5
commit
ae364942c8
|
@ -199,17 +199,39 @@ void CScoreboard::RenderSpectators(CUIRect Spectators)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(GameClient()->m_aClients[pInfo->m_ClientId].m_AuthLevel)
|
|
||||||
{
|
|
||||||
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClAuthedPlayerColor)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(g_Config.m_ClShowIds)
|
if(g_Config.m_ClShowIds)
|
||||||
{
|
{
|
||||||
char aClientId[5];
|
char aClientId[5];
|
||||||
str_format(aClientId, sizeof(aClientId), "%d: ", pInfo->m_ClientId);
|
str_format(aClientId, sizeof(aClientId), "%d: ", pInfo->m_ClientId);
|
||||||
TextRender()->TextEx(&Cursor, aClientId);
|
TextRender()->TextEx(&Cursor, aClientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
const char *pClanName = GameClient()->m_aClients[pInfo->m_ClientId].m_aClan;
|
||||||
|
|
||||||
|
if(pClanName[0] != '\0')
|
||||||
|
{
|
||||||
|
if(str_comp(pClanName, GameClient()->m_aClients[GameClient()->m_aLocalIds[g_Config.m_ClDummy]].m_aClan) == 0)
|
||||||
|
{
|
||||||
|
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClSameClanColor)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextRender()->TextColor(ColorRGBA(0.7f, 0.7f, 0.7f));
|
||||||
|
}
|
||||||
|
|
||||||
|
TextRender()->TextEx(&Cursor, pClanName);
|
||||||
|
TextRender()->TextEx(&Cursor, " ");
|
||||||
|
|
||||||
|
TextRender()->TextColor(TextRender()->DefaultTextColor());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GameClient()->m_aClients[pInfo->m_ClientId].m_AuthLevel)
|
||||||
|
{
|
||||||
|
TextRender()->TextColor(color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClAuthedPlayerColor)));
|
||||||
|
}
|
||||||
|
|
||||||
TextRender()->TextEx(&Cursor, GameClient()->m_aClients[pInfo->m_ClientId].m_aName);
|
TextRender()->TextEx(&Cursor, GameClient()->m_aClients[pInfo->m_ClientId].m_aName);
|
||||||
TextRender()->TextColor(TextRender()->DefaultTextColor());
|
TextRender()->TextColor(TextRender()->DefaultTextColor());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue