TextureProgress

Inherits: Range < Control < CanvasItem < Node < Object

Barra de progreso basada en la textura. Útil para cargar pantallas y barras de vida o resistencia.

Descripción

TextureProgress funciona como ProgressBar, pero utiliza hasta 3 texturas en lugar del recurso Theme de Godot. Se puede utilizar para crear barras de progreso horizontales, verticales y radiales.

Propiedades

int

fill_mode

0

MouseFilter

mouse_filter

1 (overrides Control)

bool

nine_patch_stretch

false

Vector2

radial_center_offset

Vector2( 0, 0 )

float

radial_fill_degrees

360.0

float

radial_initial_angle

0.0

int

stretch_margin_bottom

0

int

stretch_margin_left

0

int

stretch_margin_right

0

int

stretch_margin_top

0

Texture

texture_over

Texture

texture_progress

Vector2

texture_progress_offset

Vector2( 0, 0 )

Texture

texture_under

Color

tint_over

Color( 1, 1, 1, 1 )

Color

tint_progress

Color( 1, 1, 1, 1 )

Color

tint_under

Color( 1, 1, 1, 1 )

Métodos

int

get_stretch_margin ( Margin margin ) const

void

set_stretch_margin ( Margin margin, int value )

Enumeraciones

enum FillMode:

Descripciones de Propiedades

  • int fill_mode

Default

0

Setter

set_fill_mode(value)

Getter

get_fill_mode()

La dirección de llenado. Ver FillMode para los posibles valores.


  • bool nine_patch_stretch

Default

false

Setter

set_nine_patch_stretch(value)

Getter

get_nine_patch_stretch()

Si true, Godot trata las texturas de la barra como en NinePatchRect. Usa las propiedades de stretch_margin_* como en stretch_margin_bottom para configurar la cuadrícula de 3×3 del nueve parche. Cuando se utiliza un fill_mode radial, este ajuste permitirá el estiramiento.


Default

Vector2( 0, 0 )

Setter

set_radial_center_offset(value)

Getter

get_radial_center_offset()

Desplaza texture_progress si fill_mode es FILL_CLOCKWISE o FILL_COUNTER_CLOCKWISE.


  • float radial_fill_degrees

Default

360.0

Setter

set_fill_degrees(value)

Getter

get_fill_degrees()

Límite superior para el relleno de texture_progress si el fill_mode es FILL_CLOCKWISE o FILL_COUNTER_CLOCKWISE. Cuando el value del nodo es igual a su max_value, la textura se rellena hasta este ángulo.

Ver Range.value, Range.max_value.


  • float radial_initial_angle

Default

0.0

Setter

set_radial_initial_angle(value)

Getter

get_radial_initial_angle()

Ángulo inicial para el relleno de texture_progress si fill_mode es FILL_CLOCKWISE o FILL_COUNTER_CLOCKWISE. Cuando el value del nodo es igual a su min_value, la textura no se muestra en absoluto. Cuando el value aumenta, la textura se llena y tiende hacia radial_fill_degrees.


  • int stretch_margin_bottom

Default

0

Setter

set_stretch_margin(value)

Getter

get_stretch_margin()

La altura de la fila inferior del 9-patch. Un margen de 16 significa que las esquinas y el lado inferior del 9-patch tendrán una altura de 16 píxeles. Puede establecer los 4 valores de margen individualmente para crear paneles con bordes no uniformes.


  • int stretch_margin_left

Default

0

Setter

set_stretch_margin(value)

Getter

get_stretch_margin()

El ancho de la columna izquierda del 9-patch.


  • int stretch_margin_right

Default

0

Setter

set_stretch_margin(value)

Getter

get_stretch_margin()

El ancho de la columna derecha del 9-patch.


  • int stretch_margin_top

Default

0

Setter

set_stretch_margin(value)

Getter

get_stretch_margin()

La altura de la fila superior del 9-patch.


Setter

set_over_texture(value)

Getter

get_over_texture()

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


Setter

set_progress_texture(value)

Getter

get_progress_texture()

Texture that clips based on the node's value and fill_mode. 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.min_value, Range.max_value.


Default

Vector2( 0, 0 )

Setter

set_texture_progress_offset(value)

Getter

get_texture_progress_offset()

The offset of texture_progress. Useful for texture_over and texture_under with fancy borders, to avoid transparent margins in your progress texture.


Setter

set_under_texture(value)

Getter

get_under_texture()

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


Default

Color( 1, 1, 1, 1 )

Setter

set_tint_over(value)

Getter

get_tint_over()

Multiplica el color de la textura texture_over de la barra. El efecto es similar al de CanvasItem.modulate, excepto que sólo afecta a esta textura específica en lugar de a todo el nodo.


Default

Color( 1, 1, 1, 1 )

Setter

set_tint_progress(value)

Getter

get_tint_progress()

Multiplica el color de la textura texture_progress de la barra.


Default

Color( 1, 1, 1, 1 )

Setter

set_tint_under(value)

Getter

get_tint_under()

Multiplica el color de la textura texture_under de la barra.

Descripciones de Métodos

  • int get_stretch_margin ( Margin margin ) const


  • void set_stretch_margin ( Margin margin, int value )