Table of Contents

Class TextureProgressBar

Namespace
Godot
Assembly
GodotSharp.dll

TextureProgressBar works like ProgressBar, but uses up to 3 textures instead of Godot's Theme resource. It can be used to create horizontal, vertical and radial progress bars.

public class TextureProgressBar : Range, IDisposable
Inheritance
TextureProgressBar
Implements
Inherited Members

Constructors

TextureProgressBar()

public TextureProgressBar()

Properties

FillMode

The fill direction. See TextureProgressBar.FillModeEnum for possible values.

public int FillMode { get; set; }

Property Value

int

NinePatchStretch

If true, Godot treats the bar's textures like in NinePatchRect. Use the stretch_margin_* properties like StretchMarginBottom to set up the nine patch's 3×3 grid. When using a radial FillMode, this setting will enable stretching.

public bool NinePatchStretch { get; set; }

Property Value

bool

RadialCenterOffset

public Vector2 RadialCenterOffset { get; set; }

Property Value

Vector2

RadialFillDegrees

Upper limit for the fill of TextureProgress if FillMode is Clockwise or CounterClockwise. When the node's value is equal to its max_value, the texture fills up to this angle.

See Value, MaxValue.

public float RadialFillDegrees { get; set; }

Property Value

float

RadialInitialAngle

Starting angle for the fill of TextureProgress if FillMode is Clockwise or CounterClockwise. When the node's value is equal to its min_value, the texture doesn't show up at all. When the value increases, the texture fills and tends towards RadialFillDegrees.

public float RadialInitialAngle { get; set; }

Property Value

float

StretchMarginBottom

The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.

public int StretchMarginBottom { get; set; }

Property Value

int

StretchMarginLeft

The width of the 9-patch's left column.

public int StretchMarginLeft { get; set; }

Property Value

int

StretchMarginRight

The width of the 9-patch's right column.

public int StretchMarginRight { get; set; }

Property Value

int

StretchMarginTop

The height of the 9-patch's top row.

public int StretchMarginTop { get; set; }

Property Value

int

TextureOver

Texture2D that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of TextureProgress.

public Texture2D TextureOver { get; set; }

Property Value

Texture2D

TextureProgress

Texture2D that clips based on the node's value and FillMode. As value increased, the texture fills up. It shows entirely when value reaches max_value. It doesn't show at all if value is equal to min_value.

The value property comes from Range. See Value, MinValue, MaxValue.

public Texture2D TextureProgress { get; set; }

Property Value

Texture2D

TextureProgressOffset

The offset of TextureProgress. Useful for TextureOver and TextureUnder with fancy borders, to avoid transparent margins in your progress texture.

public Vector2 TextureProgressOffset { get; set; }

Property Value

Vector2

TextureUnder

Texture2D that draws under the progress bar. The bar's background.

public Texture2D TextureUnder { get; set; }

Property Value

Texture2D

TintOver

Multiplies the color of the bar's TextureOver texture. The effect is similar to Modulate, except it only affects this specific texture instead of the entire node.

public Color TintOver { get; set; }

Property Value

Color

TintProgress

Multiplies the color of the bar's TextureProgress texture.

public Color TintProgress { get; set; }

Property Value

Color

TintUnder

Multiplies the color of the bar's TextureUnder texture.

public Color TintUnder { get; set; }

Property Value

Color

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool