.. Generated automatically by doc/tools/makerst.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//doc_classes. .. _class_AcceptDialog: AcceptDialog ============ **Inherits:** :ref:`WindowDialog` **<** :ref:`Popup` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`ConfirmationDialog` **Category:** Core Brief Description ----------------- Base dialog for user notification. Member Functions ---------------- +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`add_button` **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`add_cancel` **(** :ref:`String` name **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Label` | :ref:`get_label` **(** **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`get_ok` **(** **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`register_text_enter` **(** :ref:`Node` line_edit **)** | +------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_AcceptDialog_confirmed: - **confirmed** **(** **)** Emitted when the dialog is accepted. .. _class_AcceptDialog_custom_action: - **custom_action** **(** :ref:`String` action **)** Emitted when a custom button is pressed. See :ref:`add_button`. Member Variables ---------------- .. _class_AcceptDialog_dialog_hide_on_ok: - :ref:`bool` **dialog_hide_on_ok** - If ``true`` the dialog is hidden when accepted. Default value: ``true``. .. _class_AcceptDialog_dialog_text: - :ref:`String` **dialog_text** - The text displayed by this dialog. Description ----------- This dialog is useful for small notifications to the user about an event. It can only be accepted or closed, with the same result. Member Function Description --------------------------- .. _class_AcceptDialog_add_button: - :ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`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 custom_action signal when pressed. If ``true``, *right* will place the button to the right of any sibling buttons. Default value: ``false``. .. _class_AcceptDialog_add_cancel: - :ref:`Button` **add_cancel** **(** :ref:`String` name **)** Adds a button with label *name* and a cancel action to the dialog and returns the created button. .. _class_AcceptDialog_get_label: - :ref:`Label` **get_label** **(** **)** Return the label used for built-in text. .. _class_AcceptDialog_get_ok: - :ref:`Button` **get_ok** **(** **)** Return the OK Button. .. _class_AcceptDialog_register_text_enter: - void **register_text_enter** **(** :ref:`Node` line_edit **)** Registers a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted.