ProgressBar
Indicator for measured progress or indeterminate waiting.
For a known workload, set MinValue, MaxValue and Value; for example, 0, 200 and 50 mean 25%, not 50%. Your code updates the value: ProgressBar does not track loading automatically. Defaults are Step = 0.01, ShowPercentage = true and Indeterminate = false. Do not block the main thread with a long task or the interface cannot update.
FillMode selects direction. BeginToEnd/EndToBegin respect RTL; vertical modes run top to bottom or bottom to top. Theme resources background/fill define colors and shape. Percentages use the entire MinValue…MaxValue range; Page reduces reachable Value, so normally leave Page = 0.
Indeterminate = true shows a moving waiting segment without a percentage or computing Value. ShowPercentage can remain true in stored settings, but its text is not drawn. Returning to determinate mode retains Value. EditorPreviewIndeterminate controls animation only in the edited level, not in the running game.
AllowGreater/AllowLesser can permit percentage labels outside 0…100%, while ordinary fill geometry uses clamped Ratio. Leave these permissions off for a conventional completion indicator.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ProgressBarConstructor
public ProgressBar();Creates an indicator with Step = 0.01, ShowPercentage = true, Indeterminate = false and BeginToEnd direction. Your code supplies workload and Value.
Properties4
EditorPreviewIndeterminateProperty
public bool EditorPreviewIndeterminate { get; set; }Enables Indeterminate animation in the edited level, default false. Does not control running-game animation and is not a speed setting.
FillModeProperty
public int FillMode { get; set; }Fill direction, default BeginToEnd. Use ProgressBar.FillModeEnum values cast to int: BeginToEnd, EndToBegin, TopToBottom, BottomToTop. Horizontal modes respect RTL.
IndeterminateProperty
public bool Indeterminate { get; set; }Waiting mode without a known fraction, default false. Enables internal animation while the interface runs, without computing or changing Value. Percentage text is not drawn; disabling retains Value.
ShowPercentageProperty
public bool ShowPercentage { get; set; }Show a percentage label, default true. Fraction uses MinValue…MaxValue. Indeterminate mode does not draw the label even if the stored setting is true; Value is unchanged.
Methods8
GetFillModeint
public int GetFillMode();Fill direction, default BeginToEnd. Use ProgressBar.FillModeEnum values cast to int: BeginToEnd, EndToBegin, TopToBottom, BottomToTop. Horizontal modes respect RTL.
intCurrent setting rather than confirmation of input or visual validation.
IsEditorPreviewIndeterminateEnabledbool
public bool IsEditorPreviewIndeterminateEnabled();Enables Indeterminate animation in the edited level, default false. Does not control running-game animation and is not a speed setting.
boolCurrent setting rather than confirmation of input or visual validation.
IsIndeterminatebool
public bool IsIndeterminate();Waiting mode without a known fraction, default false. Enables internal animation while the interface runs, without computing or changing Value. Percentage text is not drawn; disabling retains Value.
boolCurrent setting rather than confirmation of input or visual validation.
IsPercentageShownbool
public bool IsPercentageShown();Show a percentage label, default true. Fraction uses MinValue…MaxValue. Indeterminate mode does not draw the label even if the stored setting is true; Value is unchanged.
boolCurrent setting rather than confirmation of input or visual validation.
SetEditorPreviewIndeterminatevoid
public void SetEditorPreviewIndeterminate(bool previewIndeterminate);Enables Indeterminate animation in the edited level, default false. Does not control running-game animation and is not a speed setting.
| Name | Type | Default |
|---|---|---|
previewIndeterminate | bool | — |
previewIndeterminateEnables Indeterminate animation in the edited level, default false. Does not control running-game animation and is not a speed setting.
SetFillModevoid
public void SetFillMode(int mode);Fill direction, default BeginToEnd. Use ProgressBar.FillModeEnum values cast to int: BeginToEnd, EndToBegin, TopToBottom, BottomToTop. Horizontal modes respect RTL.
| Name | Type | Default |
|---|---|---|
mode | int | — |
modeFill direction, default BeginToEnd. Use ProgressBar.FillModeEnum values cast to int: BeginToEnd, EndToBegin, TopToBottom, BottomToTop. Horizontal modes respect RTL.
SetIndeterminatevoid
public void SetIndeterminate(bool indeterminate);Waiting mode without a known fraction, default false. Enables internal animation while the interface runs, without computing or changing Value. Percentage text is not drawn; disabling retains Value.
| Name | Type | Default |
|---|---|---|
indeterminate | bool | — |
indeterminateWaiting mode without a known fraction, default false. Enables internal animation while the interface runs, without computing or changing Value. Percentage text is not drawn; disabling retains Value.
SetShowPercentagevoid
public void SetShowPercentage(bool visible);Show a percentage label, default true. Fraction uses MinValue…MaxValue. Indeterminate mode does not draw the label even if the stored setting is true; Value is unchanged.
| Name | Type | Default |
|---|---|---|
visible | bool | — |
visibleShow a percentage label, default true. Fraction uses MinValue…MaxValue. Indeterminate mode does not draw the label even if the stored setting is true; Value is unchanged.
ProgressBar.FillModeEnum
| Value | Description |
|---|---|
BeginToEnd = 0 | The progress bar fills from begin to end horizontally, according to the language direction. If |
BottomToTop = 3 | The progress fills from bottom to top. |
EndToBegin = 1 | The progress bar fills from end to begin horizontally, according to the language direction. If |
TopToBottom = 2 | The progress fills from top to bottom. |
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
font_colorColor | The color of the text. Default:Color(0.95, 0.95, 0.95, 1) |
font_outline_colorColor | The tint of text outline of the Color(0, 0, 0, 1) |
outline_sizeint | The size of the text outline.
Note: If using a font with 0 |
fontFont | Font used to draw the fill percentage if |
font_sizeint | Font size used to draw the fill percentage if |
backgroundStyleBox | The style of the background. |
fillStyleBox | The style of the progress (i.e. the part that fills the bar). |