From 1e2867556025c302224a0463f68b8135c99e11d8 Mon Sep 17 00:00:00 2001 From: Jummit Date: Sun, 9 Oct 2022 10:29:44 +0200 Subject: [PATCH] Expose TreeItem::set_button_color --- doc/classes/TreeItem.xml | 9 +++++++++ scene/gui/tree.cpp | 1 + 2 files changed, 10 insertions(+) diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index c109dc57f74..a8ffef427fb 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -425,6 +425,15 @@ Sets the given column's button [Texture2D] at index [param button_idx] to [param button]. + + + + + + + Sets the given column's button color at index [param button_idx] to [param color]. + + diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index acf398305c2..2e8fa1e606b 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1504,6 +1504,7 @@ void TreeItem::_bind_methods() { ClassDB::bind_method(D_METHOD("set_button", "column", "button_idx", "button"), &TreeItem::set_button); ClassDB::bind_method(D_METHOD("erase_button", "column", "button_idx"), &TreeItem::erase_button); ClassDB::bind_method(D_METHOD("set_button_disabled", "column", "button_idx", "disabled"), &TreeItem::set_button_disabled); + ClassDB::bind_method(D_METHOD("set_button_color", "column", "button_idx", "color"), &TreeItem::set_button_color); ClassDB::bind_method(D_METHOD("is_button_disabled", "column", "button_idx"), &TreeItem::is_button_disabled); ClassDB::bind_method(D_METHOD("set_tooltip_text", "column", "tooltip"), &TreeItem::set_tooltip_text);