diff options
author | Northstar <northstar@northstar.tf> | 2022-04-13 19:29:44 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-04-13 19:30:40 -0300 |
commit | 47ea109be0d73120ddfe6896494e1fce986515b3 (patch) | |
tree | fb440b3ab2a00bf506182a9c9a9500d1c4711e0c /NorthstarDedicatedTest/localchatwriter.cpp | |
parent | 04b0b417d1c9f45a708d3e2eec9146fabe09c1d1 (diff) | |
download | NorthstarLauncher-47ea109be0d73120ddfe6896494e1fce986515b3.tar.gz NorthstarLauncher-47ea109be0d73120ddfe6896494e1fce986515b3.zip |
Format project
Diffstat (limited to 'NorthstarDedicatedTest/localchatwriter.cpp')
-rw-r--r-- | NorthstarDedicatedTest/localchatwriter.cpp | 34 |
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) |