|
|
|
@ -161,7 +161,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Name plates size"), g_Config.m_ClNameplatesSize);
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
g_Config.m_ClNameplatesSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClNameplatesSize, &Button, g_Config.m_ClNameplatesSize / 100.0f) * 100.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClNameplatesSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClNameplatesSize, &Button, g_Config.m_ClNameplatesSize / 100.0f) * 100.0f + 0.1f);
|
|
|
|
|
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
if(DoButton_CheckBox(&g_Config.m_ClNameplatesTeamcolors, Localize("Use team colors for name plates"), g_Config.m_ClNameplatesTeamcolors, &Button))
|
|
|
|
@ -179,7 +179,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
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);
|
|
|
|
|
g_Config.m_ClNameplatesClanSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClNameplatesClanSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClNameplatesClanSize, &Button, g_Config.m_ClNameplatesClanSize / 100.0f) * 100.0f + 0.1f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -217,7 +217,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max demos"), "∞");
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
g_Config.m_ClAutoDemoMax = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClAutoDemoMax = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoDemoMax, &Button, g_Config.m_ClAutoDemoMax / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
|
|
|
|
|
Right.HSplitTop(SliderGroupMargin, 0, &Right);
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
@ -231,7 +231,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Max Screenshots"), "∞");
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
g_Config.m_ClAutoScreenshotMax = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClAutoScreenshotMax = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoScreenshotMax, &Button, g_Config.m_ClAutoScreenshotMax / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Left.HSplitTop(10.0f, 0, &Left);
|
|
|
|
@ -243,7 +243,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Refresh Rate"), "∞");
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
Left.HSplitTop(20.0f, &Button, &Left);
|
|
|
|
|
g_Config.m_ClRefreshRate = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClRefreshRate = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
|
|
|
|
|
|
|
|
|
|
#if defined(CONF_FAMILY_WINDOWS)
|
|
|
|
|
Left.HSplitTop(10.0f, 0, &Left);
|
|
|
|
@ -297,7 +297,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
g_Config.m_ClAutoStatboardScreenshotMax =
|
|
|
|
|
static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoStatboardScreenshotMax,
|
|
|
|
|
static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoStatboardScreenshotMax,
|
|
|
|
|
&Button,
|
|
|
|
|
g_Config.m_ClAutoStatboardScreenshotMax / 1000.0f) *
|
|
|
|
|
1000.0f +
|
|
|
|
@ -323,7 +323,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 13.0f, -1);
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
g_Config.m_ClAutoCSVMax =
|
|
|
|
|
static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClAutoCSVMax,
|
|
|
|
|
static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClAutoCSVMax,
|
|
|
|
|
&Button,
|
|
|
|
|
g_Config.m_ClAutoCSVMax / 1000.0f) *
|
|
|
|
|
1000.0f +
|
|
|
|
@ -921,7 +921,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
|
|
|
|
Button.VSplitLeft(160.0f, &Label, &Button);
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Mouse sens."), g_Config.m_InpMousesens);
|
|
|
|
|
UI()->DoLabel(&Label, aBuf, 14.0f * UI()->Scale(), -1);
|
|
|
|
|
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_InpMousesens, &Button, (minimum(g_Config.m_InpMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
|
|
|
|
|
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_InpMousesens, &Button, (minimum(g_Config.m_InpMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
|
|
|
|
|
if(g_Config.m_InpMousesens < 500 || NewValue < 500)
|
|
|
|
|
g_Config.m_InpMousesens = minimum(NewValue, 500);
|
|
|
|
|
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
|
|
|
|
@ -933,7 +933,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
|
|
|
|
Button.VSplitLeft(160.0f, &Label, &Button);
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("UI mouse s."), g_Config.m_UiMousesens);
|
|
|
|
|
UI()->DoLabel(&Label, aBuf, 14.0f * UI()->Scale(), -1);
|
|
|
|
|
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_UiMousesens, &Button, (minimum(g_Config.m_UiMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
|
|
|
|
|
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_UiMousesens, &Button, (minimum(g_Config.m_UiMousesens, 500) - 1) / 500.0f) * 500.0f) + 1;
|
|
|
|
|
if(g_Config.m_UiMousesens < 500 || NewValue < 500)
|
|
|
|
|
g_Config.m_UiMousesens = minimum(NewValue, 500);
|
|
|
|
|
MovementSettings.HSplitTop(20.0f, 0, &MovementSettings);
|
|
|
|
@ -1277,7 +1277,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|
|
|
|
else
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %s", Localize("Refresh Rate"), "∞");
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
|
|
|
|
|
int NewRefreshRate = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_GfxRefreshRate, &Button, (minimum(g_Config.m_GfxRefreshRate, 1000)) / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
int NewRefreshRate = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_GfxRefreshRate, &Button, (minimum(g_Config.m_GfxRefreshRate, 1000)) / 1000.0f) * 1000.0f + 0.1f);
|
|
|
|
|
if(g_Config.m_GfxRefreshRate <= 1000 || NewRefreshRate < 1000)
|
|
|
|
|
g_Config.m_GfxRefreshRate = NewRefreshRate;
|
|
|
|
|
|
|
|
|
@ -1382,7 +1382,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
|
|
|
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
|
|
|
|
Button.VSplitLeft(190.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Sound volume"), 14.0f, -1);
|
|
|
|
|
g_Config.m_SndVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_SndVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndVolume, &Button, g_Config.m_SndVolume / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// volume slider game sounds
|
|
|
|
@ -1392,7 +1392,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
|
|
|
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
|
|
|
|
Button.VSplitLeft(190.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Game sound volume"), 14.0f, -1);
|
|
|
|
|
g_Config.m_SndGameSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndGameSoundVolume, &Button, g_Config.m_SndGameSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_SndGameSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndGameSoundVolume, &Button, g_Config.m_SndGameSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// volume slider gui sounds
|
|
|
|
@ -1402,7 +1402,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
|
|
|
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
|
|
|
|
Button.VSplitLeft(190.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Chat sound volume"), 14.0f, -1);
|
|
|
|
|
g_Config.m_SndChatSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndChatSoundVolume, &Button, g_Config.m_SndChatSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_SndChatSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndChatSoundVolume, &Button, g_Config.m_SndChatSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// volume slider map sounds
|
|
|
|
@ -1412,7 +1412,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
|
|
|
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
|
|
|
|
Button.VSplitLeft(190.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Map sound volume"), 14.0f, -1);
|
|
|
|
|
g_Config.m_SndMapSoundVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndMapSoundVolume, &Button, g_Config.m_SndMapSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_SndMapSoundVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndMapSoundVolume, &Button, g_Config.m_SndMapSoundVolume / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// volume slider background music
|
|
|
|
@ -1422,7 +1422,7 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
|
|
|
|
|
MainView.HSplitTop(20.0f, &Button, &MainView);
|
|
|
|
|
Button.VSplitLeft(190.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Background music volume"), 14.0f, -1);
|
|
|
|
|
g_Config.m_SndBackgroundMusicVolume = (int)(m_UIEx.DoScrollbarH(&g_Config.m_SndBackgroundMusicVolume, &Button, g_Config.m_SndBackgroundMusicVolume / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_SndBackgroundMusicVolume = (int)(UIEx()->DoScrollbarH(&g_Config.m_SndBackgroundMusicVolume, &Button, g_Config.m_SndBackgroundMusicVolume / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2029,7 +2029,7 @@ ColorHSLA CMenus::RenderHSLScrollbars(CUIRect *pRect, unsigned int *pColor, bool
|
|
|
|
|
ColorInner = color_cast<ColorRGBA>(ColorHSLA(CurColorPureHSLA.r, *paComponent[1], LightVal, *paComponent[3]));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*paComponent[i] = m_UIEx.DoScrollbarH(&((char *)pColor)[i], &Button, *paComponent[i], &ColorInner);
|
|
|
|
|
*paComponent[i] = UIEx()->DoScrollbarH(&((char *)pColor)[i], &Button, *paComponent[i], &ColorInner);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*pColor = Color.Pack(Alpha);
|
|
|
|
@ -2393,7 +2393,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), Localize("Default length: %d"), g_Config.m_ClReplayLength);
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
|
|
|
|
|
|
|
|
|
|
int NewValue = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClReplayLength, &Button, (minimum(g_Config.m_ClReplayLength, 600) - 10) / 590.0f) * 590.0f) + 10;
|
|
|
|
|
int NewValue = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClReplayLength, &Button, (minimum(g_Config.m_ClReplayLength, 600) - 10) / 590.0f) * 590.0f) + 10;
|
|
|
|
|
if(g_Config.m_ClReplayLength < 600 || NewValue < 600)
|
|
|
|
|
g_Config.m_ClReplayLength = minimum(NewValue, 600);
|
|
|
|
|
|
|
|
|
@ -2448,7 +2448,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|
|
|
|
Left.HSplitTop(20.0f, &Button, &Left);
|
|
|
|
|
Button.VSplitLeft(120.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Overlay entities"), 14.0f, -1);
|
|
|
|
|
g_Config.m_ClOverlayEntities = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClOverlayEntities, &Button, g_Config.m_ClOverlayEntities / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_ClOverlayEntities = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClOverlayEntities, &Button, g_Config.m_ClOverlayEntities / 100.0f) * 100.0f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
@ -2458,7 +2458,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|
|
|
|
|
|
|
|
|
Button.VSplitLeft(50.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Size"), 14.0f, -1);
|
|
|
|
|
g_Config.m_ClTextEntitiesSize = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClTextEntitiesSize, &Button, g_Config.m_ClTextEntitiesSize / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_ClTextEntitiesSize = (int)(UIEx()->DoScrollbarH(&g_Config.m_ClTextEntitiesSize, &Button, g_Config.m_ClTextEntitiesSize / 100.0f) * 100.0f);
|
|
|
|
|
|
|
|
|
|
if(DoButton_CheckBox(&g_Config.m_ClTextEntities, Localize("Show text entities"), g_Config.m_ClTextEntities, &LeftLeft))
|
|
|
|
|
{
|
|
|
|
@ -2473,7 +2473,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|
|
|
|
|
|
|
|
|
Button.VSplitLeft(50.0f, &Label, &Button);
|
|
|
|
|
UI()->DoLabelScaled(&Label, Localize("Alpha"), 14.0f, -1);
|
|
|
|
|
g_Config.m_ClShowOthersAlpha = (int)(m_UIEx.DoScrollbarH(&g_Config.m_ClShowOthersAlpha, &Button, g_Config.m_ClShowOthersAlpha / 100.0f) * 100.0f);
|
|
|
|
|
g_Config.m_ClShowOthersAlpha = (int)(UIEx()->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 == 1, &LeftLeft))
|
|
|
|
|
{
|
|
|
|
@ -2500,7 +2500,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView)
|
|
|
|
|
char aBuf[64];
|
|
|
|
|
str_format(aBuf, sizeof(aBuf), "%s: %i", Localize("Default zoom"), g_Config.m_ClDefaultZoom);
|
|
|
|
|
UI()->DoLabelScaled(&Label, aBuf, 14.0f, -1);
|
|
|
|
|
g_Config.m_ClDefaultZoom = static_cast<int>(m_UIEx.DoScrollbarH(&g_Config.m_ClDefaultZoom, &Button, g_Config.m_ClDefaultZoom / 20.0f) * 20.0f + 0.1f);
|
|
|
|
|
g_Config.m_ClDefaultZoom = static_cast<int>(UIEx()->DoScrollbarH(&g_Config.m_ClDefaultZoom, &Button, g_Config.m_ClDefaultZoom / 20.0f) * 20.0f + 0.1f);
|
|
|
|
|
|
|
|
|
|
Right.HSplitTop(20.0f, &Button, &Right);
|
|
|
|
|
if(DoButton_CheckBox(&g_Config.m_ClAntiPing, Localize("AntiPing"), g_Config.m_ClAntiPing, &Button))
|
|
|
|
|