mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3306
3306: Respect friend color in spectate mode ♥ too r=Jupeyy a=def- As suggested by Cøke ![screenshot_2020-11-12_19-17-01](https://user-images.githubusercontent.com/2335377/98979616-d7cfda00-251b-11eb-857d-b592655ef538.png) ## Checklist - [x] Tested the change ingame - [x] Provided screenshots if it is a visual change - [x] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [x] Considered possible null pointers and out of bounds array indexing - [x] Changed no physics that affect existing maps - [x] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
5602d3e9fb
|
@ -417,8 +417,9 @@ void CSpectator::OnRender()
|
||||||
|
|
||||||
if(m_pClient->m_aClients[m_pClient->m_Snap.m_paInfoByDDTeamName[i]->m_ClientID].m_Friend)
|
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);
|
ColorRGBA rgb = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageFriendColor));
|
||||||
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(rgb.WithAlpha(1.f));
|
||||||
|
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);
|
TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue