2538: Add Client message color option in HUD setting r=Learath2 a=def-

As requested by reo

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-08-09 16:58:41 +00:00 committed by GitHub
commit 3fde3ac496
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<ColorHSLA>(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<ColorRGBA>(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)
{