Files
godot-docs-l10n/classes/es/class_acceptdialog.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

183 lines
11 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 AcceptDialog.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_AcceptDialog:
AcceptDialog
============
**Inherits:** :ref:`WindowDialog<class_WindowDialog>` **<** :ref:`Popup<class_Popup>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`ConfirmationDialog<class_ConfirmationDialog>`
Diálogo base para la notificación al usuario.
Descripción
----------------------
Este cuadro de diálogo es útil para pequeñas notificaciones al usuario sobre un evento. Sólo puede ser aceptado o cerrado, devolviendo el mismo resultado.
Propiedades
----------------------
+-----------------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`dialog_autowrap<class_AcceptDialog_property_dialog_autowrap>` | ``false`` |
+-----------------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`dialog_hide_on_ok<class_AcceptDialog_property_dialog_hide_on_ok>` | ``true`` |
+-----------------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`dialog_text<class_AcceptDialog_property_dialog_text>` | ``""`` |
+-----------------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | window_title | ``"Alert!"`` (overrides :ref:`WindowDialog<class_WindowDialog_property_window_title>`) |
+-----------------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
Métodos
--------------
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Button<class_Button>` | :ref:`add_button<class_AcceptDialog_method_add_button>` **(** :ref:`String<class_String>` text, :ref:`bool<class_bool>` right=false, :ref:`String<class_String>` action="" **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Button<class_Button>` | :ref:`add_cancel<class_AcceptDialog_method_add_cancel>` **(** :ref:`String<class_String>` name **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Label<class_Label>` | :ref:`get_label<class_AcceptDialog_method_get_label>` **(** **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Button<class_Button>` | :ref:`get_ok<class_AcceptDialog_method_get_ok>` **(** **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`register_text_enter<class_AcceptDialog_method_register_text_enter>` **(** :ref:`Node<class_Node>` line_edit **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_button<class_AcceptDialog_method_remove_button>` **(** :ref:`Control<class_Control>` button **)** |
+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Señales
--------------
.. _class_AcceptDialog_signal_confirmed:
- **confirmed** **(** **)**
Se emite cuando se acepta el diálogo, es decir, se pulsa el botón OK.
----
.. _class_AcceptDialog_signal_custom_action:
- **custom_action** **(** :ref:`String<class_String>` action **)**
Se emite cuando se presiona un botón personalizado. Ver :ref:`add_button<class_AcceptDialog_method_add_button>`.
Descripciones de Propiedades
--------------------------------------------------------
.. _class_AcceptDialog_property_dialog_autowrap:
- :ref:`bool<class_bool>` **dialog_autowrap**
+-----------+---------------------+
| *Default* | ``false`` |
+-----------+---------------------+
| *Setter* | set_autowrap(value) |
+-----------+---------------------+
| *Getter* | has_autowrap() |
+-----------+---------------------+
El texto se expande automáticamente en el diálogo.
----
.. _class_AcceptDialog_property_dialog_hide_on_ok:
- :ref:`bool<class_bool>` **dialog_hide_on_ok**
+-----------+-----------------------+
| *Default* | ``true`` |
+-----------+-----------------------+
| *Setter* | set_hide_on_ok(value) |
+-----------+-----------------------+
| *Getter* | get_hide_on_ok() |
+-----------+-----------------------+
Si ``true``, el diálogo se oculta cuando se pulsa el botón OK. Puedes ajustarlo a ``false`` si quieres hacer, por ejemplo, la validación de entrada al recibir la señal :ref:`confirmed<class_AcceptDialog_signal_confirmed>`, y manejar el ocultamiento del diálogo en tu propia lógica.
\ **Nota:** Algunos nodos derivados de esta clase pueden tener un valor por defecto diferente, y potencialmente su propia lógica incorporada anulando este ajuste. Por ejemplo, :ref:`FileDialog<class_FileDialog>` tiene por defecto ``false``, y tiene su propio código de validación de entrada que se llama al pulsar OK, que eventualmente oculta el diálogo si la entrada es válida. Como tal, esta propiedad no puede ser usada en :ref:`FileDialog<class_FileDialog>` para deshabilitar la ocultación del diálogo cuando se presiona OK.
----
.. _class_AcceptDialog_property_dialog_text:
- :ref:`String<class_String>` **dialog_text**
+-----------+-----------------+
| *Default* | ``""`` |
+-----------+-----------------+
| *Setter* | set_text(value) |
+-----------+-----------------+
| *Getter* | get_text() |
+-----------+-----------------+
El texto mostrado en el diálogo.
Descripciones de Métodos
------------------------------------------------
.. _class_AcceptDialog_method_add_button:
- :ref:`Button<class_Button>` **add_button** **(** :ref:`String<class_String>` text, :ref:`bool<class_bool>` right=false, :ref:`String<class_String>` action="" **)**
Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. ``action`` will be passed to the :ref:`custom_action<class_AcceptDialog_signal_custom_action>` signal when pressed.
If ``true``, ``right`` will place the button to the right of any sibling buttons.
You can use :ref:`remove_button<class_AcceptDialog_method_remove_button>` method to remove a button created with this method from the dialog.
----
.. _class_AcceptDialog_method_add_cancel:
- :ref:`Button<class_Button>` **add_cancel** **(** :ref:`String<class_String>` name **)**
Adds a button with label ``name`` and a cancel action to the dialog and returns the created button.
You can use :ref:`remove_button<class_AcceptDialog_method_remove_button>` method to remove a button created with this method from the dialog.
----
.. _class_AcceptDialog_method_get_label:
- :ref:`Label<class_Label>` **get_label** **(** **)**
Returns the label used for built-in text.
\ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
----
.. _class_AcceptDialog_method_get_ok:
- :ref:`Button<class_Button>` **get_ok** **(** **)**
Retorna la instancia de el :ref:`Button<class_Button>` aceptar.
\ **Warning:** Esto es un nodo interno requerido, removerlo y liberarlo podría causar un crasheo. Si deseas esconder este o alguno de sus hijos, utiliza su propiedad :ref:`CanvasItem.visible<class_CanvasItem_property_visible>`.
----
.. _class_AcceptDialog_method_register_text_enter:
- void **register_text_enter** **(** :ref:`Node<class_Node>` line_edit **)**
Registra un :ref:`LineEdit<class_LineEdit>` en el diálogo. Cuando se pulsa la tecla intro, el diálogo se acepta.
----
.. _class_AcceptDialog_method_remove_button:
- void **remove_button** **(** :ref:`Control<class_Control>` button **)**
Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button<class_Button>` added with :ref:`add_button<class_AcceptDialog_method_add_button>` or :ref:`add_cancel<class_AcceptDialog_method_add_cancel>` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action<class_AcceptDialog_signal_custom_action>` signal or cancel this dialog.
.. |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.)`