Files
godot-docs-l10n/classes/es/class_subviewportcontainer.rst
2025-09-30 13:31:55 +02:00

147 lines
8.1 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_SubViewportContainer:
SubViewportContainer
====================
**Hereda:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Un contenedor utilizado para mostrar el contenido de un :ref:`SubViewport<class_SubViewport>`.
.. rst-class:: classref-introduction-group
Descripción
----------------------
A container that displays the contents of underlying :ref:`SubViewport<class_SubViewport>` child nodes. It uses the combined size of the :ref:`SubViewport<class_SubViewport>`\ s as minimum size, unless :ref:`stretch<class_SubViewportContainer_property_stretch>` is enabled.
\ **Note:** Changing a **SubViewportContainer**'s :ref:`Control.scale<class_Control_property_scale>` will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container).
\ **Note:** The **SubViewportContainer** forwards mouse-enter and mouse-exit notifications to its sub-viewports.
.. rst-class:: classref-reftable-group
Propiedades
----------------------
.. table::
:widths: auto
+------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+
| :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``1`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
+------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`mouse_target<class_SubViewportContainer_property_mouse_target>` | ``false`` |
+------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`stretch<class_SubViewportContainer_property_stretch>` | ``false`` |
+------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`stretch_shrink<class_SubViewportContainer_property_stretch_shrink>` | ``1`` |
+------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Métodos
--------------
.. table::
:widths: auto
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_propagate_input_event<class_SubViewportContainer_private_method__propagate_input_event>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |const| |
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Propiedades
--------------------------------------------------------
.. _class_SubViewportContainer_property_mouse_target:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **mouse_target** = ``false`` :ref:`🔗<class_SubViewportContainer_property_mouse_target>`
.. rst-class:: classref-property-setget
- |void| **set_mouse_target**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_mouse_target_enabled**\ (\ )
Configura si el **SubViewportContainer** o alternativamente los nodos :ref:`Control<class_Control>` de sus hijos :ref:`SubViewport<class_SubViewport>` deben estar disponibles como objetivos de funcionalidades relacionadas con el ratón, como identificar el objetivo de soltar en operaciones de arrastrar y soltar o la forma del cursor del nodo :ref:`Control<class_Control>` sobre el que se pasa el ratón.
Si es ``false``, los nodos :ref:`Control<class_Control>` dentro de sus hijos :ref:`SubViewport<class_SubViewport>` se consideran como objetivos.
Si es ``true``, el propio **SubViewportContainer** se considerará como un objetivo.
.. rst-class:: classref-item-separator
----
.. _class_SubViewportContainer_property_stretch:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **stretch** = ``false`` :ref:`🔗<class_SubViewportContainer_property_stretch>`
.. rst-class:: classref-property-setget
- |void| **set_stretch**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_stretch_enabled**\ (\ )
Si es ``true``, el sub-viewport se redimensionará automáticamente al tamaño del control.
\ **Nota:** Si es ``true``, esto prohibirá cambiar :ref:`SubViewport.size<class_SubViewport_property_size>` de sus hijos manualmente.
.. rst-class:: classref-item-separator
----
.. _class_SubViewportContainer_property_stretch_shrink:
.. rst-class:: classref-property
:ref:`int<class_int>` **stretch_shrink** = ``1`` :ref:`🔗<class_SubViewportContainer_property_stretch_shrink>`
.. rst-class:: classref-property-setget
- |void| **set_stretch_shrink**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_stretch_shrink**\ (\ )
Divides the sub-viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
For example, a 1280×720 sub-viewport with :ref:`stretch_shrink<class_SubViewportContainer_property_stretch_shrink>` set to ``2`` will be rendered at 640×360 while occupying the same size in the container.
\ **Note:** :ref:`stretch<class_SubViewportContainer_property_stretch>` must be ``true`` for this property to work.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descripciones de Métodos
------------------------------------------------
.. _class_SubViewportContainer_private_method__propagate_input_event:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **_propagate_input_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |const| :ref:`🔗<class_SubViewportContainer_private_method__propagate_input_event>`
**Experimental:** Este método podría ser modificado o eliminado en versiones futuras.
Método virtual para ser implementado por el usuario. Si devuelve ``true``, el ``event`` se propaga a los hijos :ref:`SubViewport<class_SubViewport>`. La propagación no ocurre si devuelve ``false``. Si la función no está implementada, todos los eventos se propagan a los SubViewports.
.. |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.)`