diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-07 09:12:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 09:12:03 +0200 |
commit | e4c940ee6ad4630adb2b47338ef62aa9262c255b (patch) | |
tree | c64afffd488198c8a2519fd1f69dd34ff7c66f1e /doc/classes | |
parent | 29e59798c1b476262cd510d5962ca5f32a4ed1b6 (diff) | |
parent | 714e6a595d69802baa796190d0e682d0679a0f43 (diff) |
Merge pull request #50208 from kleonc/accept_dialog-remove_button
Add AcceptDialog::remove_button method
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AcceptDialog.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index f644606040..fd1e2ba104 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -21,6 +21,7 @@ <description> Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed. If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons. + You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> <method name="add_cancel_button"> @@ -30,6 +31,7 @@ </argument> <description> Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button. + You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> <method name="get_label"> @@ -55,6 +57,15 @@ Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. </description> </method> + <method name="remove_button"> + <return type="void"> + </return> + <argument index="0" name="button" type="Control"> + </argument> + <description> + Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. + </description> + </method> </methods> <members> <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> |