mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Combine Margin
function calls
Both calls put a margin around the same rect but the intermediate result is never used, so both margins can be combined. The variable `Screen` is also not necessary.
This commit is contained in:
parent
f60dd0d3c2
commit
fe359e2909
|
@ -887,9 +887,6 @@ void CMenus::RenderLoading(const char *pCaption, const char *pContent, int Incre
|
|||
// need up date this here to get correct
|
||||
ms_GuiColor = color_cast<ColorRGBA>(ColorHSLA(g_Config.m_UiColor, true));
|
||||
|
||||
CUIRect Screen = *UI()->Screen();
|
||||
// some margin around the screen
|
||||
Screen.Margin(10.0f, &Screen);
|
||||
UI()->MapScreen();
|
||||
|
||||
if(!RenderMenuBackgroundMap || !m_pBackground->Render())
|
||||
|
@ -897,8 +894,8 @@ void CMenus::RenderLoading(const char *pCaption, const char *pContent, int Incre
|
|||
RenderBackground();
|
||||
}
|
||||
|
||||
CUIRect Box = Screen;
|
||||
Box.Margin(150.0f, &Box);
|
||||
CUIRect Box = *UI()->Screen();
|
||||
Box.Margin(160.0f, &Box);
|
||||
|
||||
Graphics()->BlendNormal();
|
||||
|
||||
|
|
Loading…
Reference in a new issue