mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add button that tells you how to save power
This commit is contained in:
parent
7e848131aa
commit
7c46b5190b
|
@ -191,8 +191,12 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
||||||
UI()->DoLabel(&Label, aBuf, 13.0f, TEXTALIGN_LEFT);
|
UI()->DoLabel(&Label, aBuf, 13.0f, TEXTALIGN_LEFT);
|
||||||
Left.HSplitTop(20.0f, &Button, &Left);
|
Left.HSplitTop(20.0f, &Button, &Left);
|
||||||
g_Config.m_ClRefreshRate = static_cast<int>(UI()->DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
|
g_Config.m_ClRefreshRate = static_cast<int>(UI()->DoScrollbarH(&g_Config.m_ClRefreshRate, &Button, g_Config.m_ClRefreshRate / 10000.0f) * 10000.0f + 0.1f);
|
||||||
|
Left.HSplitTop(5.0f, 0, &Left);
|
||||||
|
Left.HSplitTop(20.0f, &Button, &Left);
|
||||||
|
int s_LowerRefreshRate;
|
||||||
|
if(DoButton_CheckBox(&s_LowerRefreshRate, Localize("Save power by lowering refresh rate (higher input latency)"), g_Config.m_ClRefreshRate <= 480 && g_Config.m_ClRefreshRate != 0, &Button))
|
||||||
|
g_Config.m_ClRefreshRate = g_Config.m_ClRefreshRate > 480 || g_Config.m_ClRefreshRate == 0 ? 480 : 0;
|
||||||
|
|
||||||
Left.HSplitTop(15.0f, 0, &Left);
|
|
||||||
CUIRect SettingsButton;
|
CUIRect SettingsButton;
|
||||||
Left.HSplitBottom(25.0f, &Left, &SettingsButton);
|
Left.HSplitBottom(25.0f, &Left, &SettingsButton);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue