This dialog is useful for small notifications to the user about an event. It can only be accepted or closed. The functionality of this node is already implemented in Godot via the OS.alert()
method, althought it doesn't let you customize the icon.
Type | Name | Default value |
---|---|---|
Icon |
dialog_icon |
1 |
String |
dialog_text |
"" |
String |
title |
"Alert!" |
Returned type | Declaration |
---|---|
void |
hide() |
void |
show() |
Emitted when the dialog is closed.
Emitted when the dialog is accepted, i.e. the OK button is pressed.
Icon ICON_INFO = 0
Usually an icon with the letter i in a blue circle*.
Icon ICON_WARNING = 1
Usually an icon with an exclamation mark in a yellow triangle*.
Icon ICON_ERROR = 2
Usually an icon with a cross in a red circle*.
Icon ICON_QUESTION = 3
Usually an icon with a question mark*.
(*) Depends on your OS theme.
The icon displayed by the dialog.
void set_icon(Icon value)
Icon get_icon()
The text displayed by the dialog.
void set_text(String value)
String get_text()
The dialog's title.
void set_title(String value)
String get_title()
Hides the dialog.
Makes the dialog appear. If this dialog is already visible, it would call hide
first.