mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-17 13:38:18 +00:00
Fix colors on repeated client msg
This commit is contained in:
parent
aa408ef8c8
commit
1361a4476f
|
@ -1094,11 +1094,10 @@ void CChat::OnPrepareLines(float y)
|
||||||
TextRender()->CreateOrAppendTextContainer(Line.m_TextContainerIndex, &Cursor, ": ");
|
TextRender()->CreateOrAppendTextContainer(Line.m_TextContainerIndex, &Cursor, ": ");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only apply msg color if no custom color is set
|
|
||||||
if(!Line.m_CustomColor)
|
|
||||||
{
|
|
||||||
ColorRGBA Color;
|
ColorRGBA Color;
|
||||||
if(Line.m_ClientId == SERVER_MSG)
|
if(Line.m_CustomColor)
|
||||||
|
Color = *Line.m_CustomColor;
|
||||||
|
else if(Line.m_ClientId == SERVER_MSG)
|
||||||
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageSystemColor));
|
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageSystemColor));
|
||||||
else if(Line.m_ClientId == CLIENT_MSG)
|
else if(Line.m_ClientId == CLIENT_MSG)
|
||||||
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageClientColor));
|
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageClientColor));
|
||||||
|
@ -1109,7 +1108,6 @@ void CChat::OnPrepareLines(float y)
|
||||||
else // regular message
|
else // regular message
|
||||||
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageColor));
|
Color = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_ClMessageColor));
|
||||||
TextRender()->TextColor(Color);
|
TextRender()->TextColor(Color);
|
||||||
}
|
|
||||||
|
|
||||||
CTextCursor AppendCursor = Cursor;
|
CTextCursor AppendCursor = Cursor;
|
||||||
AppendCursor.m_LongestLineWidth = 0.0f;
|
AppendCursor.m_LongestLineWidth = 0.0f;
|
||||||
|
|
Loading…
Reference in a new issue