mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add cl_zoom_background_layers (set to 0 to keep background nice when zoomed out)
This commit is contained in:
parent
90518f951d
commit
932fb826c7
|
@ -273,6 +273,7 @@ MACRO_CONFIG_INT(ClShowOthers, cl_show_others, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_S
|
||||||
MACRO_CONFIG_INT(ClShowOthersAlpha, cl_show_others_alpha, 40, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show players in other teams (alpha value, 0 invisible, 100 fully visible)")
|
MACRO_CONFIG_INT(ClShowOthersAlpha, cl_show_others_alpha, 40, 0, 100, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show players in other teams (alpha value, 0 invisible, 100 fully visible)")
|
||||||
MACRO_CONFIG_INT(ClOverlayEntities, cl_overlay_entities, 0, 0, 100, CFGFLAG_CLIENT, "Overlay game tiles with a percentage of opacity")
|
MACRO_CONFIG_INT(ClOverlayEntities, cl_overlay_entities, 0, 0, 100, CFGFLAG_CLIENT, "Overlay game tiles with a percentage of opacity")
|
||||||
MACRO_CONFIG_INT(ClShowQuads, cl_show_quads, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show quads")
|
MACRO_CONFIG_INT(ClShowQuads, cl_show_quads, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show quads")
|
||||||
|
MACRO_CONFIG_INT(ClZoomBackgroundLayers, cl_zoom_background_layers, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Zoom background layers")
|
||||||
MACRO_CONFIG_INT(ClBackgroundHue, cl_background_hue, 0, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color hue")
|
MACRO_CONFIG_INT(ClBackgroundHue, cl_background_hue, 0, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color hue")
|
||||||
MACRO_CONFIG_INT(ClBackgroundSat, cl_background_sat, 0, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color saturation")
|
MACRO_CONFIG_INT(ClBackgroundSat, cl_background_sat, 0, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color saturation")
|
||||||
MACRO_CONFIG_INT(ClBackgroundLht, cl_background_lht, 128, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color lightness")
|
MACRO_CONFIG_INT(ClBackgroundLht, cl_background_lht, 128, 0, 255, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Background color lightness")
|
||||||
|
|
|
@ -157,6 +157,9 @@ void CMapLayers::OnRender()
|
||||||
(int)((x1-x0)*Graphics()->ScreenWidth()), (int)((y1-y0)*Graphics()->ScreenHeight()));
|
(int)((x1-x0)*Graphics()->ScreenWidth()), (int)((y1-y0)*Graphics()->ScreenHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!g_Config.m_ClZoomBackgroundLayers && !pGroup->m_ParallaxX && !pGroup->m_ParallaxY)
|
||||||
|
MapScreenToGroup(Center.x, Center.y, pGroup, 1.0);
|
||||||
|
else
|
||||||
MapScreenToGroup(Center.x, Center.y, pGroup, m_pClient->m_pCamera->m_Zoom);
|
MapScreenToGroup(Center.x, Center.y, pGroup, m_pClient->m_pCamera->m_Zoom);
|
||||||
|
|
||||||
for(int l = 0; l < pGroup->m_NumLayers; l++)
|
for(int l = 0; l < pGroup->m_NumLayers; l++)
|
||||||
|
|
|
@ -1724,7 +1724,7 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
|
||||||
g_Config.m_ClRaceSaveGhost ^= 1;
|
g_Config.m_ClRaceSaveGhost ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainView.HSplitTop(230.0f, &Gameplay , &MainView);
|
MainView.HSplitTop(250.0f, &Gameplay , &MainView);
|
||||||
|
|
||||||
Gameplay.HSplitTop(30.0f, &Label, &Gameplay);
|
Gameplay.HSplitTop(30.0f, &Label, &Gameplay);
|
||||||
UI()->DoLabelScaled(&Label, Localize("Gameplay"), 20.0f, -1);
|
UI()->DoLabelScaled(&Label, Localize("Gameplay"), 20.0f, -1);
|
||||||
|
@ -1794,6 +1794,12 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
|
||||||
g_Config.m_ClOldGunPosition ^= 1;
|
g_Config.m_ClOldGunPosition ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Left.HSplitTop(20.0f, &Button, &Left);
|
||||||
|
if(DoButton_CheckBox(&g_Config.m_ClZoomBackgroundLayers, Localize("Zoom background layers"), g_Config.m_ClZoomBackgroundLayers, &Button))
|
||||||
|
{
|
||||||
|
g_Config.m_ClZoomBackgroundLayers ^= 1;
|
||||||
|
}
|
||||||
|
|
||||||
Left.HSplitTop(20.0f, &Button, &Left);
|
Left.HSplitTop(20.0f, &Button, &Left);
|
||||||
if(DoButton_CheckBox(&g_Config.m_ClShowOtherHookColl, Localize("Show other players' hook collision lines"), g_Config.m_ClShowOtherHookColl, &Button))
|
if(DoButton_CheckBox(&g_Config.m_ClShowOtherHookColl, Localize("Show other players' hook collision lines"), g_Config.m_ClShowOtherHookColl, &Button))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue