Add margins to demo slice popup, decrease error font size, UI scaling

This commit is contained in:
Robert Müller 2022-05-01 00:30:40 +02:00
parent f4642472b2
commit cc9ed7e9d3

View file

@ -89,9 +89,10 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
Box.HSplitTop(24.f / UI()->Scale(), &Part, &Box);
UI()->DoLabelScaled(&Part, Localize("Select a name"), 24.f, TEXTALIGN_CENTER);
Box.HSplitTop(20.f / UI()->Scale(), 0, &Box);
Box.HSplitTop(24.f / UI()->Scale(), &Part, &Box);
Box.HSplitTop(20.f / UI()->Scale(), &Part, &Box);
Part.VMargin(20.f / UI()->Scale(), &Part);
UI()->DoLabelScaled(&Part, m_aDemoPlayerPopupHint, 24.f, TEXTALIGN_CENTER);
UI()->DoLabelScaled(&Part, m_aDemoPlayerPopupHint, 20.f, TEXTALIGN_CENTER);
Box.HSplitTop(20.f / UI()->Scale(), 0, &Box);
CUIRect Label, TextBox, Ok, Abort;
@ -140,9 +141,9 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
}
}
Box.HSplitBottom(120.f, &Box, 0);
Box.HSplitBottom(24.f, &Box, &Part2);
Box.HSplitBottom(24.f, &Box, &Part);
Box.HSplitTop(24.f, &Part, &Box);
Box.HSplitTop(10.f, 0, &Box);
Box.HSplitTop(24.f, &Part2, &Box);
Part2.VSplitLeft(60.0f, 0, &Label);
if(DoButton_CheckBox(&s_RemoveChat, Localize("Remove chat"), s_RemoveChat, &Label))
@ -154,7 +155,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
Label.VSplitLeft(120.0f, 0, &TextBox);
TextBox.VSplitLeft(20.0f, 0, &TextBox);
TextBox.VSplitRight(60.0f, &TextBox, 0);
UI()->DoLabel(&Label, Localize("New name:"), 18.0f, TEXTALIGN_LEFT);
UI()->DoLabelScaled(&Label, Localize("New name:"), 18.0f, TEXTALIGN_LEFT);
static float s_Offset = 0.0f;
if(UIEx()->DoEditBox(&s_Offset, &TextBox, m_aCurrentDemoFile, sizeof(m_aCurrentDemoFile), 12.0f, &s_Offset))
{