Files
godot-docs-l10n/classes/es/class_popup.rst
Rémi Verschelde cf78697eea Add localized class reference as pre-generated RST files
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`
2021-12-21 16:07:55 +01:00

148 lines
8.0 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 Popup.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_Popup:
Popup
=====
**Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`PopupDialog<class_PopupDialog>`, :ref:`PopupMenu<class_PopupMenu>`, :ref:`PopupPanel<class_PopupPanel>`, :ref:`WindowDialog<class_WindowDialog>`
Control del contenedor base para los popups y diálogos.
Descripción
----------------------
Popup is a base :ref:`Control<class_Control>` used to show dialogs and popups. It's a subwindow and modal by default (see :ref:`Control<class_Control>`) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport.
Propiedades
----------------------
+-------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`popup_exclusive<class_Popup_property_popup_exclusive>` | ``false`` |
+-------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | visible | ``false`` (overrides :ref:`CanvasItem<class_CanvasItem_property_visible>`) |
+-------------------------+--------------------------------------------------------------+----------------------------------------------------------------------------+
Métodos
--------------
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`popup<class_Popup_method_popup>` **(** :ref:`Rect2<class_Rect2>` bounds=Rect2( 0, 0, 0, 0 ) **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`popup_centered<class_Popup_method_popup_centered>` **(** :ref:`Vector2<class_Vector2>` size=Vector2( 0, 0 ) **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`popup_centered_clamped<class_Popup_method_popup_centered_clamped>` **(** :ref:`Vector2<class_Vector2>` size=Vector2( 0, 0 ), :ref:`float<class_float>` fallback_ratio=0.75 **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`popup_centered_minsize<class_Popup_method_popup_centered_minsize>` **(** :ref:`Vector2<class_Vector2>` minsize=Vector2( 0, 0 ) **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`popup_centered_ratio<class_Popup_method_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.75 **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_as_minsize<class_Popup_method_set_as_minsize>` **(** **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Señales
--------------
.. _class_Popup_signal_about_to_show:
- **about_to_show** **(** **)**
Emitted when a popup is about to be shown. This is often used in :ref:`PopupMenu<class_PopupMenu>` to clear the list of options then create a new one according to the current context.
----
.. _class_Popup_signal_popup_hide:
- **popup_hide** **(** **)**
Emitido cuando un popup está oculto.
Constantes
--------------------
.. _class_Popup_constant_NOTIFICATION_POST_POPUP:
.. _class_Popup_constant_NOTIFICATION_POPUP_HIDE:
- **NOTIFICATION_POST_POPUP** = **80** --- Notification sent right after the popup is shown.
- **NOTIFICATION_POPUP_HIDE** = **81** --- Notification sent right after the popup is hidden.
Descripciones de Propiedades
--------------------------------------------------------
.. _class_Popup_property_popup_exclusive:
- :ref:`bool<class_bool>` **popup_exclusive**
+-----------+----------------------+
| *Default* | ``false`` |
+-----------+----------------------+
| *Setter* | set_exclusive(value) |
+-----------+----------------------+
| *Getter* | is_exclusive() |
+-----------+----------------------+
If ``true``, the popup will not be hidden when a click event occurs outside of it, or when it receives the ``ui_cancel`` action event.
\ **Note:** Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use :ref:`WindowDialog.get_close_button<class_WindowDialog_method_get_close_button>` or :ref:`ConfirmationDialog.get_cancel<class_ConfirmationDialog_method_get_cancel>` and hide the buttons in question by setting their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property to ``false``.
Descripciones de Métodos
------------------------------------------------
.. _class_Popup_method_popup:
- void **popup** **(** :ref:`Rect2<class_Rect2>` bounds=Rect2( 0, 0, 0, 0 ) **)**
Popup (show the control in modal form).
----
.. _class_Popup_method_popup_centered:
- void **popup_centered** **(** :ref:`Vector2<class_Vector2>` size=Vector2( 0, 0 ) **)**
Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by ``size``.
----
.. _class_Popup_method_popup_centered_clamped:
- void **popup_centered_clamped** **(** :ref:`Vector2<class_Vector2>` size=Vector2( 0, 0 ), :ref:`float<class_float>` fallback_ratio=0.75 **)**
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to ``size``, then ensuring the popup is no larger than the viewport size multiplied by ``fallback_ratio``.
----
.. _class_Popup_method_popup_centered_minsize:
- void **popup_centered_minsize** **(** :ref:`Vector2<class_Vector2>` minsize=Vector2( 0, 0 ) **)**
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than ``minsize``.
----
.. _class_Popup_method_popup_centered_ratio:
- void **popup_centered_ratio** **(** :ref:`float<class_float>` ratio=0.75 **)**
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
----
.. _class_Popup_method_set_as_minsize:
- void **set_as_minsize** **(** **)**
Shrink popup to keep to the minimum size of content.
.. |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.)`