From 20eb5a5d86875cea0c3f23540df4b02c5510bef1 Mon Sep 17 00:00:00 2001 From: def Date: Wed, 5 Aug 2020 12:39:13 +0200 Subject: [PATCH] Add Client message color option in HUD setting As requested by reo --- src/game/client/components/menus_settings.cpp | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 47bf4e075..6028572f0 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1688,6 +1688,33 @@ void CMenus::RenderSettingsHUD(CUIRect MainView) TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); } + { + char aBuf[64]; + Right.HSplitTop(20.0f, &Label, &Right); + Label.VSplitRight(50.0f, &Label, &Button); + str_format(aBuf, sizeof(aBuf), "%s (echo)", Localize("Client message")); + UI()->DoLabelScaled(&Label, aBuf, 16.0f, -1); + { + static int s_DefaultButton = 0; + if(DoButton_Menu(&s_DefaultButton, Localize("Reset"), 0, &Button)) + { + ColorHSLA HSL = color_cast(ColorRGBA(0.5f, 0.78f, 1.0f)); + g_Config.m_ClMessageClientColor = HSL.Pack(false); + } + } + + ColorHSLA CMColor = RenderHSLScrollbars(&Right, &g_Config.m_ClMessageClientColor); + + Right.HSplitTop(10.0f, &Label, &Right); + + ColorRGBA rgb = color_cast(CMColor); + TextRender()->TextColor(rgb); + + + UI()->DoLabelScaled(&Label, "*** Dynamic camera activated", 12.0f, -1); + TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); + Right.HSplitTop(20.0f, 0, &Right); + } } else if(Page == 2) {