3065: Make clan plates fit & only show when name plates enabled r=heinrich5991 a=def-

Old:
![screenshot_2020-10-11_17-25-22](https://user-images.githubusercontent.com/2335377/95681099-4b5d8f00-0bde-11eb-9d90-bc6ee9a8729a.png)
New:
![screenshot-20201011@162337](https://user-images.githubusercontent.com/2335377/95681092-3b45af80-0bde-11eb-848c-2a4d14c40252.png)
Thanks to HamidReza for report


Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-10-11 14:29:15 +00:00 committed by GitHub
commit d4a0105d40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,17 +154,17 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
Right.HSplitTop(20.0f, &Button, &Right);
if(DoButton_CheckBox(&g_Config.m_ClNameplatesClan, Localize("Show clan above name plates"), g_Config.m_ClNameplatesClan, &Button))
g_Config.m_ClNameplatesClan ^= 1;
}
if(g_Config.m_ClNameplatesClan)
{
Right.HSplitTop(2.5f, 0, &Right);
Right.HSplitTop(20.0f, &Label, &Right);
Right.HSplitTop(20.0f, &Button, &Right);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Clan plates size"), g_Config.m_ClNameplatesClanSize);
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Button.HMargin(2.0f, &Button);
g_Config.m_ClNameplatesClanSize = (int)(DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
if(g_Config.m_ClNameplatesClan)
{
Right.HSplitTop(2.5f, 0, &Right);
Right.HSplitTop(20.0f, &Label, &Right);
Right.HSplitTop(20.0f, &Button, &Right);
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Clan plates size"), g_Config.m_ClNameplatesClanSize);
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
Button.HMargin(2.0f, &Button);
g_Config.m_ClNameplatesClanSize = (int)(DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
}
}
}
@ -184,11 +184,11 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
if(DoButton_CheckBox(&g_Config.m_ClSkipStartMenu, Localize("Skip the main menu"), g_Config.m_ClSkipStartMenu, &Button))
g_Config.m_ClSkipStartMenu ^= 1;
float SliderGroupMargin = 20.0f;
float SliderGroupMargin = 10.0f;
// auto demo settings
{
Right.HSplitTop(5.0f, 0, &Right);
Right.HSplitTop(40.0f, 0, &Right);
Right.HSplitTop(20.0f, &Button, &Right);
if(DoButton_CheckBox(&g_Config.m_ClAutoDemoRecord, Localize("Automatically record demos"), g_Config.m_ClAutoDemoRecord, &Button))
g_Config.m_ClAutoDemoRecord ^= 1;