Add explicit button for current map as BG

This commit is contained in:
Dennis Felsing 2020-10-02 16:16:16 +02:00
parent 74550e2c45
commit 0f177bad46

View file

@ -2013,7 +2013,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
}
}
MainView.HSplitTop(310.0f, &Gameplay, &MainView);
MainView.HSplitTop(330.0f, &Gameplay, &MainView);
Gameplay.HSplitTop(30.0f, &Label, &Gameplay);
UI()->DoLabelScaled(&Label, Localize("Gameplay"), 20.0f, -1);
@ -2177,6 +2177,16 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
UI()->DoLabelScaled(&Label, Localize("Map"), 14.0f, -1);
DoEditBox(g_Config.m_ClBackgroundEntities, &Left, g_Config.m_ClBackgroundEntities, sizeof(g_Config.m_ClBackgroundEntities), 14.0f, &s_Map);
aRects[1].HSplitTop(20.0f, &Button, &aRects[1]);
bool UseCurrentMap = str_comp(g_Config.m_ClBackgroundEntities, CURRENT) == 0;
if(DoButton_CheckBox(&UseCurrentMap, Localize("Use current map as background"), UseCurrentMap, &Button))
{
if(UseCurrentMap)
g_Config.m_ClBackgroundEntities[0] = '\0';
else
str_copy(g_Config.m_ClBackgroundEntities, CURRENT, sizeof(g_Config.m_ClBackgroundEntities));
}
aRects[1].HSplitTop(20.0f, &Button, 0);
if(DoButton_CheckBox(&g_Config.m_ClBackgroundShowTilesLayers, Localize("Show tiles layers from BG map"), g_Config.m_ClBackgroundShowTilesLayers, &Button))
{