mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
colorized background of entries in the server browser scoreboard so it's more obvious what belongs together
This commit is contained in:
parent
73bc6afb67
commit
246cbed786
|
@ -619,23 +619,24 @@ void CMenus::RenderServerbrowserServerDetail(CUIRect View)
|
|||
|
||||
if (pSelectedServer)
|
||||
{
|
||||
ServerScoreBoard.VSplitLeft(5.0f, 0, &ServerScoreBoard);
|
||||
ServerScoreBoard.Margin(3.0f, &ServerScoreBoard);
|
||||
for (int i = 0; i < pSelectedServer->m_NumClients; i++)
|
||||
{
|
||||
CUIRect Name, Clan, Score, Flag;
|
||||
ServerScoreBoard.HSplitTop(25.0f, &Name, &ServerScoreBoard);
|
||||
RenderTools()->DrawUIRect(&Name, vec4(1,1,1,(i%2+1)*0.05f), CUI::CORNER_ALL, 4.0f);
|
||||
Name.VSplitLeft(5.0f, 0, &Name);
|
||||
Name.VSplitLeft(30.0f, &Score, &Name);
|
||||
Name.VSplitRight(34.0f, &Name, &Flag);
|
||||
Flag.HMargin(4.0f, &Flag);
|
||||
Name.HSplitTop(12.0f, &Name, &Clan);
|
||||
Name.HSplitTop(11.0f, &Name, &Clan);
|
||||
|
||||
// score
|
||||
if(pSelectedServer->m_aClients[i].m_Player)
|
||||
{
|
||||
char aTemp[16];
|
||||
str_format(aTemp, sizeof(aTemp), "%d", pSelectedServer->m_aClients[i].m_Score);
|
||||
TextRender()->SetCursor(&Cursor, Score.x, Score.y+(Score.h-FontSize)/2.0f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||
TextRender()->SetCursor(&Cursor, Score.x, Score.y+(Score.h-FontSize)/4.0f, FontSize, TEXTFLAG_RENDER|TEXTFLAG_STOP_AT_END);
|
||||
Cursor.m_LineWidth = Score.w;
|
||||
TextRender()->TextEx(&Cursor, aTemp, -1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue