Class reference

TextureProgressBar

Inherits Range

Texture-based progress bar. Useful for loading screens and life or stamina bars.

Description

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

Properties

int fill_mode = 0

The fill direction. See FillMode for possible values.

int mouse_filter = 1

int size_flags_vertical = 1

int stretch_margin_bottom = 0

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. Only effective if nine_patch_stretch is true.

int stretch_margin_left = 0

The width of the 9-patch's left column. Only effective if nine_patch_stretch is true.

int stretch_margin_right = 0

The width of the 9-patch's right column. Only effective if nine_patch_stretch is true.

int stretch_margin_top = 0

The height of the 9-patch's top row. Only effective if nine_patch_stretch is true.

Color tint_over = Color(1, 1, 1, 1)

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.

Color tint_under = Color(1, 1, 1, 1)

Multiplies the color of the bar's texture_under texture.

Methods

int get_stretch_margin(int margin) const

Returns the stretch margin with the specified index. See stretch_margin_bottom and related properties.

void set_stretch_margin(int margin, int value)

Sets the stretch margin with the specified index. See stretch_margin_bottom and related properties.

Constants

FILL_LEFT_TO_RIGHT = 0

Enum: FillMode

The texture_progress fills from left to right.

FILL_RIGHT_TO_LEFT = 1

Enum: FillMode

The texture_progress fills from right to left.

FILL_TOP_TO_BOTTOM = 2

Enum: FillMode

The texture_progress fills from top to bottom.

FILL_BOTTOM_TO_TOP = 3

Enum: FillMode

The texture_progress fills from bottom to top.

FILL_BILINEAR_LEFT_AND_RIGHT = 6

Enum: FillMode

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

FILL_BILINEAR_TOP_AND_BOTTOM = 7

Enum: FillMode

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

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.