reckfellENGINE

TextureProgressBar

Linear or radial progress drawn from three texture layers.

On this page
class TextureProgressBarReckfellSharpInherits Range

TextureUnder draws the background, TextureProgress draws partially according to Ratio, and TextureOver draws on top. Layers are optional with separate Tint settings. Your code supplies Value; this class does not provide ProgressBar’s percentage label or Indeterminate mode. Step defaults to 1: configure it explicitly for smooth fractional progress.

For example, MinValue = 0, MaxValue = 200 and Value = 50 give Ratio = 0.25. Normally leave Page = 0. For an ordinary bar, choose FillModeEnum.LeftToRight or another linear direction; FillMode takes int, so cast the enum. LeftToRight/RightToLeft are explicit directions rather than automatic RTL Begin/End modes.

Without NinePatchStretch, layers use source texture sizes and intrinsic minimum is their componentwise maximum, at least 1 × 1. Increasing Size alone does not stretch a linear texture. NinePatchStretch enables border-aware stretching using StretchMargin and changes minimum size to opposite-border sums. Those sums remain even without textures. Use nonnegative borders that fit the source layers.

For radial progress, choose Clockwise, CounterClockwise or ClockwiseAndCounterClockwise. RadialInitialAngle specifies the start in degrees: 0 points upward. RadialFillDegrees sets maximum span 0…360; actual span is Ratio × RadialFillDegrees. For example, Ratio = 0.5 with span 180 produces a 90° sector. A ring shape comes from an image with transparency rather than radial mode itself. Radial fill is not sliced as a nine-patch; enabling NinePatchStretch scales it to Size.

RadialCenterOffset is a pixel offset from source texture center. The stored offset is unrestricted, but the effective calculated center is clamped to the texture rectangle. TextureProgressOffset shifts fill without increasing intrinsic minimum. In the current nine-patch path, layer identity is determined by resource equality: a background or overlay using the fill resource can receive the offset too. Use separate texture instances for independent offsets; this documents an implementation limitation rather than an engine fix.

Texture references are shared. Source-resource changes affect layers using it; Tint affects only the corresponding layer’s display. MouseFilter defaults to Pass — use Ignore for a decorative indicator over interactive elements.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TextureProgressBarConstructor
# TextureProgressBar
C#
public TextureProgressBar();

Creates an indicator without textures: Value = 0, bounds 0…100, Step = 1, LeftToRight direction, NinePatchStretch = false, white tints. MouseFilter = Pass.

Properties16

FillModeProperty
# FillMode
C#
public int FillMode { get; set; }

Fill direction: linear, two symmetric Bilinear and three radial modes. Takes int from TextureProgressBar.FillModeEnum; default LeftToRight. Does not change Value. Bilinear here means two-sided filling rather than texture filtering.

NinePatchStretchProperty
# NinePatchStretch
C#
public bool NinePatchStretch { get; set; }

Default false: linear layers draw at source size. true stretches using StretchMargin and sets minimum size to border sums. With true, radial fill scales to Size without nine-patch slicing; background/overlay use the ordinary nine-patch path.

RadialCenterOffsetProperty
# RadialCenterOffset
C#
public Vector2 RadialCenterOffset { get; set; }

Pixel offset from source TextureProgress center, default Vector2.Zero. Getter returns the stored offset; effective drawing center is clamped to the texture rectangle.

RadialFillDegreesProperty
# RadialFillDegrees
C#
public float RadialFillDegrees { get; set; }

Maximum radial span in degrees, default 360. Clamped to 0…360 rather than wrapped; actual span is multiplied by Ratio. Supply a finite number.

RadialInitialAngleProperty
# RadialInitialAngle
C#
public float RadialInitialAngle { get; set; }

Initial radial angle in degrees; default 0 points upward. Finite values outside 0…360 wrap modulo 360; exactly 360 is retained. NaN/infinity are rejected. Does not choose linear-mode direction.

StretchMarginBottomProperty
# StretchMarginBottom
C#
public int StretchMarginBottom { get; set; }

Bottom border thickness in source pixels, default 0. Contributes to minimum-size sums with NinePatchStretch. Not content padding; validate border sums.

StretchMarginLeftProperty
# StretchMarginLeft
C#
public int StretchMarginLeft { get; set; }

Left border thickness in source pixels, default 0. Contributes to minimum-size sums with NinePatchStretch. Not content padding; validate border sums.

StretchMarginRightProperty
# StretchMarginRight
C#
public int StretchMarginRight { get; set; }

Right border thickness in source pixels, default 0. Contributes to minimum-size sums with NinePatchStretch. Not content padding; validate border sums.

StretchMarginTopProperty
# StretchMarginTop
C#
public int StretchMarginTop { get; set; }

Top border thickness in source pixels, default 0. Contributes to minimum-size sums with NinePatchStretch. Not content padding; validate border sums.

TextureOverProperty
# TextureOver
C#
public Texture2D TextureOver { get; set; }

Overlay shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

TextureProgressProperty
# TextureProgress
C#
public Texture2D TextureProgress { get; set; }

Partially shown fill shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

TextureProgressOffsetProperty
# TextureProgressOffset
C#
public Vector2 TextureProgressOffset { get; set; }

Fill offset in local pixels, default Vector2.Zero. Does not increase minimum size. In the nine-patch path, a matching background/overlay resource can receive the same offset; use separate texture instances for independence.

TextureUnderProperty
# TextureUnder
C#
public Texture2D TextureUnder { get; set; }

Background shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

TintOverProperty
# TintOver
C#
public Color TintOver { get; set; }

Color/alpha multiplier for the overlay layer, default white. Does not edit source texture pixels or set Value.

TintProgressProperty
# TintProgress
C#
public Color TintProgress { get; set; }

Color/alpha multiplier for the fill layer, default white. Does not edit source texture pixels or set Value.

TintUnderProperty
# TintUnder
C#
public Color TintUnder { get; set; }

Color/alpha multiplier for the background layer, default white. Does not edit source texture pixels or set Value.

Methods26

GetFillDegreesfloat
# GetFillDegrees
C#
public float GetFillDegrees();

Maximum radial span in degrees, default 360. Clamped to 0…360 rather than wrapped; actual span is multiplied by Ratio. Supply a finite number.

Returns float

Stored maximum span in degrees, clamped to 0…360.

GetFillModeint
# GetFillMode
C#
public int GetFillMode();

Fill direction: linear, two symmetric Bilinear and three radial modes. Takes int from TextureProgressBar.FillModeEnum; default LeftToRight. Does not change Value. Bilinear here means two-sided filling rather than texture filtering.

Returns int

Numeric value of the selected TextureProgressBar.FillModeEnum.

GetNinePatchStretchbool
# GetNinePatchStretch
C#
public bool GetNinePatchStretch();

Default false: linear layers draw at source size. true stretches using StretchMargin and sets minimum size to border sums. With true, radial fill scales to Size without nine-patch slicing; background/overlay use the ordinary nine-patch path.

Returns bool

true when border-aware stretching is enabled.

GetOverTextureTexture2D
# GetOverTexture
C#
public Texture2D GetOverTexture();

Overlay shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Returns Texture2D

Current shared Texture2D, or null.

GetProgressTextureTexture2D
# GetProgressTexture
C#
public Texture2D GetProgressTexture();

Partially shown fill shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Returns Texture2D

Current shared Texture2D, or null.

GetRadialCenterOffsetVector2
# GetRadialCenterOffset
C#
public Vector2 GetRadialCenterOffset();

Pixel offset from source TextureProgress center, default Vector2.Zero. Getter returns the stored offset; effective drawing center is clamped to the texture rectangle.

Returns Vector2

Stored pixel offset from source texture center rather than the clamped effective center.

GetRadialInitialAnglefloat
# GetRadialInitialAngle
C#
public float GetRadialInitialAngle();

Initial radial angle in degrees; default 0 points upward. Finite values outside 0…360 wrap modulo 360; exactly 360 is retained. NaN/infinity are rejected. Does not choose linear-mode direction.

Returns float

Stored initial angle in degrees after range normalization.

GetStretchMarginint
# GetStretchMargin
C#
public int GetStretchMargin(Side margin);

Returns stored selected-border thickness in pixels. Borders define minimum size with NinePatchStretch rather than child-content padding.

Parameters
NameTypeDefault
marginSide—
margin

Selected Side.Left, Top, Right or Bottom.

Returns int

Stored thickness of the selected border in source pixels.

GetTextureProgressOffsetVector2
# GetTextureProgressOffset
C#
public Vector2 GetTextureProgressOffset();

Fill offset in local pixels, default Vector2.Zero. Does not increase minimum size. In the nine-patch path, a matching background/overlay resource can receive the same offset; use separate texture instances for independence.

Returns Vector2

Stored local fill offset in pixels.

GetTintOverColor
# GetTintOver
C#
public Color GetTintOver();

Color/alpha multiplier for the overlay layer, default white. Does not edit source texture pixels or set Value.

Returns Color

Overlay-layer color and alpha multiplier.

GetTintProgressColor
# GetTintProgress
C#
public Color GetTintProgress();

Color/alpha multiplier for the fill layer, default white. Does not edit source texture pixels or set Value.

Returns Color

Fill-layer color and alpha multiplier.

GetTintUnderColor
# GetTintUnder
C#
public Color GetTintUnder();

Color/alpha multiplier for the background layer, default white. Does not edit source texture pixels or set Value.

Returns Color

Background-layer color and alpha multiplier.

GetUnderTextureTexture2D
# GetUnderTexture
C#
public Texture2D GetUnderTexture();

Background shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Returns Texture2D

Current shared Texture2D, or null.

SetFillDegreesvoid
# SetFillDegrees
C#
public void SetFillDegrees(float mode);

Maximum radial span in degrees, default 360. Clamped to 0…360 rather than wrapped; actual span is multiplied by Ratio. Supply a finite number.

Parameters
NameTypeDefault
modefloat—
mode

Maximum radial span in degrees, default 360. Clamped to 0…360 rather than wrapped; actual span is multiplied by Ratio. Supply a finite number.

SetFillModevoid
# SetFillMode
C#
public void SetFillMode(int mode);

Fill direction: linear, two symmetric Bilinear and three radial modes. Takes int from TextureProgressBar.FillModeEnum; default LeftToRight. Does not change Value. Bilinear here means two-sided filling rather than texture filtering.

Parameters
NameTypeDefault
modeint—
mode

Fill direction: linear, two symmetric Bilinear and three radial modes. Takes int from TextureProgressBar.FillModeEnum; default LeftToRight. Does not change Value. Bilinear here means two-sided filling rather than texture filtering.

SetNinePatchStretchvoid
# SetNinePatchStretch
C#
public void SetNinePatchStretch(bool stretch);

Default false: linear layers draw at source size. true stretches using StretchMargin and sets minimum size to border sums. With true, radial fill scales to Size without nine-patch slicing; background/overlay use the ordinary nine-patch path.

Parameters
NameTypeDefault
stretchbool—
stretch

Default false: linear layers draw at source size. true stretches using StretchMargin and sets minimum size to border sums. With true, radial fill scales to Size without nine-patch slicing; background/overlay use the ordinary nine-patch path.

SetOverTexturevoid
# SetOverTexture
C#
public void SetOverTexture(Texture2D tex);

Overlay shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Parameters
NameTypeDefault
texTexture2D—
tex

Shared Texture2D, or null to clear the layer.

SetProgressTexturevoid
# SetProgressTexture
C#
public void SetProgressTexture(Texture2D tex);

Partially shown fill shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Parameters
NameTypeDefault
texTexture2D—
tex

Shared Texture2D, or null to clear the layer.

SetRadialCenterOffsetvoid
# SetRadialCenterOffset
C#
public void SetRadialCenterOffset(Vector2 mode);

Pixel offset from source TextureProgress center, default Vector2.Zero. Getter returns the stored offset; effective drawing center is clamped to the texture rectangle.

Parameters
NameTypeDefault
modeVector2—
mode

Pixel offset from source TextureProgress center, default Vector2.Zero. Getter returns the stored offset; effective drawing center is clamped to the texture rectangle.

SetRadialInitialAnglevoid
# SetRadialInitialAngle
C#
public void SetRadialInitialAngle(float mode);

Initial radial angle in degrees; default 0 points upward. Finite values outside 0…360 wrap modulo 360; exactly 360 is retained. NaN/infinity are rejected. Does not choose linear-mode direction.

Parameters
NameTypeDefault
modefloat—
mode

Initial radial angle in degrees; default 0 points upward. Finite values outside 0…360 wrap modulo 360; exactly 360 is retained. NaN/infinity are rejected. Does not choose linear-mode direction.

SetStretchMarginvoid
# SetStretchMargin
C#
public void SetStretchMargin(Side margin, int value);

Sets border thickness in pixels. Side is validated; size is not automatically constrained. Use nonnegative values whose sums fit every source layer in use.

Parameters
NameTypeDefault
marginSide—
valueint—
margin

Selected Side.Left, Top, Right or Bottom.

value

Nonnegative border thickness in source pixels; validate the opposite-border sum.

SetTextureProgressOffsetvoid
# SetTextureProgressOffset
C#
public void SetTextureProgressOffset(Vector2 offset);

Fill offset in local pixels, default Vector2.Zero. Does not increase minimum size. In the nine-patch path, a matching background/overlay resource can receive the same offset; use separate texture instances for independence.

Parameters
NameTypeDefault
offsetVector2—
offset

Fill offset in local pixels, default Vector2.Zero. Does not increase minimum size. In the nine-patch path, a matching background/overlay resource can receive the same offset; use separate texture instances for independence.

SetTintOvervoid
# SetTintOver
C#
public void SetTintOver(Color tint);

Color/alpha multiplier for the overlay layer, default white. Does not edit source texture pixels or set Value.

Parameters
NameTypeDefault
tintColor—
tint

Color/alpha multiplier for the overlay layer, default white. Does not edit source texture pixels or set Value.

SetTintProgressvoid
# SetTintProgress
C#
public void SetTintProgress(Color tint);

Color/alpha multiplier for the fill layer, default white. Does not edit source texture pixels or set Value.

Parameters
NameTypeDefault
tintColor—
tint

Color/alpha multiplier for the fill layer, default white. Does not edit source texture pixels or set Value.

SetTintUndervoid
# SetTintUnder
C#
public void SetTintUnder(Color tint);

Color/alpha multiplier for the background layer, default white. Does not edit source texture pixels or set Value.

Parameters
NameTypeDefault
tintColor—
tint

Color/alpha multiplier for the background layer, default white. Does not edit source texture pixels or set Value.

SetUnderTexturevoid
# SetUnderTexture
C#
public void SetUnderTexture(Texture2D tex);

Background shared Texture2D, or null. Resource is not copied; changes are observed. Without NinePatchStretch, layer size contributes to Control minimum.

Parameters
NameTypeDefault
texTexture2D—
tex

Shared Texture2D, or null to clear the layer.

TextureProgressBar.FillModeEnum

ValueDescription
BilinearLeftAndRight = 6

The TextureProgressBar.TextureProgress fills from the center, expanding both towards the left and the right.

BilinearTopAndBottom = 7

The TextureProgressBar.TextureProgress fills from the center, expanding both towards the top and the bottom.

BottomToTop = 3

The TextureProgressBar.TextureProgress fills from bottom to top.

Clockwise = 4

Turns the node into a radial bar. The TextureProgressBar.TextureProgress fills clockwise. See TextureProgressBar.RadialCenterOffset, TextureProgressBar.RadialInitialAngle and TextureProgressBar.RadialFillDegrees to control the way the bar fills up.

ClockwiseAndCounterClockwise = 8

Turns the node into a radial bar. The TextureProgressBar.TextureProgress fills radially from the center, expanding both clockwise and counterclockwise. See TextureProgressBar.RadialCenterOffset, TextureProgressBar.RadialInitialAngle and TextureProgressBar.RadialFillDegrees to control the way the bar fills up.

CounterClockwise = 5

Turns the node into a radial bar. The TextureProgressBar.TextureProgress fills counterclockwise. See TextureProgressBar.RadialCenterOffset, TextureProgressBar.RadialInitialAngle and TextureProgressBar.RadialFillDegrees to control the way the bar fills up.

LeftToRight = 0

The TextureProgressBar.TextureProgress fills from left to right.

RightToLeft = 1

The TextureProgressBar.TextureProgress fills from right to left.

TopToBottom = 2

The TextureProgressBar.TextureProgress fills from top to bottom.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.