diff --git a/mp/game/neo/resource/ClientScheme_KillFeed.res b/mp/game/neo/resource/ClientScheme_KillFeed.res deleted file mode 100644 index dd20e8d31..000000000 --- a/mp/game/neo/resource/ClientScheme_KillFeed.res +++ /dev/null @@ -1,16 +0,0 @@ -Scheme -{ - Fonts - { - "killfeed" - { - "1" - { - "name" "Zrnic" - "tall" "22" - "weight" "900" - "antialias" "1" - } - } - } -} \ No newline at end of file diff --git a/mp/src/game/client/hl2mp/hud_deathnotice.cpp b/mp/src/game/client/hl2mp/hud_deathnotice.cpp index f8f905000..69a7dbadb 100644 --- a/mp/src/game/client/hl2mp/hud_deathnotice.cpp +++ b/mp/src/game/client/hl2mp/hud_deathnotice.cpp @@ -160,11 +160,7 @@ void CHudDeathNotice::Paint() } #ifdef NEO - // TODO (nullsystem): Just create this once rather than every paint - wchar_t assistsPlusSign[64]; - g_pVGuiLocalize->ConvertANSIToUnicode(" + ", assistsPlusSign, sizeof(assistsPlusSign)); - const int assistsPlusSignWidth = UTIL_ComputeStringWidth(m_hTextFont, assistsPlusSign); - + static constexpr wchar_t ASSIST_SEPARATOR[] = L" + "; if (g_hFontKillfeed != vgui::INVALID_FONT) { m_hTextFont = g_hFontKillfeed; @@ -280,7 +276,7 @@ void CHudDeathNotice::Paint() #ifdef NEO if (hasAssists) { - x -= (UTIL_ComputeStringWidth(m_hTextFont, assists) + assistsPlusSignWidth); + x -= (UTIL_ComputeStringWidth(m_hTextFont, assists) + UTIL_ComputeStringWidth(m_hTextFont, ASSIST_SEPARATOR)); } #endif } @@ -296,15 +292,15 @@ void CHudDeathNotice::Paint() #ifdef NEO if (hasAssists) { - SetColorForNoticePlayer(iAssistsTeam); - // Draw + + surface()->DrawSetTextColor(COLOR_NEO_WHITE); surface()->DrawSetTextPos(x, y); surface()->DrawSetTextFont(m_hTextFont); - surface()->DrawUnicodeString(assistsPlusSign); + surface()->DrawUnicodeString(ASSIST_SEPARATOR); surface()->DrawGetTextPos(x, y); // Draw assists's name + SetColorForNoticePlayer(iAssistsTeam); surface()->DrawSetTextPos(x, y); surface()->DrawSetTextFont(m_hTextFont); surface()->DrawUnicodeString(assists); diff --git a/mp/src/game/client/hud.cpp b/mp/src/game/client/hud.cpp index 6af56726e..cd32dc445 100644 --- a/mp/src/game/client/hud.cpp +++ b/mp/src/game/client/hud.cpp @@ -495,12 +495,13 @@ void CHud::InitFonts() g_hFontTrebuchet24 = pScheme->GetFont("CenterPrintText", true); #ifdef NEO - auto pNeoKillfeedOverrideScheme = vgui::scheme()->GetIScheme(vgui::scheme()-> - LoadSchemeFromFile("resource/ClientScheme_KillFeed.res", "KillFeed")); - Assert(pNeoKillfeedOverrideScheme); - if (pNeoKillfeedOverrideScheme) + vgui::HScheme neoscheme = vgui::scheme()->LoadSchemeFromFile( + "resource/ClientScheme_Neo.res", "ClientScheme_Neo"); + vgui::IScheme *neoPScheme = vgui::scheme()->GetIScheme(neoscheme); + Assert(neoPScheme); + if (neoPScheme) { - g_hFontKillfeed = pNeoKillfeedOverrideScheme->GetFont("killfeed"); + g_hFontKillfeed = neoPScheme->GetFont("NHudOCRSmall", true); } if (g_hFontKillfeed == vgui::INVALID_FONT)