Texture-based progress bar. Useful for loading screens and life or stamina bars.
    public class TextureProgress : Range

TextureProgress 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.

Inheritance Chain

Constructors

    public TextureProgress()

Properties

    public int FillMode { get; set; }

The fill direction. See FillMode for possible values.

    public bool NinePatchStretch { get; set; }

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 Vector2 RadialCenterOffset { get; set; }

Offsets TextureProgress_ if FillMode is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE].

    public float RadialFillDegrees { get; set; }

Upper limit for the fill of TextureProgress_ if FillMode is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node’s value is equal to its max_value, the texture fills up to this angle.

See Range.Value, Range.MaxValue.

    public float RadialInitialAngle { get; set; }

Starting angle for the fill of TextureProgress_ if FillMode is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. 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 int StretchMarginBottom { get; set; }

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 StretchMarginLeft { get; set; }

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

    public int StretchMarginRight { get; set; }

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

    public int StretchMarginTop { get; set; }

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

    public Texture TextureOver { get; set; }

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

    public Texture TextureProgress_ { get; set; }

Texture 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 Range.Value, Range.MinValue, Range.MaxValue.

    public Texture TextureUnder { get; set; }

Texture that draws under the progress bar. The bar’s background.

    public Color TintOver { get; set; }

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

    public Color TintProgress { get; set; }

Multiplies the color of the bar’s texture_progress texture.

    public Color TintUnder { get; set; }

Multiplies the color of the bar’s texture_under texture.

Methods

    [Obsolete("GetFillDegrees is deprecated. Use the RadialFillDegrees property instead.")]
    public float GetFillDegrees()

Getter for RadialFillDegrees

    [Obsolete("GetFillMode is deprecated. Use the FillMode property instead.")]
    public int GetFillMode()

Getter for FillMode

    [Obsolete("GetNinePatchStretch is deprecated. Use the NinePatchStretch property instead.")]
    public bool GetNinePatchStretch()

Getter for NinePatchStretch

    [Obsolete("GetOverTexture is deprecated. Use the TextureOver property instead.")]
    public Texture GetOverTexture()

Getter for TextureOver

    [Obsolete("GetProgressTexture is deprecated. Use the TextureProgress_ property instead.")]
    public Texture GetProgressTexture()

Getter for TextureProgress_

    [Obsolete("GetRadialCenterOffset is deprecated. Use the RadialCenterOffset property instead.")]
    public Vector2 GetRadialCenterOffset()

Getter for RadialCenterOffset

    [Obsolete("GetRadialInitialAngle is deprecated. Use the RadialInitialAngle property instead.")]
    public float GetRadialInitialAngle()

Getter for RadialInitialAngle

    [Obsolete("GetStretchMargin is deprecated. Use the StretchMarginBottom property instead.")]
    public int GetStretchMargin(Margin margin)

    [Obsolete("GetTintOver is deprecated. Use the TintOver property instead.")]
    public Color GetTintOver()

Getter for TintOver

    [Obsolete("GetTintProgress is deprecated. Use the TintProgress property instead.")]
    public Color GetTintProgress()

Getter for TintProgress

    [Obsolete("GetTintUnder is deprecated. Use the TintUnder property instead.")]
    public Color GetTintUnder()

Getter for TintUnder

    [Obsolete("GetUnderTexture is deprecated. Use the TextureUnder property instead.")]
    public Texture GetUnderTexture()

Getter for TextureUnder

    [Obsolete("SetFillDegrees is deprecated. Use the RadialFillDegrees property instead.")]
    public void SetFillDegrees(float mode)

Setter for RadialFillDegrees

    [Obsolete("SetFillMode is deprecated. Use the FillMode property instead.")]
    public void SetFillMode(int mode)

Setter for FillMode

    [Obsolete("SetNinePatchStretch is deprecated. Use the NinePatchStretch property instead.")]
    public void SetNinePatchStretch(bool stretch)

Setter for NinePatchStretch

    [Obsolete("SetOverTexture is deprecated. Use the TextureOver property instead.")]
    public void SetOverTexture(Texture tex)

Setter for TextureOver

    [Obsolete("SetProgressTexture is deprecated. Use the TextureProgress_ property instead.")]
    public void SetProgressTexture(Texture tex)

Setter for TextureProgress_

    [Obsolete("SetRadialCenterOffset is deprecated. Use the RadialCenterOffset property instead.")]
    public void SetRadialCenterOffset(Vector2 mode)

Setter for RadialCenterOffset

    [Obsolete("SetRadialInitialAngle is deprecated. Use the RadialInitialAngle property instead.")]
    public void SetRadialInitialAngle(float mode)

Setter for RadialInitialAngle

    [Obsolete("SetStretchMargin is deprecated. Use the StretchMarginBottom property instead.")]
    public void SetStretchMargin(Margin margin, int value)

    [Obsolete("SetTintOver is deprecated. Use the TintOver property instead.")]
    public void SetTintOver(Color tint)

Setter for TintOver

    [Obsolete("SetTintProgress is deprecated. Use the TintProgress property instead.")]
    public void SetTintProgress(Color tint)

Setter for TintProgress

    [Obsolete("SetTintUnder is deprecated. Use the TintUnder property instead.")]
    public void SetTintUnder(Color tint)

Setter for TintUnder

    [Obsolete("SetUnderTexture is deprecated. Use the TextureUnder property instead.")]
    public void SetUnderTexture(Texture tex)

Setter for TextureUnder

Inner Types

FillModeEnum

Name Value Description
LeftToRight 0 The [member texture_progress] fills from left to right.
RightToLeft 1 The [member texture_progress] fills from right to left.
TopToBottom 2 The [member texture_progress] fills from top to bototm.
BottomToTop 3 The [member texture_progress] fills from bottom to top.
Clockwise 4 Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
CounterClockwise 5 Turns the node into a radial bar. The [member texture_progress] fills counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
BilinearLeftAndRight 6 The [member texture_progress] fills from the center, expanding both towards the left and the right.
BilinearTopAndBottom 7 The [member texture_progress] fills from the center, expanding both towards the top and the bottom.
ClockwiseAndCounterClockwise 8 Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up.
Tags: