diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-05-31 11:31:43 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-05-31 11:36:23 +0200 |
commit | 3ed7bdc26f30747961a0b189c20747d117f33f63 (patch) | |
tree | 3e782ce37805bc55deb1f4b39cbbcf153ea21692 /doc/classes/TreeItem.xml | |
parent | 6101240231600c871f5c5473872532c68ea3268c (diff) | |
download | redot-engine-3ed7bdc26f30747961a0b189c20747d117f33f63.tar.gz |
Implement `TreeItem.add_child`
Diffstat (limited to 'doc/classes/TreeItem.xml')
-rw-r--r-- | doc/classes/TreeItem.xml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 2bd8f57bd2..33b69929bd 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -22,6 +22,13 @@ Adds a button with [Texture2D] [param button] at column [param column]. The [param id] is used to identify the button in the according [signal Tree.button_clicked] signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately before this method. Optionally, the button can be [param disabled] and have a [param tooltip_text]. </description> </method> + <method name="add_child"> + <return type="void" /> + <param index="0" name="child" type="TreeItem" /> + <description> + Adds a previously unparented [TreeItem] as a direct child of this one. The [param child] item must not be a part of any [Tree] or parented to any [TreeItem]. See also [method remove_child]. + </description> + </method> <method name="call_recursive" qualifiers="vararg"> <return type="void" /> <param index="0" name="method" type="StringName" /> @@ -430,7 +437,8 @@ <return type="void" /> <param index="0" name="child" type="TreeItem" /> <description> - Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free]. + Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later (see [method add_child]). To completely remove a [TreeItem] use [method Object.free]. + [b]Note:[/b] If you want to move a child from one [Tree] to another, then instead of removing and adding it manually you can use [method move_before] or [method move_after]. </description> </method> <method name="select"> |