.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _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=null **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`add_cancel` **(** :ref:`String` name **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_hide_on_ok` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Label` | :ref:`get_label` **(** **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Button` | :ref:`get_ok` **(** **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_text` **(** **)** const | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`register_text_enter` **(** :ref:`Node` line_edit **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_hide_on_ok` **(** :ref:`bool` enabled **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_text` **(** :ref:`String` text **)** | +------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **confirmed** **(** **)** Emitted when accepted. - **custom_action** **(** :ref:`String` action **)** Emitted with a custom button is added. 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=null **)** Add custom button to the dialog and return the created button. The button titled with *text* and the *action* will be passed to custom_action signal when it is pressed. .. _class_AcceptDialog_add_cancel: - :ref:`Button` **add_cancel** **(** :ref:`String` name **)** Add custom cancel button to the dialog and return the created button. .. _class_AcceptDialog_get_hide_on_ok: - :ref:`bool` **get_hide_on_ok** **(** **)** const Return true if the dialog will be hidden when accepted (default true). .. _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_get_text: - :ref:`String` **get_text** **(** **)** const Return the built-in label text. .. _class_AcceptDialog_register_text_enter: - void **register_text_enter** **(** :ref:`Node` line_edit **)** Register a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted. .. _class_AcceptDialog_set_hide_on_ok: - void **set_hide_on_ok** **(** :ref:`bool` enabled **)** Set whether the dialog is hidden when accepted (default true). .. _class_AcceptDialog_set_text: - void **set_text** **(** :ref:`String` text **)** Set the built-in label text.