mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Use Margin instead of both VMargin and HMargin
This commit is contained in:
parent
e291a3a70c
commit
a1614e4709
|
@ -1603,10 +1603,7 @@ int CMenus::Render()
|
|||
CUIRect Box, Part;
|
||||
Box = Screen;
|
||||
if(m_Popup != POPUP_FIRST_LAUNCH)
|
||||
{
|
||||
Box.VMargin(150.0f / UI()->Scale(), &Box);
|
||||
Box.HMargin(150.0f / UI()->Scale(), &Box);
|
||||
}
|
||||
Box.Margin(150.0f / UI()->Scale(), &Box);
|
||||
|
||||
// render the box
|
||||
RenderTools()->DrawUIRect(&Box, BgColor, CUI::CORNER_ALL, 15.0f);
|
||||
|
@ -1750,8 +1747,7 @@ int CMenus::Render()
|
|||
else if(m_Popup == POPUP_CONNECTING)
|
||||
{
|
||||
Box = Screen;
|
||||
Box.VMargin(150.0f, &Box);
|
||||
Box.HMargin(150.0f, &Box);
|
||||
Box.Margin(150.0f, &Box);
|
||||
Box.HSplitBottom(20.f, &Box, &Part);
|
||||
Box.HSplitBottom(24.f, &Box, &Part);
|
||||
Part.VMargin(120.0f, &Part);
|
||||
|
@ -1817,8 +1813,7 @@ int CMenus::Render()
|
|||
else if(m_Popup == POPUP_LANGUAGE)
|
||||
{
|
||||
Box = Screen;
|
||||
Box.VMargin(150.0f, &Box);
|
||||
Box.HMargin(150.0f, &Box);
|
||||
Box.Margin(150.0f, &Box);
|
||||
Box.HSplitTop(20.f, &Part, &Box);
|
||||
Box.HSplitBottom(20.f, &Box, &Part);
|
||||
Box.HSplitBottom(24.f, &Box, &Part);
|
||||
|
@ -1834,8 +1829,7 @@ int CMenus::Render()
|
|||
else if(m_Popup == POPUP_COUNTRY)
|
||||
{
|
||||
Box = Screen;
|
||||
Box.VMargin(150.0f, &Box);
|
||||
Box.HMargin(150.0f, &Box);
|
||||
Box.Margin(150.0f, &Box);
|
||||
Box.HSplitTop(20.f, &Part, &Box);
|
||||
Box.HSplitBottom(20.f, &Box, &Part);
|
||||
Box.HSplitBottom(24.f, &Box, &Part);
|
||||
|
|
|
@ -80,8 +80,7 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
CUIRect Screen = *UI()->Screen();
|
||||
CUIRect Box, Part, Part2;
|
||||
Box = Screen;
|
||||
Box.VMargin(150.0f / UI()->Scale(), &Box);
|
||||
Box.HMargin(150.0f / UI()->Scale(), &Box);
|
||||
Box.Margin(150.0f / UI()->Scale(), &Box);
|
||||
|
||||
// render the box
|
||||
RenderTools()->DrawUIRect(&Box, ColorRGBA(0, 0, 0, 0.5f), CUI::CORNER_ALL, 15.0f);
|
||||
|
|
|
@ -451,8 +451,7 @@ bool CUIEx::DoEditBox(const void *pID, const CUIRect *pRect, char *pStr, unsigne
|
|||
|
||||
CUIRect Textbox = *pRect;
|
||||
RenderTools()->DrawUIRect(&Textbox, ColorRGBA(1, 1, 1, 0.5f), Corners, 3.0f);
|
||||
Textbox.VMargin(2.0f, &Textbox);
|
||||
Textbox.HMargin(2.0f, &Textbox);
|
||||
Textbox.Margin(2.0f, &Textbox);
|
||||
|
||||
const char *pDisplayStr = pStr;
|
||||
char aStars[128];
|
||||
|
|
Loading…
Reference in a new issue