From 7f6ab0006d43866f365287365b25dbcf9e92bebd Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 5 Dec 2021 02:35:04 +0100 Subject: Bind column_titles_visible as property --- doc/classes/Tree.xml | 16 +++------------- scene/gui/tree.cpp | 1 + 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index e603d344ec..03defd5934 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -35,12 +35,6 @@ - - - - Returns [code]true[/code] if the column titles are being shown. - - @@ -313,13 +307,6 @@ Sets OpenType feature [code]tag[/code] for the column title. - - - - - If [code]true[/code], column titles are visible. - - @@ -328,6 +315,9 @@ If [code]true[/code], a right mouse button click can select items. + + If [code]true[/code], column titles are visible. + The number of columns. diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 89caaaafd0..7c0612036d 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4830,6 +4830,7 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("get_allow_reselect"), &Tree::get_allow_reselect); ADD_PROPERTY(PropertyInfo(Variant::INT, "columns"), "set_columns", "get_columns"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "column_titles_visible"), "set_column_titles_visible", "are_column_titles_visible"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_reselect"), "set_allow_reselect", "get_allow_reselect"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_rmb_select"), "set_allow_rmb_select", "get_allow_rmb_select"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_folding"), "set_hide_folding", "is_folding_hidden"); -- cgit v1.2.3