MCPcopy Create free account
hub / github.com/ddnet/ddnet / VSplitMid

Method VSplitMid

src/game/client/ui_rect.cpp:74–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void CUIRect::VSplitMid(CUIRect *pLeft, CUIRect *pRight, float Spacing) const
75{
76 CUIRect r = *this;
77 const float Cut = r.w / 2;
78 const float HalfSpacing = Spacing / 2;
79
80 if(pLeft)
81 {
82 pLeft->x = r.x;
83 pLeft->y = r.y;
84 pLeft->w = Cut - HalfSpacing;
85 pLeft->h = r.h;
86 }
87
88 if(pRight)
89 {
90 pRight->x = r.x + Cut + HalfSpacing;
91 pRight->y = r.y;
92 pRight->w = Cut - HalfSpacing;
93 pRight->h = r.h;
94 }
95}
96
97void CUIRect::VSplitLeft(float Cut, CUIRect *pLeft, CUIRect *pRight) const
98{

Callers 15

DoScrollbarOptionMethod · 0.80
PopupConfirmMethod · 0.80
DoLine_RadioMenuMethod · 0.80
RenderPopupFullscreenMethod · 0.80
RenderSettingsGeneralMethod · 0.80
RenderSettingsPlayerMethod · 0.80
RenderSettingsTeeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected