W3cubDocs

/Godot 4.2

ConfirmationDialog

Inherits: AcceptDialog < Window < Viewport < Node < Object

Inherited By: EditorCommandPalette, EditorFileDialog, FileDialog, ScriptCreateDialog

A dialog used for confirmation of actions.

Description

A dialog used for confirmation of actions. This window is similar to AcceptDialog, but pressing its Cancel button can have a different outcome from pressing the OK button. The order of the two buttons varies depending on the host OS.

To get cancel action, you can use:

GDScript
get_cancel_button().pressed.connect(self.canceled)
C#
GetCancelButton().Pressed += Canceled;

Properties

String

cancel_button_text

"Cancel"

Vector2i

min_size

Vector2i(200, 70) (overrides Window)

Vector2i

size

Vector2i(200, 100) (overrides Window)

String

title

"Please Confirm..." (overrides Window)

Methods

Button

get_cancel_button ( )

Property Descriptions

String cancel_button_text = "Cancel"

  • void set_cancel_button_text ( String value )
  • String get_cancel_button_text ( )

The text displayed by the cancel button (see get_cancel_button).

Method Descriptions

Button get_cancel_button ( )

Returns the cancel button.

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 CanvasItem.visible property.

© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_confirmationdialog.html