mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 15:08:19 +00:00
Merge #3039
3039: Show friends on spectate tab r=def- a=ardadem ![2020-10-08-13:22:48-screenshot](https://user-images.githubusercontent.com/13207692/95447050-d5e98880-0969-11eb-923a-2b647933774d.png) ![2020-10-08-13:23:14-screenshot](https://user-images.githubusercontent.com/13207692/95447054-d71ab580-0969-11eb-8ace-a893cfa80a97.png) Co-authored-by: Arda Demir <ddmirarda@gmail.com>
This commit is contained in:
commit
b208ee3a81
|
@ -293,7 +293,7 @@ void CSpectator::OnRender()
|
||||||
TextRender()->Text(0, Width / 2.0f - (ObjWidth - 350.0f), Height / 2.0f - 280.0f + (60.f - BigFontSize) / 2.f, BigFontSize, Localize("Follow"), -1.0f);
|
TextRender()->Text(0, Width / 2.0f - (ObjWidth - 350.0f), Height / 2.0f - 280.0f + (60.f - BigFontSize) / 2.f, BigFontSize, Localize("Follow"), -1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
float x = -(ObjWidth - 30.0f), y = StartY;
|
float x = -(ObjWidth - 35.0f), y = StartY;
|
||||||
|
|
||||||
int OldDDTeam = -1;
|
int OldDDTeam = -1;
|
||||||
|
|
||||||
|
@ -410,6 +410,13 @@ void CSpectator::OnRender()
|
||||||
TeeInfo.m_Size *= TeeSizeMod;
|
TeeInfo.m_Size *= TeeSizeMod;
|
||||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeeInfo, EMOTE_NORMAL, vec2(1.0f, 0.0f), vec2(Width / 2.0f + x + 20.0f, Height / 2.0f + y + 20.0f), TeeAlpha);
|
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeeInfo, EMOTE_NORMAL, vec2(1.0f, 0.0f), vec2(Width / 2.0f + x + 20.0f, Height / 2.0f + y + 20.0f), TeeAlpha);
|
||||||
|
|
||||||
|
if(m_pClient->m_aClients[m_pClient->m_Snap.m_paInfoByDDTeamName[i]->m_ClientID].m_Friend)
|
||||||
|
{
|
||||||
|
TextRender()->TextColor(1.0f, 0.3f, 0.3f, 1.0f);
|
||||||
|
TextRender()->Text(0, Width / 2.0f + x - TeeInfo.m_Size / 2.0f, Height / 2.0f + y + BoxMove + (LineHeight - FontSize) / 2.f, FontSize, "♥ ", 220.0f);
|
||||||
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
y += LineHeight;
|
y += LineHeight;
|
||||||
}
|
}
|
||||||
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
|
Loading…
Reference in a new issue