diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index d04a6f7316db..e121782f9b10 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -36,6 +36,12 @@ Calls the [param method] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. + + + + Remove all buttons from the [TreeItem]. + + diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 63a4b334c452..54121f1e2fd2 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1778,6 +1778,7 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("set_custom_as_button", "column", "enable"), &TreeItem::set_custom_as_button); ClassDB::bind_method(D_METHOD("is_custom_set_as_button", "column"), &TreeItem::is_custom_set_as_button); + ClassDB::bind_method(D_METHOD("clear_buttons"), &TreeItem::clear_buttons); ClassDB::bind_method(D_METHOD("add_button", "column", "button", "id", "disabled", "tooltip_text"), &TreeItem::add_button, DEFVAL(-1), DEFVAL(false), DEFVAL("")); ClassDB::bind_method(D_METHOD("get_button_count", "column"), &TreeItem::get_button_count); ClassDB::bind_method(D_METHOD("get_button_tooltip_text", "column", "button_index"), &TreeItem::get_button_tooltip_text);