Files
godot-docs-l10n/classes/es/class_labelsettings.rst

510 lines
24 KiB
ReStructuredText

:github_url: hide
.. _class_LabelSettings:
LabelSettings
=============
**Hereda:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Proporciona ajustes comunes para personalizar el texto en una :ref:`Label<class_Label>`.
.. rst-class:: classref-introduction-group
Descripción
----------------------
**LabelSettings** es un recurso que proporciona ajustes comunes para personalizar el texto en una :ref:`Label<class_Label>`. Tendrá prioridad sobre las propiedades definidas en :ref:`Control.theme<class_Control_property_theme>`. El recurso se puede compartir entre múltiples etiquetas y cambiar sobre la marcha, por lo que es una forma conveniente y flexible de configurar el estilo del texto.
.. rst-class:: classref-reftable-group
Propiedades
----------------------
.. table::
:widths: auto
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`Font<class_Font>` | :ref:`font<class_LabelSettings_property_font>` | |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`Color<class_Color>` | :ref:`font_color<class_LabelSettings_property_font_color>` | ``Color(1, 1, 1, 1)`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`font_size<class_LabelSettings_property_font_size>` | ``16`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`float<class_float>` | :ref:`line_spacing<class_LabelSettings_property_line_spacing>` | ``3.0`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`Color<class_Color>` | :ref:`outline_color<class_LabelSettings_property_outline_color>` | ``Color(1, 1, 1, 1)`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`outline_size<class_LabelSettings_property_outline_size>` | ``0`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`float<class_float>` | :ref:`paragraph_spacing<class_LabelSettings_property_paragraph_spacing>` | ``0.0`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`Color<class_Color>` | :ref:`shadow_color<class_LabelSettings_property_shadow_color>` | ``Color(0, 0, 0, 0)`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`shadow_offset<class_LabelSettings_property_shadow_offset>` | ``Vector2(1, 1)`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`shadow_size<class_LabelSettings_property_shadow_size>` | ``1`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`stacked_outline_count<class_LabelSettings_property_stacked_outline_count>` | ``0`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
| :ref:`int<class_int>` | :ref:`stacked_shadow_count<class_LabelSettings_property_stacked_shadow_count>` | ``0`` |
+-------------------------------+----------------------------------------------------------------------------------+-----------------------+
.. rst-class:: classref-reftable-group
Métodos
--------------
.. table::
:widths: auto
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_stacked_outline<class_LabelSettings_method_add_stacked_outline>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_stacked_shadow<class_LabelSettings_method_add_stacked_shadow>`\ (\ index\: :ref:`int<class_int>` = -1\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_stacked_outline_color<class_LabelSettings_method_get_stacked_outline_color>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_stacked_outline_size<class_LabelSettings_method_get_stacked_outline_size>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`get_stacked_shadow_color<class_LabelSettings_method_get_stacked_shadow_color>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`get_stacked_shadow_offset<class_LabelSettings_method_get_stacked_shadow_offset>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_stacked_shadow_outline_size<class_LabelSettings_method_get_stacked_shadow_outline_size>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_stacked_outline<class_LabelSettings_method_move_stacked_outline>`\ (\ from_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`move_stacked_shadow<class_LabelSettings_method_move_stacked_shadow>`\ (\ from_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_stacked_outline<class_LabelSettings_method_remove_stacked_outline>`\ (\ index\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_stacked_shadow<class_LabelSettings_method_remove_stacked_shadow>`\ (\ index\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stacked_outline_color<class_LabelSettings_method_set_stacked_outline_color>`\ (\ index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stacked_outline_size<class_LabelSettings_method_set_stacked_outline_size>`\ (\ index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stacked_shadow_color<class_LabelSettings_method_set_stacked_shadow_color>`\ (\ index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stacked_shadow_offset<class_LabelSettings_method_set_stacked_shadow_offset>`\ (\ index\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_stacked_shadow_outline_size<class_LabelSettings_method_set_stacked_shadow_outline_size>`\ (\ index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Propiedades
--------------------------------------------------------
.. _class_LabelSettings_property_font:
.. rst-class:: classref-property
:ref:`Font<class_Font>` **font** :ref:`🔗<class_LabelSettings_property_font>`
.. rst-class:: classref-property-setget
- |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ )
- :ref:`Font<class_Font>` **get_font**\ (\ )
:ref:`Font<class_Font>` utilizada para el texto.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_font_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **font_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LabelSettings_property_font_color>`
.. rst-class:: classref-property-setget
- |void| **set_font_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_font_color**\ (\ )
El color del texto.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_font_size:
.. rst-class:: classref-property
:ref:`int<class_int>` **font_size** = ``16`` :ref:`🔗<class_LabelSettings_property_font_size>`
.. rst-class:: classref-property-setget
- |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_font_size**\ (\ )
El tamaño del texto.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_line_spacing:
.. rst-class:: classref-property
:ref:`float<class_float>` **line_spacing** = ``3.0`` :ref:`🔗<class_LabelSettings_property_line_spacing>`
.. rst-class:: classref-property-setget
- |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_line_spacing**\ (\ )
Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_outline_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **outline_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LabelSettings_property_outline_color>`
.. rst-class:: classref-property-setget
- |void| **set_outline_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_outline_color**\ (\ )
El color del contorno.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_outline_size:
.. rst-class:: classref-property
:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_LabelSettings_property_outline_size>`
.. rst-class:: classref-property-setget
- |void| **set_outline_size**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_outline_size**\ (\ )
Tamaño del contorno del texto.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_paragraph_spacing:
.. rst-class:: classref-property
:ref:`float<class_float>` **paragraph_spacing** = ``0.0`` :ref:`🔗<class_LabelSettings_property_paragraph_spacing>`
.. rst-class:: classref-property-setget
- |void| **set_paragraph_spacing**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_paragraph_spacing**\ (\ )
Espacio vertical entre párrafos. Se añade encima de :ref:`line_spacing<class_LabelSettings_property_line_spacing>`.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_shadow_color:
.. rst-class:: classref-property
:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_LabelSettings_property_shadow_color>`
.. rst-class:: classref-property-setget
- |void| **set_shadow_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- :ref:`Color<class_Color>` **get_shadow_color**\ (\ )
Color del efecto de sombra. Si el alfa es ``0``, no se dibujará ninguna sombra.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_shadow_offset:
.. rst-class:: classref-property
:ref:`Vector2<class_Vector2>` **shadow_offset** = ``Vector2(1, 1)`` :ref:`🔗<class_LabelSettings_property_shadow_offset>`
.. rst-class:: classref-property-setget
- |void| **set_shadow_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
- :ref:`Vector2<class_Vector2>` **get_shadow_offset**\ (\ )
Desplazamiento del efecto de sombra, en píxeles.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_shadow_size:
.. rst-class:: classref-property
:ref:`int<class_int>` **shadow_size** = ``1`` :ref:`🔗<class_LabelSettings_property_shadow_size>`
.. rst-class:: classref-property-setget
- |void| **set_shadow_size**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_shadow_size**\ (\ )
Tamaño del efecto de sombra.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_stacked_outline_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **stacked_outline_count** = ``0`` :ref:`🔗<class_LabelSettings_property_stacked_outline_count>`
.. rst-class:: classref-property-setget
- |void| **set_stacked_outline_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_stacked_outline_count**\ (\ )
El número de contornos apilados.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_property_stacked_shadow_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **stacked_shadow_count** = ``0`` :ref:`🔗<class_LabelSettings_property_stacked_shadow_count>`
.. rst-class:: classref-property-setget
- |void| **set_stacked_shadow_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_stacked_shadow_count**\ (\ )
El número de sombras apiladas.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Métodos
------------------------------------------------
.. _class_LabelSettings_method_add_stacked_outline:
.. rst-class:: classref-method
|void| **add_stacked_outline**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_LabelSettings_method_add_stacked_outline>`
Añade un nuevo contorno apilado a la etiqueta en el ``index`` dado. Si el ``index`` es ``-1``, el nuevo contorno apilado se añadirá al final de la lista.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_add_stacked_shadow:
.. rst-class:: classref-method
|void| **add_stacked_shadow**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_LabelSettings_method_add_stacked_shadow>`
Añade una nueva sombra apilada a la etiqueta en el ``index`` dado. Si ``index`` es ``-1``, la nueva sombra apilada se añadirá al final de la lista.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_get_stacked_outline_color:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **get_stacked_outline_color**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LabelSettings_method_get_stacked_outline_color>`
Devuelve el color del contorno apilado en ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_get_stacked_outline_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_stacked_outline_size**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LabelSettings_method_get_stacked_outline_size>`
Devuelve el tamaño del contorno apilado en ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_get_stacked_shadow_color:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **get_stacked_shadow_color**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LabelSettings_method_get_stacked_shadow_color>`
Devuelve el color de la sombra apilada en ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_get_stacked_shadow_offset:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **get_stacked_shadow_offset**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LabelSettings_method_get_stacked_shadow_offset>`
Devuelve el desplazamiento de la sombra apilada en ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_get_stacked_shadow_outline_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_stacked_shadow_outline_size**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LabelSettings_method_get_stacked_shadow_outline_size>`
Devuelve el tamaño del contorno de la sombra apilada en el ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_move_stacked_outline:
.. rst-class:: classref-method
|void| **move_stacked_outline**\ (\ from_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_move_stacked_outline>`
Mueve el contorno apilado en el índice ``from_index`` a la posición dada ``to_position`` en el array.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_move_stacked_shadow:
.. rst-class:: classref-method
|void| **move_stacked_shadow**\ (\ from_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_move_stacked_shadow>`
Mueve la sombra apilada en el índice ``from_index`` a la posición dada ``to_position`` en el array.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_remove_stacked_outline:
.. rst-class:: classref-method
|void| **remove_stacked_outline**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_remove_stacked_outline>`
Elimina el contorno apilado en el índice ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_remove_stacked_shadow:
.. rst-class:: classref-method
|void| **remove_stacked_shadow**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_remove_stacked_shadow>`
Elimina la sombra apilada en el índice ``index``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_set_stacked_outline_color:
.. rst-class:: classref-method
|void| **set_stacked_outline_color**\ (\ index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_LabelSettings_method_set_stacked_outline_color>`
Establece el color del contorno apilado identificado por el ``index`` dado a ``color``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_set_stacked_outline_size:
.. rst-class:: classref-method
|void| **set_stacked_outline_size**\ (\ index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_set_stacked_outline_size>`
Establece el tamaño del contorno apilado identificado por el ``index`` dado a ``size``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_set_stacked_shadow_color:
.. rst-class:: classref-method
|void| **set_stacked_shadow_color**\ (\ index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_LabelSettings_method_set_stacked_shadow_color>`
Establece el color de la sombra apilada identificada por el ``index`` dado a ``color``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_set_stacked_shadow_offset:
.. rst-class:: classref-method
|void| **set_stacked_shadow_offset**\ (\ index\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_LabelSettings_method_set_stacked_shadow_offset>`
Establece el desplazamiento de la sombra apilada identificada por el ``index`` dado a ``offset``.
.. rst-class:: classref-item-separator
----
.. _class_LabelSettings_method_set_stacked_shadow_outline_size:
.. rst-class:: classref-method
|void| **set_stacked_shadow_outline_size**\ (\ index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LabelSettings_method_set_stacked_shadow_outline_size>`
Establece el tamaño del contorno de la sombra apilada identificada por el ``index`` dado a ``size``.
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`