mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #1578 from Ryozuki/add_clan_color
Add clan color to people with same clan as you (and yourself)
This commit is contained in:
commit
dfa06696d6
|
@ -473,14 +473,24 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
|
||||||
Cursor.m_LineWidth = NameLength;
|
Cursor.m_LineWidth = NameLength;
|
||||||
TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1);
|
TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aName, -1);
|
||||||
}
|
}
|
||||||
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
|
|
||||||
// clan
|
// clan
|
||||||
tw = TextRender()->TextWidth(0, FontSize, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1);
|
if(str_comp(m_pClient->m_aClients[pInfo->m_ClientID].m_aClan,
|
||||||
TextRender()->SetCursor(&Cursor, ClanOffset+ClanLength/2-tw/2, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
m_pClient->m_aClients[GameClient()->m_LocalIDs[0]].m_aClan) == 0)
|
||||||
|
{
|
||||||
|
vec4 Color = m_pClient->m_pSkins->GetColorV4(g_Config.m_ClSameClanColor);
|
||||||
|
TextRender()->TextColor(Color.r, Color.g, Color.b, Color.a);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
|
tw = TextRender()->TextWidth(nullptr, FontSize, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1);
|
||||||
|
TextRender()->SetCursor(&Cursor, ClanOffset + ClanLength / 2 - tw / 2, y + (LineHeight - FontSize) / 2.f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||||
Cursor.m_LineWidth = ClanLength;
|
Cursor.m_LineWidth = ClanLength;
|
||||||
TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1);
|
TextRender()->TextEx(&Cursor, m_pClient->m_aClients[pInfo->m_ClientID].m_aClan, -1);
|
||||||
|
|
||||||
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
// country flag
|
// country flag
|
||||||
vec4 Color(1.0f, 1.0f, 1.0f, 0.5f);
|
vec4 Color(1.0f, 1.0f, 1.0f, 0.5f);
|
||||||
m_pClient->m_pCountryFlags->Render(m_pClient->m_aClients[pInfo->m_ClientID].m_Country, &Color,
|
m_pClient->m_pCountryFlags->Render(m_pClient->m_aClients[pInfo->m_ClientID].m_Country, &Color,
|
||||||
|
|
|
@ -20,6 +20,7 @@ MACRO_CONFIG_INT(ClNameplatesClanSize, cl_nameplates_clan_size, 30, 0, 100, CFGF
|
||||||
MACRO_CONFIG_INT(ClNameplatesOwn, cl_nameplates_own, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show own name plate (useful for demo recording)")
|
MACRO_CONFIG_INT(ClNameplatesOwn, cl_nameplates_own, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show own name plate (useful for demo recording)")
|
||||||
MACRO_CONFIG_INT(ClTextEntities, cl_text_entities, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Render textual entity data")
|
MACRO_CONFIG_INT(ClTextEntities, cl_text_entities, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Render textual entity data")
|
||||||
MACRO_CONFIG_INT(ClAuthedPlayerColor, cl_authed_player_color, 5898183, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Color of name of authenticated player in scoreboard")
|
MACRO_CONFIG_INT(ClAuthedPlayerColor, cl_authed_player_color, 5898183, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Color of name of authenticated player in scoreboard")
|
||||||
|
MACRO_CONFIG_INT(ClSameClanColor, cl_same_clan_color, 5898183, 0, 0xFFFFFF, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Clan color of players with the same clan as you in scoreboard.")
|
||||||
MACRO_CONFIG_INT(ClEnablePingColor, cl_enable_ping_color, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether ping is colored in scoreboard.")
|
MACRO_CONFIG_INT(ClEnablePingColor, cl_enable_ping_color, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether ping is colored in scoreboard.")
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup")
|
MACRO_CONFIG_INT(ClAutoswitchWeapons, cl_autoswitch_weapons, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Auto switch weapon on pickup")
|
||||||
|
|
Loading…
Reference in a new issue