mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
show clanmates in different color
This commit is contained in:
parent
093edb7803
commit
fc23f451b2
|
@ -1085,9 +1085,21 @@ void CMenus::RenderServerbrowserInfoScoreboard(CUIRect View, const CServerInfo *
|
||||||
CUIRect Skin, Name, Clan, Score, Flag;
|
CUIRect Skin, Name, Clan, Score, Flag;
|
||||||
Name = Item.m_Rect;
|
Name = Item.m_Rect;
|
||||||
|
|
||||||
ColorRGBA Color = CurrentClient.m_FriendState == IFriends::FRIEND_NO ?
|
ColorRGBA Color;
|
||||||
ColorRGBA(1.0f, 1.0f, 1.0f, (i % 2 + 1) * 0.05f) :
|
const float alpha = (i % 2 + 1) * 0.05f;
|
||||||
ColorRGBA(0.5f, 1.0f, 0.5f, 0.15f + (i % 2 + 1) * 0.05f);
|
switch(CurrentClient.m_FriendState)
|
||||||
|
{
|
||||||
|
case IFriends::FRIEND_NO:
|
||||||
|
Color = ColorRGBA(1.0f, 1.0f, 1.0f, alpha);
|
||||||
|
break;
|
||||||
|
case IFriends::FRIEND_PLAYER:
|
||||||
|
Color = ColorRGBA(0.5f, 1.0f, 0.5f, 0.15f + alpha);
|
||||||
|
break;
|
||||||
|
case IFriends::FRIEND_CLAN:
|
||||||
|
Color = ColorRGBA(0.4f, 0.4f, 1.0f, 0.15f + alpha);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
Name.Draw(Color, IGraphics::CORNER_ALL, 4.0f);
|
Name.Draw(Color, IGraphics::CORNER_ALL, 4.0f);
|
||||||
Name.VSplitLeft(1.0f, nullptr, &Name);
|
Name.VSplitLeft(1.0f, nullptr, &Name);
|
||||||
Name.VSplitLeft(34.0f, &Score, &Name);
|
Name.VSplitLeft(34.0f, &Score, &Name);
|
||||||
|
|
Loading…
Reference in a new issue