Bind column_titles_visible as property

(cherry picked from commit 7f6ab0006d)
This commit is contained in:
kobewi 2021-12-05 02:35:04 +01:00 committed by Rémi Verschelde
parent d6fb13234e
commit 9776241ce6
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 4 additions and 13 deletions

View file

@ -21,12 +21,6 @@
<tutorials>
</tutorials>
<methods>
<method name="are_column_titles_visible" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the column titles are being shown.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
@ -200,13 +194,6 @@
Sets the title of a column.
</description>
</method>
<method name="set_column_titles_visible">
<return type="void" />
<argument index="0" name="visible" type="bool" />
<description>
If [code]true[/code], column titles are visible.
</description>
</method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@ -215,6 +202,9 @@
<member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false">
If [code]true[/code], a right mouse button click can select items.
</member>
<member name="column_titles_visible" type="bool" setter="set_column_titles_visible" getter="are_column_titles_visible" default="false">
If [code]true[/code], column titles are visible.
</member>
<member name="columns" type="int" setter="set_columns" getter="get_columns" default="1">
The number of columns.
</member>

View file

@ -3866,6 +3866,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");