Add Show others (own team only) menu setting

This commit is contained in:
def 2020-06-28 10:20:07 +02:00
parent c3521572ea
commit edba33be33

View file

@ -1891,7 +1891,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
}
}
MainView.HSplitTop(290.0f, &Gameplay , &MainView);
MainView.HSplitTop(310.0f, &Gameplay , &MainView);
Gameplay.HSplitTop(30.0f, &Label, &Gameplay);
UI()->DoLabelScaled(&Label, Localize("Gameplay"), 20.0f, -1);
@ -1935,12 +1935,19 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
UI()->DoLabelScaled(&Label, Localize("Alpha"), 14.0f, -1);
g_Config.m_ClShowOthersAlpha = (int)(DoScrollbarH(&g_Config.m_ClShowOthersAlpha, &Button, g_Config.m_ClShowOthersAlpha /100.0f)*100.0f);
if(DoButton_CheckBox(&g_Config.m_ClShowOthers, Localize("Show others"), g_Config.m_ClShowOthers, &LeftLeft))
if(DoButton_CheckBox(&g_Config.m_ClShowOthers, Localize("Show others"), g_Config.m_ClShowOthers == 1, &LeftLeft))
{
g_Config.m_ClShowOthers ^= 1;
g_Config.m_ClShowOthers = g_Config.m_ClShowOthers != 1 ? 1 : 0;
}
}
Left.HSplitTop(20.0f, &Button, &Left);
bool ShowOwnTeam = g_Config.m_ClShowOthers == 2;
if(DoButton_CheckBox(&ShowOwnTeam, Localize("Show others (own team only)"), ShowOwnTeam, &Button))
{
g_Config.m_ClShowOthers = g_Config.m_ClShowOthers != 2 ? 2 : 0;
}
Left.HSplitTop(20.0f, &Button, &Left);
if(DoButton_CheckBox(&g_Config.m_ClShowQuads, Localize("Show quads"), g_Config.m_ClShowQuads, &Button))
{
@ -1995,6 +2002,8 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
Right.HSplitTop(60.0f, 0, &Right);
}
Right.HSplitTop(20.0f, 0, &Right);
Left.HSplitTop(20.0f, &Button, &Left);
if(DoButton_CheckBox(&g_Config.m_ClShowHookCollOther, Localize("Show other players' hook collision lines"), g_Config.m_ClShowHookCollOther, &Button))
{