summaryrefslogtreecommitdiff
path: root/doc/classes/Node.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Node.xml')
-rw-r--r--doc/classes/Node.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 5a90354124..097fa1f6e5 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -122,6 +122,12 @@
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
+ [codeblock]
+ if child_node.get_parent():
+ child_node.get_parent().remove_child(child_node)
+ add_child(child_node)
+ [/codeblock]
</description>
</method>
<method name="add_child_below_node">
@@ -553,7 +559,7 @@
<return type="void">
</return>
<description>
- Moves this node to the top of the array of nodes of the parent node. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree.
+ Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree, i.e. the further they are on the node list, the higher they are drawn. After using [code]raise[/code], a Control will be drawn on top of their siblings.
</description>
</method>
<method name="remove_and_skip">