mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #2590
2590: Add DoxyFile and document CUIRect r=def- a=edg-l I will probably document more stuff later. To generate docs: `doxygen Doxyfile` Co-authored-by: Edgar <git@edgarluque.com>
This commit is contained in:
commit
eec9949a8b
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,6 +3,8 @@
|
|||
data/
|
||||
!/data/
|
||||
|
||||
docs/
|
||||
|
||||
bundle/
|
||||
!/other/bundle/
|
||||
|
||||
|
|
|
@ -10,15 +10,89 @@ class CUIRect
|
|||
public:
|
||||
float x, y, w, h;
|
||||
|
||||
/**
|
||||
* Splits 2 CUIRect inside *this* CUIRect horizontally. You can pass null pointers.
|
||||
*
|
||||
* @param pTop This rect will end up taking the top half of this CUIRect
|
||||
* @param pBottom This rect will end up taking the bottom half of this CUIRect
|
||||
*/
|
||||
void HSplitMid(CUIRect *pTop, CUIRect *pBottom) const;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param Cut The height of the pTop rect.
|
||||
* @param pTop The rect that ends up at the top with a height equal to Cut.
|
||||
* @param pBottom The rect that ends up at the bottom with a height equal to *this* rect minus the Cut.
|
||||
*/
|
||||
void HSplitTop(float Cut, CUIRect *pTop, CUIRect *pBottom) 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.
|
||||
*
|
||||
* @param Cut The height of the pBottom rect.
|
||||
* @param pTop The rect that ends up at the top with a height equal to *this* CUIRect height minus Cut.
|
||||
* @param pBottom The rect that ends up at the bottom with a height equal to Cut.
|
||||
*/
|
||||
void HSplitBottom(float Cut, CUIRect *pTop, CUIRect *pBottom) const;
|
||||
/**
|
||||
* Splits 2 CUIRect inside *this* CUIRect vertically. You can pass null pointers.
|
||||
*
|
||||
* @param pLeft This rect will take up the left half of *this* CUIRect.
|
||||
* @param pRight This rect will take up the right half of *this* CUIRect.
|
||||
*/
|
||||
void VSplitMid(CUIRect *pLeft, CUIRect *pRight) 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.
|
||||
*
|
||||
* @param Cut The width of the pLeft rect.
|
||||
* @param pLeft The rect that ends up at the left with a width equal to Cut.
|
||||
* @param pRight The rect that ends up at the right with a width equal to *this* rect minus the Cut.
|
||||
*/
|
||||
void VSplitLeft(float Cut, CUIRect *pLeft, CUIRect *pRight) const;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param Cut The width of the pRight rect.
|
||||
* @param pLeft The rect that ends up at the left with a width equal to *this* CUIRect width minus Cut.
|
||||
* @param pRight The rect that ends up at the right with a width equal to Cut.
|
||||
*/
|
||||
void VSplitRight(float Cut, CUIRect *pLeft, CUIRect *pRight) const;
|
||||
|
||||
/**
|
||||
* Places pOtherRect inside *this* CUIRect with Cut as the margin.
|
||||
*
|
||||
* @param Cut The margin.
|
||||
* @param pOtherRect The CUIRect to place inside *this* CUIRect.
|
||||
*/
|
||||
void Margin(float Cut, CUIRect *pOtherRect) const;
|
||||
/**
|
||||
* Places pOtherRect inside *this* CUIRect applying Cut as the margin only on the vertical axis.
|
||||
*
|
||||
* @param Cut The margin.
|
||||
* @param pOtherRect The CUIRect to place inside *this* CUIRect
|
||||
*/
|
||||
void VMargin(float Cut, CUIRect *pOtherRect) const;
|
||||
/**
|
||||
* Places pOtherRect inside *this* CUIRect applying Cut as the margin only on the horizontal axis.
|
||||
*
|
||||
* @param Cut The margin.
|
||||
* @param pOtherRect The CUIRect to place inside *this* CUIRect
|
||||
*/
|
||||
void HMargin(float Cut, CUIRect *pOtherRect) const;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue