![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
This class represents a rectangle relative to a parent rectangle The value can be initialized from a string or JS object. More...
#include <CGUISize.h>

Public Member Functions | |
| CGUISize () | |
| CGUISize (const CRect &pixel, const CRect &percent) | |
| CRect | GetSize (const CRect &parent) const |
| Get client area rectangle when the parent is given. More... | |
| bool | FromString (const CStr8 &Value) |
| The value can be set from a string looking like: More... | |
| bool | operator== (const CGUISize &other) const |
Static Public Member Functions | |
| static CGUISize | Full () |
Public Attributes | |
| CRect | pixel |
| Pixel modifiers. More... | |
| CRect | percent |
| Percent modifiers. More... | |
This class represents a rectangle relative to a parent rectangle The value can be initialized from a string or JS object.
| CGUISize::CGUISize | ( | ) |
| bool CGUISize::FromString | ( | const CStr8 & | Value | ) |
The value can be set from a string looking like:
"0 0 100% 100%" "50%-10 50%-10 50%+10 50%+10"
i.e. First percent modifier, then + or - and the pixel modifier. Although you can use just the percent or the pixel modifier. Notice though that the percent modifier must always be the first when both modifiers are inputted.
|
static |
Get client area rectangle when the parent is given.
|
inline |
| CRect CGUISize::percent |
Percent modifiers.
| CRect CGUISize::pixel |
Pixel modifiers.