summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorMicky <micheledevita2@gmail.com>2022-08-15 19:55:38 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2022-09-07 11:58:30 +0200
commitf577bae76f85575c3bebebbc90c7a0120a66a8db (patch)
tree89d19f37ab21b1b58cff58df25d135edd1cc263f /doc/classes
parentfffdbb38e390a11d0dc0672ce1755148deee3e90 (diff)
Rename `legible_unique_name` param to `force_readable_name`
With the introduction of Scene Unique Nodes, `is_unique_in_owner`, "Unique Name in Scene" and other descriptions related to the feature, the second parameter of add_child() and add_simbling() could be misunderstood to be related, at first glance.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Node.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 87edc7de0a..a0c5bfd4bb 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -121,11 +121,11 @@
<method name="add_child">
<return type="void" />
<param index="0" name="node" type="Node" />
- <param index="1" name="legible_unique_name" type="bool" default="false" />
+ <param index="1" name="force_readable_name" type="bool" default="false" />
<param index="2" name="internal" type="int" enum="Node.InternalMode" default="0" />
<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 [param legible_unique_name] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
+ Adds a child [param 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 [param force_readable_name] is [code]true[/code], improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations.
If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes.
[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:
[codeblocks]
@@ -151,10 +151,10 @@
<method name="add_sibling">
<return type="void" />
<param index="0" name="sibling" type="Node" />
- <param index="1" name="legible_unique_name" type="bool" default="false" />
+ <param index="1" name="force_readable_name" type="bool" default="false" />
<description>
Adds a [param sibling] node to current's node parent, at the same level as that node, right below it.
- If [param legible_unique_name] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type.
+ If [param force_readable_name] is [code]true[/code], improves the readability of the added [param sibling]. If not named, the [param sibling] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to [code]false[/code], which assigns a dummy name featuring [code]@[/code] in both situations.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
[b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]).
</description>