mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
410 lines
22 KiB
ReStructuredText
410 lines
22 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
||
.. DO NOT EDIT THIS FILE, but the StyleBoxTexture.xml source instead.
|
||
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
||
|
||
.. _class_StyleBoxTexture:
|
||
|
||
StyleBoxTexture
|
||
===============
|
||
|
||
**Inherits:** :ref:`StyleBox<class_StyleBox>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||
|
||
Textura basada en nine-patch :ref:`StyleBox<class_StyleBox>`.
|
||
|
||
Descripción
|
||
----------------------
|
||
|
||
Textura basada en nine-patch :ref:`StyleBox<class_StyleBox>`, de forma similar a :ref:`NinePatchRect<class_NinePatchRect>`. Este cuadro de estilo realiza una escala de 3×3 de una textura, donde sólo la celda central se estira completamente. Esto hace posible diseñar estilos con bordes sin importar el tamaño del cuadro de estilo.
|
||
|
||
Propiedades
|
||
----------------------
|
||
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` | :ref:`axis_stretch_horizontal<class_StyleBoxTexture_property_axis_stretch_horizontal>` | ``0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` | :ref:`axis_stretch_vertical<class_StyleBoxTexture_property_axis_stretch_vertical>` | ``0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`draw_center<class_StyleBoxTexture_property_draw_center>` | ``true`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`expand_margin_bottom<class_StyleBoxTexture_property_expand_margin_bottom>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`expand_margin_left<class_StyleBoxTexture_property_expand_margin_left>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`expand_margin_right<class_StyleBoxTexture_property_expand_margin_right>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`expand_margin_top<class_StyleBoxTexture_property_expand_margin_top>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`margin_bottom<class_StyleBoxTexture_property_margin_bottom>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`margin_left<class_StyleBoxTexture_property_margin_left>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`margin_right<class_StyleBoxTexture_property_margin_right>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`float<class_float>` | :ref:`margin_top<class_StyleBoxTexture_property_margin_top>` | ``0.0`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`Color<class_Color>` | :ref:`modulate_color<class_StyleBoxTexture_property_modulate_color>` | ``Color( 1, 1, 1, 1 )`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`Texture<class_Texture>` | :ref:`normal_map<class_StyleBoxTexture_property_normal_map>` | |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`Rect2<class_Rect2>` | :ref:`region_rect<class_StyleBoxTexture_property_region_rect>` | ``Rect2( 0, 0, 0, 0 )`` |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
| :ref:`Texture<class_Texture>` | :ref:`texture<class_StyleBoxTexture_property_texture>` | |
|
||
+--------------------------------------------------------------+----------------------------------------------------------------------------------------+-------------------------+
|
||
|
||
Métodos
|
||
--------------
|
||
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_expand_margin_size<class_StyleBoxTexture_method_get_expand_margin_size>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`float<class_float>` | :ref:`get_margin_size<class_StyleBoxTexture_method_get_margin_size>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const| |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| void | :ref:`set_expand_margin_all<class_StyleBoxTexture_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| void | :ref:`set_expand_margin_individual<class_StyleBoxTexture_method_set_expand_margin_individual>` **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)** |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| void | :ref:`set_expand_margin_size<class_StyleBoxTexture_method_set_expand_margin_size>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)** |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| void | :ref:`set_margin_size<class_StyleBoxTexture_method_set_margin_size>` **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)** |
|
||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
Señales
|
||
--------------
|
||
|
||
.. _class_StyleBoxTexture_signal_texture_changed:
|
||
|
||
- **texture_changed** **(** **)**
|
||
|
||
Emitido cuando se cambia la textura del stylebox.
|
||
|
||
Enumeraciones
|
||
--------------------------
|
||
|
||
.. _enum_StyleBoxTexture_AxisStretchMode:
|
||
|
||
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_STRETCH:
|
||
|
||
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE:
|
||
|
||
.. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE_FIT:
|
||
|
||
enum **AxisStretchMode**:
|
||
|
||
- **AXIS_STRETCH_MODE_STRETCH** = **0** --- Estira la textura de la stylebox. Esto resulta en una distorsión visible a menos que el tamaño de la textura coincida perfectamente con el tamaño de la stylebox.
|
||
|
||
- **AXIS_STRETCH_MODE_TILE** = **1** --- Repite la textura de la stylebox para que coincida con el tamaño de la caja de estilo según el sistema nine-patch.
|
||
|
||
- **AXIS_STRETCH_MODE_TILE_FIT** = **2** --- Repite la textura de la stylebox para que coincida con el tamaño de la caja de estilo según el sistema nine-patch. A diferencia de :ref:`AXIS_STRETCH_MODE_TILE<class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_TILE>`, la textura puede ser ligeramente estirada para hacer que la textura nine-patch se aplique sin fisuras.
|
||
|
||
Descripciones de Propiedades
|
||
--------------------------------------------------------
|
||
|
||
.. _class_StyleBoxTexture_property_axis_stretch_horizontal:
|
||
|
||
- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_horizontal**
|
||
|
||
+-----------+--------------------------------+
|
||
| *Default* | ``0`` |
|
||
+-----------+--------------------------------+
|
||
| *Setter* | set_h_axis_stretch_mode(value) |
|
||
+-----------+--------------------------------+
|
||
| *Getter* | get_h_axis_stretch_mode() |
|
||
+-----------+--------------------------------+
|
||
|
||
Controla cómo la textura de la caja de estilo será estirada o embaldosada horizontalmente. Ver :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` para los posibles valores.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_axis_stretch_vertical:
|
||
|
||
- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_vertical**
|
||
|
||
+-----------+--------------------------------+
|
||
| *Default* | ``0`` |
|
||
+-----------+--------------------------------+
|
||
| *Setter* | set_v_axis_stretch_mode(value) |
|
||
+-----------+--------------------------------+
|
||
| *Getter* | get_v_axis_stretch_mode() |
|
||
+-----------+--------------------------------+
|
||
|
||
Controla cómo la textura de la caja de estilo será estirada o embaldosada verticalmente. Ver :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` para los posibles valores.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_draw_center:
|
||
|
||
- :ref:`bool<class_bool>` **draw_center**
|
||
|
||
+-----------+--------------------------+
|
||
| *Default* | ``true`` |
|
||
+-----------+--------------------------+
|
||
| *Setter* | set_draw_center(value) |
|
||
+-----------+--------------------------+
|
||
| *Getter* | is_draw_center_enabled() |
|
||
+-----------+--------------------------+
|
||
|
||
Si ``true``, se dibujará el tile central de la textura nine-patch.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_expand_margin_bottom:
|
||
|
||
- :ref:`float<class_float>` **expand_margin_bottom**
|
||
|
||
+-----------+-------------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+-------------------------------+
|
||
| *Setter* | set_expand_margin_size(value) |
|
||
+-----------+-------------------------------+
|
||
| *Getter* | get_expand_margin_size() |
|
||
+-----------+-------------------------------+
|
||
|
||
Expande el margen inferior de este cuadro de estilo al dibujar, haciendo que sea más grande de lo solicitado.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_expand_margin_left:
|
||
|
||
- :ref:`float<class_float>` **expand_margin_left**
|
||
|
||
+-----------+-------------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+-------------------------------+
|
||
| *Setter* | set_expand_margin_size(value) |
|
||
+-----------+-------------------------------+
|
||
| *Getter* | get_expand_margin_size() |
|
||
+-----------+-------------------------------+
|
||
|
||
Expande el margen izquierdo de esta caja de estilo al dibujar, haciendo que se dibuje más grande de lo solicitado.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_expand_margin_right:
|
||
|
||
- :ref:`float<class_float>` **expand_margin_right**
|
||
|
||
+-----------+-------------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+-------------------------------+
|
||
| *Setter* | set_expand_margin_size(value) |
|
||
+-----------+-------------------------------+
|
||
| *Getter* | get_expand_margin_size() |
|
||
+-----------+-------------------------------+
|
||
|
||
Expande el margen derecho de esta caja de estilo al dibujar, haciendo que se dibuje más grande de lo solicitado.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_expand_margin_top:
|
||
|
||
- :ref:`float<class_float>` **expand_margin_top**
|
||
|
||
+-----------+-------------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+-------------------------------+
|
||
| *Setter* | set_expand_margin_size(value) |
|
||
+-----------+-------------------------------+
|
||
| *Getter* | get_expand_margin_size() |
|
||
+-----------+-------------------------------+
|
||
|
||
Expande el margen superior de esta caja de estilo al dibujar, haciendo que se dibuje más grande de lo solicitado.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_margin_bottom:
|
||
|
||
- :ref:`float<class_float>` **margin_bottom**
|
||
|
||
+-----------+------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+------------------------+
|
||
| *Setter* | set_margin_size(value) |
|
||
+-----------+------------------------+
|
||
| *Getter* | get_margin_size() |
|
||
+-----------+------------------------+
|
||
|
||
Aumenta el margen inferior de la caja de textura de 3×3.
|
||
|
||
Un valor más alto significa que se considera que una mayor parte de la textura fuente forma parte del borde inferior de la caja de 3×3.
|
||
|
||
Este es también el valor usado como respaldo para :ref:`StyleBox.content_margin_bottom<class_StyleBox_property_content_margin_bottom>` si es negativo.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_margin_left:
|
||
|
||
- :ref:`float<class_float>` **margin_left**
|
||
|
||
+-----------+------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+------------------------+
|
||
| *Setter* | set_margin_size(value) |
|
||
+-----------+------------------------+
|
||
| *Getter* | get_margin_size() |
|
||
+-----------+------------------------+
|
||
|
||
Aumenta el margen izquierdo de la caja de textura de 3×3.
|
||
|
||
Un valor más alto significa que se considera que una mayor parte de la textura de la fuente forma parte del margen izquierdo de la caja de 3×3.
|
||
|
||
Este es también el valor usado como respaldo para :ref:`StyleBox.content_margin_left<class_StyleBox_property_content_margin_left>` si es negativo.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_margin_right:
|
||
|
||
- :ref:`float<class_float>` **margin_right**
|
||
|
||
+-----------+------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+------------------------+
|
||
| *Setter* | set_margin_size(value) |
|
||
+-----------+------------------------+
|
||
| *Getter* | get_margin_size() |
|
||
+-----------+------------------------+
|
||
|
||
Aumenta el margen derecho de la caja de textura de 3×3.
|
||
|
||
Un valor más alto significa que se considera que una mayor parte de la textura fuente forma parte del margen derecho de la caja de 3×3.
|
||
|
||
Este es también el valor usado como respaldo para :ref:`StyleBox.content_margin_right<class_StyleBox_property_content_margin_right>` si es negativo.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_margin_top:
|
||
|
||
- :ref:`float<class_float>` **margin_top**
|
||
|
||
+-----------+------------------------+
|
||
| *Default* | ``0.0`` |
|
||
+-----------+------------------------+
|
||
| *Setter* | set_margin_size(value) |
|
||
+-----------+------------------------+
|
||
| *Getter* | get_margin_size() |
|
||
+-----------+------------------------+
|
||
|
||
Aumenta el margen superior de la caja de textura de 3×3.
|
||
|
||
Un valor más alto significa que se considera que una mayor parte de la textura fuente forma parte del borde superior de la caja de 3×3.
|
||
|
||
Este es también el valor usado como respaldo para :ref:`StyleBox.content_margin_top<class_StyleBox_property_content_margin_top>` si es negativo.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_modulate_color:
|
||
|
||
- :ref:`Color<class_Color>` **modulate_color**
|
||
|
||
+-----------+-------------------------+
|
||
| *Default* | ``Color( 1, 1, 1, 1 )`` |
|
||
+-----------+-------------------------+
|
||
| *Setter* | set_modulate(value) |
|
||
+-----------+-------------------------+
|
||
| *Getter* | get_modulate() |
|
||
+-----------+-------------------------+
|
||
|
||
Modula el color de la textura cuando se dibuja este cuadro de estilo.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_normal_map:
|
||
|
||
- :ref:`Texture<class_Texture>` **normal_map**
|
||
|
||
+----------+-----------------------+
|
||
| *Setter* | set_normal_map(value) |
|
||
+----------+-----------------------+
|
||
| *Getter* | get_normal_map() |
|
||
+----------+-----------------------+
|
||
|
||
El mapa normal para usar al dibujar este cuadro de estilo.
|
||
|
||
\ **Nota:** Godot espera que el mapa normal use las coordenadas X+, Y-, y Z+. Ver `esta página <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ para una comparación de las coordenadas del mapa normal esperadas por los motores populares.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_region_rect:
|
||
|
||
- :ref:`Rect2<class_Rect2>` **region_rect**
|
||
|
||
+-----------+-------------------------+
|
||
| *Default* | ``Rect2( 0, 0, 0, 0 )`` |
|
||
+-----------+-------------------------+
|
||
| *Setter* | set_region_rect(value) |
|
||
+-----------+-------------------------+
|
||
| *Getter* | get_region_rect() |
|
||
+-----------+-------------------------+
|
||
|
||
Especifica una sub-región de la textura a utilizar.
|
||
|
||
Esto equivale a envolver primero la textura en un :ref:`AtlasTexture<class_AtlasTexture>` con la misma región.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_property_texture:
|
||
|
||
- :ref:`Texture<class_Texture>` **texture**
|
||
|
||
+----------+--------------------+
|
||
| *Setter* | set_texture(value) |
|
||
+----------+--------------------+
|
||
| *Getter* | get_texture() |
|
||
+----------+--------------------+
|
||
|
||
La textura a usar al dibujar este cuadro de estilo.
|
||
|
||
Descripciones de Métodos
|
||
------------------------------------------------
|
||
|
||
.. _class_StyleBoxTexture_method_get_expand_margin_size:
|
||
|
||
- :ref:`float<class_float>` **get_expand_margin_size** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
|
||
|
||
Devuelve el tamaño de la expansión del ``margin``. Ver :ref:`Margin<enum_@GlobalScope_Margin>` para los posibles valores.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_method_get_margin_size:
|
||
|
||
- :ref:`float<class_float>` **get_margin_size** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin **)** |const|
|
||
|
||
Devuelve el tamaño del ``margin`` dado. Ver :ref:`Margin<enum_@GlobalScope_Margin>` para los posibles valores.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_method_set_expand_margin_all:
|
||
|
||
- void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)**
|
||
|
||
Establece el margen de expansión a ``size`` pixeles para todos los márgenes.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_method_set_expand_margin_individual:
|
||
|
||
- void **set_expand_margin_individual** **(** :ref:`float<class_float>` size_left, :ref:`float<class_float>` size_top, :ref:`float<class_float>` size_right, :ref:`float<class_float>` size_bottom **)**
|
||
|
||
Establece el margen de expansión de cada margen en ``size_left``, ``size_top``, ``size_right``, y ``size_bottom`` pixeles.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_method_set_expand_margin_size:
|
||
|
||
- void **set_expand_margin_size** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)**
|
||
|
||
Establece el margen de expansión a ``size`` pixels para el ``margin`` dado. Ver :ref:`Margin<enum_@GlobalScope_Margin>` para los posibles valores.
|
||
|
||
----
|
||
|
||
.. _class_StyleBoxTexture_method_set_margin_size:
|
||
|
||
- void **set_margin_size** **(** :ref:`Margin<enum_@GlobalScope_Margin>` margin, :ref:`float<class_float>` size **)**
|
||
|
||
Establece el margen a ``size`` pixels para el ``margin`` dado. Ver :ref:`Margin<enum_@GlobalScope_Margin>` para los posibles valores.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|