AcceptDialog

Inherits: WindowDialog < Popup < Control < CanvasItem < Node < Object

Inherited By: ConfirmationDialog

Category: Core

Brief Description

Base dialog for user notification.

Member Functions

Button add_button ( String text, bool right=false, String action=null )
Button add_cancel ( String name )
bool get_hide_on_ok ( ) const
Label get_label ( )
Button get_ok ( )
String get_text ( ) const
void register_text_enter ( Node line_edit )
void set_hide_on_ok ( bool enabled )
void set_text ( String text )

Signals

  • confirmed ( )

Emitted when accepted.

  • custom_action ( 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

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.

Add custom cancel button to the dialog and return the created button.

  • bool get_hide_on_ok ( ) const

Return true if the dialog will be hidden when accepted (default true).

Return the label used for built-in text.

Return the OK Button.

Return the built-in label text.

  • void register_text_enter ( Node line_edit )

Register a LineEdit in the dialog. When the enter key is pressed, the dialog will be accepted.

  • void set_hide_on_ok ( bool enabled )

Set whether the dialog is hidden when accepted (default true).

  • void set_text ( String text )

Set the built-in label text.