mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Reset zoom when adjusting default zoom in settings
This commit is contained in:
parent
d6aa18e5b4
commit
8c9597667a
|
@ -3098,7 +3098,10 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|||
GameClient()->m_Tooltips.DoToolTip(&g_Config.m_ClShowQuads, &Button, Localize("Quads are used for background decoration"));
|
||||
|
||||
Right.HSplitTop(20.0f, &Button, &Right);
|
||||
int PreviousZoom = g_Config.m_ClDefaultZoom;
|
||||
UI()->DoScrollbarOption(&g_Config.m_ClDefaultZoom, &g_Config.m_ClDefaultZoom, &Button, Localize("Default zoom"), 0, 20);
|
||||
if(PreviousZoom != g_Config.m_ClDefaultZoom)
|
||||
m_pClient->m_Camera.SetZoom(std::pow(CCamera::ZOOM_STEP, g_Config.m_ClDefaultZoom - 10), g_Config.m_ClSmoothZoomTime);
|
||||
|
||||
Right.HSplitTop(20.0f, &Button, &Right);
|
||||
if(DoButton_CheckBox(&g_Config.m_ClAntiPing, Localize("AntiPing"), g_Config.m_ClAntiPing, &Button))
|
||||
|
|
Loading…
Reference in a new issue