class
GUIProgressBar
GUI element containing a background image and a fill image that is scaled depending on the percentage set by the caller.
Public
Methods
staticGetGuiTypeName
static const String &GetGuiTypeName()
Returns type name of the GUI element used for finding GUI element styles.
SetPercent
void SetPercent(float percent)
Determines how far is the progress bar filled, in range [0, 1].
GetPercent
float GetPercent() const
staticCreate
static GUIElementType *Create(const String &styleClass, const TInlineArray<GUIOption, 4> &options)
Creates a new GUI element.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
- options
- Additional options that control GUI element size and position. This will override options set in the style sheet.
Internal
Constructors
GUIProgressBar
GUIProgressBar(PrivatelyConstruct, const String &styleName, const GUISizeConstraints &sizeConstraints)
Methods
CalculateUnconstrainedOptimalSize
GUILogicalSize CalculateUnconstrainedOptimalSize() const override
Calculates the optimal size for the GUI element, ignoring size constraints.
Protected
Methods
UpdateLayoutForChildren
void UpdateLayoutForChildren() override
Calculates sizes and relative positions for all child elements.
Should be preceded with a call to UpdateOptimalLayoutSizes().