mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed controls rendering with low ui scale
This commit is contained in:
parent
7d109a2c58
commit
713dd3bc08
|
@ -504,10 +504,11 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
|||
}
|
||||
|
||||
CUIRect MovementSettings, WeaponSettings, VotingSettings, ChatSettings, MiscSettings, ResetButton;
|
||||
MainView.VSplitLeft(MainView.w/2-5.0f, &MovementSettings, &VotingSettings);
|
||||
MainView.VSplitMid(&MovementSettings, &VotingSettings);
|
||||
|
||||
// movement settings
|
||||
{
|
||||
MovementSettings.VMargin(5.0f, &MovementSettings);
|
||||
MovementSettings.HSplitTop(MainView.h/3+60.0f, &MovementSettings, &WeaponSettings);
|
||||
RenderTools()->DrawUIRect(&MovementSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||
MovementSettings.Margin(10.0f, &MovementSettings);
|
||||
|
@ -550,6 +551,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
|||
RenderTools()->DrawUIRect(&ResetButton, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||
ResetButton.HMargin(10.0f, &ResetButton);
|
||||
ResetButton.VMargin(30.0f, &ResetButton);
|
||||
ResetButton.HSplitTop(20.0f, &ResetButton, 0);
|
||||
static int s_DefaultButton = 0;
|
||||
if(DoButton_Menu((void*)&s_DefaultButton, Localize("Reset to defaults"), 0, &ResetButton))
|
||||
m_pClient->m_pBinds->SetDefaults();
|
||||
|
@ -557,7 +559,7 @@ void CMenus::RenderSettingsControls(CUIRect MainView)
|
|||
|
||||
// voting settings
|
||||
{
|
||||
VotingSettings.VSplitLeft(10.0f, 0, &VotingSettings);
|
||||
VotingSettings.VMargin(5.0f, &VotingSettings);
|
||||
VotingSettings.HSplitTop(MainView.h/3-75.0f, &VotingSettings, &ChatSettings);
|
||||
RenderTools()->DrawUIRect(&VotingSettings, vec4(1,1,1,0.25f), CUI::CORNER_ALL, 10.0f);
|
||||
VotingSettings.Margin(10.0f, &VotingSettings);
|
||||
|
|
Loading…
Reference in a new issue