#include <ui_rect.h>
|
| 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 |
| |
◆ Center()
| vec2 CUIRect::Center |
( |
| ) |
const |
|
inline |
Returns the center position of this CUIRect as a vec2.
- Returns
- Center position as vec2.
◆ Draw()
◆ Draw4()
◆ DrawOutline()
Draws the outline of this CUIRect using lines.
- Parameters
-
| Color | The color to draw the outline in. |
◆ HMargin()
Places pOtherRect inside this CUIRect applying Cut as the margin only on the horizontal axis.
- Parameters
-
◆ HSplitBottom()
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.
- Parameters
-
| 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. |
◆ HSplitMid()
Splits 2 CUIRect inside this CUIRect horizontally. You can pass null pointers.
- Parameters
-
| pTop | This rect will end up taking the top half of this CUIRect. |
| pBottom | This rect will end up taking the bottom half of this CUIRect. |
| Spacing | Total size of margin between split rects. |
◆ HSplitTop()
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.
- Parameters
-
| 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. |
◆ Init()
◆ Inside()
| bool CUIRect::Inside |
( |
vec2 |
Point | ) |
const |
Checks whether a point is inside this CUIRect.
- Parameters
-
| Point | The point's position. |
- Returns
- true iff the given point is inside this CUIRect.
◆ Margin() [1/2]
Places pOtherRect inside this CUIRect with Cut as the margin.
- Parameters
-
◆ Margin() [2/2]
Places pOtherRect inside this CUIRect with Cut as the margin.
- Parameters
-
| Cut | The margin as a vec2. The x component applies to the vertical axis. The y component applies to the horizontal axis. |
| pOtherRect | The CUIRect to place inside this CUIRect. |
◆ Size()
| vec2 CUIRect::Size |
( |
| ) |
const |
|
inline |
Returns the size of this CUIRect as a vec2.
- Returns
- Size as vec2.
◆ TopLeft()
| vec2 CUIRect::TopLeft |
( |
| ) |
const |
|
inline |
Returns the top-left position of this CUIRect as a vec2.
- Returns
- Top-left position as vec2.
◆ VMargin()
Places pOtherRect inside this CUIRect applying Cut as the margin only on the vertical axis.
- Parameters
-
◆ VSplitLeft()
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.
- Parameters
-
| 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. |
◆ VSplitMid()
Splits 2 CUIRect inside this CUIRect vertically. You can pass null pointers.
- Parameters
-
| pLeft | This rect will take up the left half of this CUIRect. |
| pRight | This rect will take up the right half of this CUIRect. |
| Spacing | Total size of margin between split rects. |
◆ VSplitRight()
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.
- Parameters
-
| 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. |
◆ s_pGraphics
The documentation for this class was generated from the following files: