![]() |
DDNet documentation
|
#include <ui_rect.h>
Public Member Functions | |
| void | HSplitMid (CUIRect *pTop, CUIRect *pBottom, float Spacing=0.0f) const |
| void | HSplitTop (float Cut, CUIRect *pTop, CUIRect *pBottom) const |
| void | HSplitBottom (float Cut, CUIRect *pTop, CUIRect *pBottom) const |
| void | VSplitMid (CUIRect *pLeft, CUIRect *pRight, float Spacing=0.0f) const |
| void | VSplitLeft (float Cut, CUIRect *pLeft, CUIRect *pRight) const |
| void | VSplitRight (float Cut, CUIRect *pLeft, CUIRect *pRight) const |
| void | Margin (vec2 Cut, CUIRect *pOtherRect) const |
| void | Margin (float Cut, CUIRect *pOtherRect) const |
| void | VMargin (float Cut, CUIRect *pOtherRect) const |
| void | HMargin (float Cut, CUIRect *pOtherRect) const |
| bool | Inside (vec2 Point) const |
| void | Draw (ColorRGBA Color, int Corners, float Rounding) const |
| void | Draw4 (ColorRGBA ColorTopLeft, ColorRGBA ColorTopRight, ColorRGBA ColorBottomLeft, ColorRGBA ColorBottomRight, int Corners, float Rounding) const |
| void | DrawOutline (ColorRGBA Color) const |
| vec2 | TopLeft () const |
| vec2 | Size () const |
| vec2 | Center () const |
Static Public Member Functions | |
| static void | Init (IGraphics *pGraphics) |
Public Attributes | |
| float | x |
| float | y |
| float | w |
| float | h |
Static Private Attributes | |
| static IGraphics * | ms_pGraphics = nullptr |
|
inline |
| void CUIRect::Draw | ( | ColorRGBA | Color, |
| int | Corners, | ||
| float | Rounding ) const |
Fill background of this CUIRect.
| Color | |
| Corners | |
| Rounding |
| void CUIRect::Draw4 | ( | ColorRGBA | ColorTopLeft, |
| ColorRGBA | ColorTopRight, | ||
| ColorRGBA | ColorBottomLeft, | ||
| ColorRGBA | ColorBottomRight, | ||
| int | Corners, | ||
| float | Rounding ) const |
| void CUIRect::DrawOutline | ( | ColorRGBA | Color | ) | const |
Draws the outline of this CUIRect using lines.
| Color | The color to draw the outline in. |
| void CUIRect::HMargin | ( | float | Cut, |
| CUIRect * | pOtherRect ) const |
Splits 2 CUIRect inside this CUIRect.
The cut parameter determines the height of the bottom rect, so it allows more customization than HSplitMid.
This method doesn't check if Cut is bigger than this rect height.
| Cut | The height of the pBottom rect. |
| pTop | The rect that ends up at the top with a height equal to this CUIRect height minus Cut. |
| pBottom | The rect that ends up at the bottom with a height equal to Cut. |
Splits 2 CUIRect inside this CUIRect.
The cut parameter determines the height of the top rect, so it allows more customization than HSplitMid.
This method doesn't check if Cut is bigger than this rect height.
| Cut | The height of the pTop rect. |
| pTop | The rect that ends up at the top with a height equal to Cut. |
| pBottom | The rect that ends up at the bottom with a height equal to this rect minus the Cut. |
|
inlinestatic |
| bool CUIRect::Inside | ( | vec2 | Point | ) | const |
| void CUIRect::Margin | ( | float | Cut, |
| CUIRect * | pOtherRect ) const |
|
inline |
|
inline |
| void CUIRect::VMargin | ( | float | Cut, |
| CUIRect * | pOtherRect ) const |
Splits 2 CUIRect inside this CUIRect.
The cut parameter determines the width of the left rect, so it allows more customization than VSplitMid.
This method doesn't check if Cut is bigger than this rect width.
| Cut | The width of the pLeft rect. |
| pLeft | The rect that ends up at the left with a width equal to Cut. |
| pRight | The rect that ends up at the right with a width equal to this rect minus the Cut. |
Splits 2 CUIRect inside this CUIRect.
The cut parameter determines the width of the right rect, so it allows more customization than VSplitMid.
This method doesn't check if Cut is bigger than this rect width.
| Cut | The width of the pRight rect. |
| pLeft | The rect that ends up at the left with a width equal to this CUIRect width minus Cut. |
| pRight | The rect that ends up at the right with a width equal to Cut. |
| float CUIRect::h |
|
staticprivate |
| float CUIRect::w |
| float CUIRect::x |
| float CUIRect::y |