浏览代码

Merge pull request #40750 from Calinou/doc-canvasitem-node3d-visible

Improve visibility documentation for CanvasItem and Node3D
Rémi Verschelde 5 年之前
父节点
当前提交
303515981b
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 3 2
      doc/classes/CanvasItem.xml
  2. 2 2
      doc/classes/Node3D.xml

+ 3 - 2
doc/classes/CanvasItem.xml

@@ -525,7 +525,7 @@
 			<return type="bool">
 			<return type="bool">
 			</return>
 			</return>
 			<description>
 			<description>
-				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.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="make_canvas_position_local" qualifiers="const">
 		<method name="make_canvas_position_local" qualifiers="const">
@@ -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], the parent [CanvasItem]'s [member material] property is used as this one's material.
 		</member>
 		</member>
 		<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
 		<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
-			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.
 		</member>
 		</member>
 	</members>
 	</members>
 	<signals>
 	<signals>

+ 2 - 2
doc/classes/Node3D.xml

@@ -101,7 +101,7 @@
 			<return type="bool">
 			<return type="bool">
 			</return>
 			</return>
 			<description>
 			<description>
-				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.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="look_at">
 		<method name="look_at">
@@ -323,7 +323,7 @@
 			Local translation of this node.
 			Local translation of this node.
 		</member>
 		</member>
 		<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
 		<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
-			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]).
 		</member>
 		</member>
 	</members>
 	</members>
 	<signals>
 	<signals>