struct
GUIConstrainedSizeRange
Contains valid size range for a GUI element, based on element's optimal size and size constraints.
Public
Methods
CalculateSizeConstrainedByParentSize
GUILogicalSize CalculateSizeConstrainedByParentSize(const GUISizeConstraints &sizeConstraints, const GUILogicalSize &parentSize) const
Calculates GUI element size constrained by parent size.
For example, if a GUI element optimal width is 100 units, but parent is only 50 units wide, then the optimal size may be reduced to 50 units, if the constraints permit it.
- sizeConstraints
- Size constrains this size range was originally created with. New size will respect these constraints (e.g. if width is fixed, parent width will have no impact).
- parentSize
- Size of the parent element to constrain the current size within.