From 27b09dfc44cd85f5620bac99d624a48f8adedd5a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 27 Jul 2020 12:09:51 +0200 Subject: Improve visibility documentation for CanvasItem and Node3D This closes https://github.com/godotengine/godot-docs/issues/3840. --- doc/classes/CanvasItem.xml | 5 +++-- doc/classes/Node3D.xml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index be361f93f3..cac4d6f36e 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -525,7 +525,7 @@ - Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and its inherited visibility is also [code]true[/code]. + Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. @@ -617,7 +617,8 @@ If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. - If [code]true[/code], this [CanvasItem] is drawn. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. + If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). + [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 05d00b9f31..02b319fb5a 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -101,7 +101,7 @@ - Returns whether the node is visible, taking into consideration that its parents visibility. + Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. @@ -323,7 +323,7 @@ Local translation of this node. - If [code]true[/code], this node is drawn. + If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). -- cgit v1.2.3