class_confirmationdialog.rst 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ConfirmationDialog.xml.
  6. .. _class_ConfirmationDialog:
  7. ConfirmationDialog
  8. ==================
  9. **Inherits:** :ref:`AcceptDialog<class_AcceptDialog>` **<** :ref:`Window<class_Window>` **<** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`EditorCommandPalette<class_EditorCommandPalette>`, :ref:`EditorFileDialog<class_EditorFileDialog>`, :ref:`FileDialog<class_FileDialog>`, :ref:`ScriptCreateDialog<class_ScriptCreateDialog>`
  11. Dialog for confirmation of actions.
  12. Description
  13. -----------
  14. Dialog for confirmation of actions. This dialog inherits from :ref:`AcceptDialog<class_AcceptDialog>`, but has by default an OK and Cancel button (in host OS order).
  15. To get cancel action, you can use:
  16. .. tabs::
  17. .. code-tab:: gdscript
  18. get_cancel().connect("pressed", self, "cancelled")
  19. .. code-tab:: csharp
  20. GetCancel().Connect("pressed", this, nameof(Cancelled));
  21. Properties
  22. ----------
  23. +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
  24. | :ref:`String<class_String>` | :ref:`cancel_button_text<class_ConfirmationDialog_property_cancel_button_text>` | ``"Cancel"`` |
  25. +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
  26. | :ref:`Vector2i<class_Vector2i>` | min_size | ``Vector2i(200, 70)`` (overrides :ref:`Window<class_Window_property_min_size>`) |
  27. +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
  28. | :ref:`Vector2i<class_Vector2i>` | size | ``Vector2i(200, 100)`` (overrides :ref:`Window<class_Window_property_size>`) |
  29. +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
  30. | :ref:`String<class_String>` | title | ``"Please Confirm..."`` (overrides :ref:`Window<class_Window_property_title>`) |
  31. +---------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+
  32. Methods
  33. -------
  34. +-----------------------------+-----------------------------------------------------------------------------------------+
  35. | :ref:`Button<class_Button>` | :ref:`get_cancel_button<class_ConfirmationDialog_method_get_cancel_button>` **(** **)** |
  36. +-----------------------------+-----------------------------------------------------------------------------------------+
  37. Property Descriptions
  38. ---------------------
  39. .. _class_ConfirmationDialog_property_cancel_button_text:
  40. - :ref:`String<class_String>` **cancel_button_text**
  41. +-----------+-------------------------------+
  42. | *Default* | ``"Cancel"`` |
  43. +-----------+-------------------------------+
  44. | *Setter* | set_cancel_button_text(value) |
  45. +-----------+-------------------------------+
  46. | *Getter* | get_cancel_button_text() |
  47. +-----------+-------------------------------+
  48. The text displayed by the cancel button (see :ref:`get_cancel_button<class_ConfirmationDialog_method_get_cancel_button>`).
  49. Method Descriptions
  50. -------------------
  51. .. _class_ConfirmationDialog_method_get_cancel_button:
  52. - :ref:`Button<class_Button>` **get_cancel_button** **(** **)**
  53. Returns the cancel button.
  54. \ **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 :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  55. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  56. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  57. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  58. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  59. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  60. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`