Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
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¶
|
||
mouse_filter |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos¶
get_stretch_margin ( Margin margin ) const |
|
void |
set_stretch_margin ( Margin margin, int value ) |
Enumeraciones¶
enum FillMode:
FILL_LEFT_TO_RIGHT = 0 --- El texture_progress se llena de izquierda a derecha.
FILL_RIGHT_TO_LEFT = 1 --- El texture_progress se llena de derecha a izquierda.
FILL_TOP_TO_BOTTOM = 2 --- El texture_progress se llena de arriba a abajo.
FILL_BOTTOM_TO_TOP = 3 --- El texture_progress se llena de abajo a arriba.
FILL_CLOCKWISE = 4 --- Convierte el nodo en una barra radial. El texture_progress se llena en el sentido de las agujas del reloj. Vea radial_center_offset, radial_initial_angle y radial_fill_degrees para controlar la forma en que la barra se llena.
FILL_COUNTER_CLOCKWISE = 5 --- Convierte el nodo en una barra radial. El texture_progress se llena en sentido contrario a las agujas del reloj. Ver radial_center_offset, radial_initial_angle y radial_fill_degrees para controlar la forma en que la barra se llena.
FILL_BILINEAR_LEFT_AND_RIGHT = 6 --- El texture_progress se llena desde el centro, expandiéndose tanto hacia la izquierda como hacia la derecha.
FILL_BILINEAR_TOP_AND_BOTTOM = 7 --- El texture_progress se llena desde el centro, expandiéndose tanto hacia arriba como hacia abajo.
FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE = 8 --- Convierte el nodo en una barra radial. El texture_progress se llena radialmente desde el centro, expandiéndose tanto en sentido horario como antihorario. Vea radial_center_offset, radial_initial_angle y radial_fill_degrees para controlar la forma en que la barra se llena.
Descripciones de Propiedades¶
int fill_mode
Default |
|
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 |
|
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.
Vector2 radial_center_offset
Default |
|
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 |
|
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 |
|
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 |
|
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 |
|
Setter |
set_stretch_margin(value) |
Getter |
get_stretch_margin() |
El ancho de la columna izquierda del 9-patch.
int stretch_margin_right
Default |
|
Setter |
set_stretch_margin(value) |
Getter |
get_stretch_margin() |
El ancho de la columna derecha del 9-patch.
int stretch_margin_top
Default |
|
Setter |
set_stretch_margin(value) |
Getter |
get_stretch_margin() |
La altura de la fila superior del 9-patch.
Texture texture_over
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.
Texture 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.
Vector2 texture_progress_offset
Default |
|
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.
Texture texture_under
Setter |
set_under_texture(value) |
Getter |
get_under_texture() |
Texture that draws under the progress bar. The bar's background.
Color tint_over
Default |
|
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.
Color tint_progress
Default |
|
Setter |
set_tint_progress(value) |
Getter |
get_tint_progress() |
Multiplica el color de la textura texture_progress
de la barra.
Color tint_under
Default |
|
Setter |
set_tint_under(value) |
Getter |
get_tint_under() |
Multiplica el color de la textura texture_under
de la barra.