aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/localchatwriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/localchatwriter.cpp')
-rw-r--r--NorthstarDedicatedTest/localchatwriter.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/NorthstarDedicatedTest/localchatwriter.cpp b/NorthstarDedicatedTest/localchatwriter.cpp
index 8f7555b2..72a5afa7 100644
--- a/NorthstarDedicatedTest/localchatwriter.cpp
+++ b/NorthstarDedicatedTest/localchatwriter.cpp
@@ -81,13 +81,25 @@ LocalChatWriter::SwatchColor swatchColors[4] = {
LocalChatWriter::NetworkNameColor,
};
-vgui_Color darkColors[8] = {vgui_Color{0, 0, 0, 255}, vgui_Color{205, 49, 49, 255}, vgui_Color{13, 188, 121, 255},
- vgui_Color{229, 229, 16, 255}, vgui_Color{36, 114, 200, 255}, vgui_Color{188, 63, 188, 255},
- vgui_Color{17, 168, 205, 255}, vgui_Color{229, 229, 229, 255}};
-
-vgui_Color lightColors[8] = {vgui_Color{102, 102, 102, 255}, vgui_Color{241, 76, 76, 255}, vgui_Color{35, 209, 139, 255},
- vgui_Color{245, 245, 67, 255}, vgui_Color{59, 142, 234, 255}, vgui_Color{214, 112, 214, 255},
- vgui_Color{41, 184, 219, 255}, vgui_Color{255, 255, 255, 255}};
+vgui_Color darkColors[8] = {
+ vgui_Color {0, 0, 0, 255},
+ vgui_Color {205, 49, 49, 255},
+ vgui_Color {13, 188, 121, 255},
+ vgui_Color {229, 229, 16, 255},
+ vgui_Color {36, 114, 200, 255},
+ vgui_Color {188, 63, 188, 255},
+ vgui_Color {17, 168, 205, 255},
+ vgui_Color {229, 229, 229, 255}};
+
+vgui_Color lightColors[8] = {
+ vgui_Color {102, 102, 102, 255},
+ vgui_Color {241, 76, 76, 255},
+ vgui_Color {35, 209, 139, 255},
+ vgui_Color {245, 245, 67, 255},
+ vgui_Color {59, 142, 234, 255},
+ vgui_Color {214, 112, 214, 255},
+ vgui_Color {41, 184, 219, 255},
+ vgui_Color {255, 255, 255, 255}};
class AnsiEscapeParser
{
@@ -132,7 +144,7 @@ class AnsiEscapeParser
LocalChatWriter* m_writer;
Next m_next = Next::ControlType;
- vgui_Color m_expandedColor{0, 0, 0, 0};
+ vgui_Color m_expandedColor {0, 0, 0, 0};
Next HandleControlType(unsigned long val)
{
@@ -208,12 +220,12 @@ class AnsiEscapeParser
unsigned char green = ((code - blue) / 6) % 6;
unsigned char red = (code - blue - (green * 6)) / 36;
m_writer->InsertColorChange(
- vgui_Color{(unsigned char)(red * 51), (unsigned char)(green * 51), (unsigned char)(blue * 51), 255});
+ vgui_Color {(unsigned char)(red * 51), (unsigned char)(green * 51), (unsigned char)(blue * 51), 255});
}
else if (val < UCHAR_MAX)
{
unsigned char brightness = (val - 232) * 10 + 8;
- m_writer->InsertColorChange(vgui_Color{brightness, brightness, brightness, 255});
+ m_writer->InsertColorChange(vgui_Color {brightness, brightness, brightness, 255});
}
return Next::ControlType;
@@ -359,7 +371,7 @@ static vgui_Color GetHudSwatchColor(CHudChat* hud, LocalChatWriter::SwatchColor
case LocalChatWriter::NetworkNameColor:
return hud->m_networkNameColor;
}
- return vgui_Color{0, 0, 0, 0};
+ return vgui_Color {0, 0, 0, 0};
}
void LocalChatWriter::InsertSwatchColorChange(SwatchColor swatchColor)