diff options
Diffstat (limited to 'doc')
247 files changed, 2878 insertions, 2195 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 05e4e209d1..bd500f6b35 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -16,7 +16,7 @@ <return type="Variant" /> <param index="0" name="x" type="Variant" /> <description> - Returns the absolute value of a [Variant] parameter [code]x[/code] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. + Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. [codeblock] var a = abs(-1) # a is 1 @@ -42,7 +42,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the absolute value of float parameter [code]x[/code] (i.e. positive value). + Returns the absolute value of float parameter [param x] (i.e. positive value). [codeblock] # a is 1.2 var a = absf(-1.2) @@ -53,7 +53,7 @@ <return type="int" /> <param index="0" name="x" type="int" /> <description> - Returns the absolute value of int parameter [code]x[/code] (i.e. positive value). + Returns the absolute value of int parameter [param x] (i.e. positive value). [codeblock] # a is 1 var a = absi(-1) @@ -64,7 +64,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN]. + Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN]. [codeblock] # c is 0.523599 or 30 degrees if converted with rad2deg(c) var c = acos(0.866025) @@ -75,7 +75,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN]. + Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN]. [codeblock] # s is 0.523599 or 30 degrees if converted with rad2deg(s) var s = asin(0.5) @@ -86,12 +86,12 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry. + Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry. The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code]. [codeblock] var a = atan(0.5) # a is 0.463648 [/codeblock] - If [code]x[/code] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [code]x[/code]. + If [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [param x]. </description> </method> <method name="atan2"> @@ -114,7 +114,7 @@ <param index="3" name="end" type="float" /> <param index="4" name="t" type="float" /> <description> - Returns the point at the given [code]t[/code] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [code]control_1[/code], [code]control_2[/code], and [code]end[/code] points. + Returns the point at the given [param t] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points. </description> </method> <method name="bytes2var"> @@ -137,7 +137,7 @@ <return type="Variant" /> <param index="0" name="x" type="Variant" /> <description> - Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. + Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. [codeblock] var i = ceil(1.45) # i is 2.0 i = ceil(1.001) # i is 2.0 @@ -150,7 +150,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. + Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. A type-safe version of [method ceil], specialzied in floats. </description> </method> @@ -158,7 +158,7 @@ <return type="int" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. + Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. A type-safe version of [method ceil] that returns integer. </description> </method> @@ -168,7 +168,7 @@ <param index="1" name="min" type="Variant" /> <param index="2" name="max" type="Variant" /> <description> - Clamps the [Variant] [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. + Clamps the [Variant] [param value] and returns a value not less than [param min] and not more than [param max]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. [codeblock] var a = clamp(-10, -1, 5) # a is -1 @@ -196,7 +196,7 @@ <param index="1" name="min" type="float" /> <param index="2" name="max" type="float" /> <description> - Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. + Clamps the float [param value] and returns a value not less than [param min] and not more than [param max]. [codeblock] var speed = 42.1 # a is 20.0 @@ -214,7 +214,7 @@ <param index="1" name="min" type="int" /> <param index="2" name="max" type="int" /> <description> - Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. + Clamps the integer [param value] and returns a value not less than [param min] and not more than [param max]. [codeblock] var speed = 42 # a is 20 @@ -230,7 +230,7 @@ <return type="float" /> <param index="0" name="angle_rad" type="float" /> <description> - Returns the cosine of angle [code]angle_rad[/code] in radians. + Returns the cosine of angle [param angle_rad] in radians. [codeblock] cos(PI * 2) # Returns 1.0 cos(PI) # Returns -1.0 @@ -242,7 +242,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the hyperbolic cosine of [code]x[/code] in radians. + Returns the hyperbolic cosine of [param x] in radians. [codeblock] # Prints 1.543081 print(cosh(1)) @@ -257,7 +257,22 @@ <param index="3" name="post" type="float" /> <param index="4" name="weight" type="float" /> <description> - Cubic interpolates between two values by the factor defined in [code]weight[/code] with pre and post values. + Cubic interpolates between two values by the factor defined in [param weight] with pre and post values. + </description> + </method> + <method name="cubic_interpolate_in_time"> + <return type="float" /> + <param index="0" name="from" type="float" /> + <param index="1" name="to" type="float" /> + <param index="2" name="pre" type="float" /> + <param index="3" name="post" type="float" /> + <param index="4" name="weight" type="float" /> + <param index="5" name="to_t" type="float" /> + <param index="6" name="pre_t" type="float" /> + <param index="7" name="post_t" type="float" /> + <description> + Cubic interpolates between two values by the factor defined in [param weight] with pre and post values. + It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values. </description> </method> <method name="db2linear"> @@ -283,7 +298,7 @@ <param index="0" name="x" type="float" /> <param index="1" name="curve" type="float" /> <description> - Returns an "eased" value of [code]x[/code] based on an easing function defined with [code]curve[/code]. This easing function is based on an exponent. The [code]curve[/code] can be any floating-point number, with specific values leading to the following behaviors: + Returns an "eased" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors: [codeblock] - Lower than -1.0 (exclusive): Ease in-out - 1.0: Linear @@ -308,7 +323,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]x[/code] and returns it. + The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [param x] and returns it. [b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code]. For exponents to other bases use the method [method pow]. [codeblock] @@ -320,7 +335,7 @@ <return type="Variant" /> <param index="0" name="x" type="Variant" /> <description> - Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. + Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. [codeblock] # a is 2.0 var a = floor(2.99) @@ -335,7 +350,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. + Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. A type-safe version of [method floor], specialzied in floats. </description> </method> @@ -343,7 +358,7 @@ <return type="int" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. + Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Equivalent of doing [code]int(x)[/code]. </description> </method> @@ -352,7 +367,7 @@ <param index="0" name="x" type="float" /> <param index="1" name="y" type="float" /> <description> - Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [code]x[/code]. + Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [param x]. [codeblock] # Remainder is 1.5 var remainder = fmod(7, 5.5) @@ -397,7 +412,7 @@ <return type="Object" /> <param index="0" name="instance_id" type="int" /> <description> - Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID. + Returns the Object that corresponds to [param instance_id]. All Objects have a unique instance ID. [codeblock] var foo = "bar" func _ready(): @@ -413,7 +428,7 @@ <param index="1" name="to" type="float" /> <param index="2" name="weight" type="float" /> <description> - Returns an interpolation or extrapolation factor considering the range specified in [code]from[/code] and [code]to[/code], and the interpolated value specified in [code]weight[/code]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [code]weight[/code] is between [code]from[/code] and [code]to[/code] (inclusive). If [code]weight[/code] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired. + Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired. [codeblock] # The interpolation ratio in the `lerp()` call below is 0.75. var middle = lerp(20, 30, 0.75) @@ -430,8 +445,8 @@ <param index="0" name="a" type="float" /> <param index="1" name="b" type="float" /> <description> - Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other. - Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers. + Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other. + Here, approximately equal means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers. Infinity values of the same sign are considered equal. </description> </method> @@ -439,35 +454,35 @@ <return type="bool" /> <param index="0" name="x" type="float" /> <description> - Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity). + Returns whether [param x] is an infinity value (either positive infinity or negative infinity). </description> </method> <method name="is_instance_id_valid"> <return type="bool" /> <param index="0" name="id" type="int" /> <description> - Returns [code]true[/code] if the Object that corresponds to [code]instance_id[/code] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID. + Returns [code]true[/code] if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID. </description> </method> <method name="is_instance_valid"> <return type="bool" /> <param index="0" name="instance" type="Variant" /> <description> - Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory). + Returns whether [param instance] is a valid object (e.g. has not been deleted from memory). </description> </method> <method name="is_nan"> <return type="bool" /> <param index="0" name="x" type="float" /> <description> - Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value. + Returns whether [param x] is a NaN ("Not a Number" or invalid) value. </description> </method> <method name="is_zero_approx"> <return type="bool" /> <param index="0" name="x" type="float" /> <description> - Returns [code]true[/code] if [code]x[/code] is zero or almost zero. + Returns [code]true[/code] if [param x] is zero or almost zero. This method is faster than using [method is_equal_approx] with one value as zero. </description> </method> @@ -477,8 +492,8 @@ <param index="1" name="to" type="Variant" /> <param index="2" name="weight" type="Variant" /> <description> - Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired. - Both [code]from[/code] and [code]to[/code] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis]. + Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired. + Both [param from] and [param to] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis]. [codeblock] lerp(0, 4, 0.75) # Returns 3.0 [/codeblock] @@ -503,7 +518,7 @@ rotation = lerp_angle(min_angle, max_angle, elapsed) elapsed += delta [/codeblock] - [b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise. + [b]Note:[/b] This method lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise. </description> </method> <method name="lerpf"> @@ -512,7 +527,7 @@ <param index="1" name="to" type="float" /> <param index="2" name="weight" type="float" /> <description> - Linearly interpolates between two values by the factor defined in [code]weight[/code]. To perform interpolation, [code]weight[/code] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. + Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. [codeblock] lerp(0, 4, 0.75) # Returns 3.0 [/codeblock] @@ -616,8 +631,8 @@ <param index="1" name="to" type="float" /> <param index="2" name="delta" type="float" /> <description> - Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. - Use a negative [code]delta[/code] value to move away. + Moves [param from] toward [param to] by the [param delta] value. + Use a negative [param delta] value to move away. [codeblock] move_toward(5, 10, 4) # Returns 9 move_toward(10, 5, 4) # Returns 6 @@ -629,7 +644,7 @@ <return type="int" /> <param index="0" name="value" type="int" /> <description> - Returns the nearest equal or larger power of 2 for integer [code]value[/code]. + Returns the nearest equal or larger power of 2 for integer [param value]. In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value <= a[/code] for some non-negative integer [code]n[/code]. [codeblock] nearest_po2(3) # Returns 4 @@ -639,7 +654,7 @@ nearest_po2(0) # Returns 0 (this may not be what you expect) nearest_po2(-1) # Returns 0 (this may not be what you expect) [/codeblock] - [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). + [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [param value] (in reality, 1 is the smallest integer power of 2). </description> </method> <method name="pingpong"> @@ -647,7 +662,7 @@ <param index="0" name="value" type="float" /> <param index="1" name="length" type="float" /> <description> - Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive. + Returns the [param value] wrapped between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive. [codeblock] pingpong(-3.0, 3.0) # Returns 3 pingpong(-2.0, 3.0) # Returns 2 @@ -689,7 +704,7 @@ <param index="0" name="base" type="float" /> <param index="1" name="exp" type="float" /> <description> - Returns the result of [code]base[/code] raised to the power of [code]exp[/code]. + Returns the result of [param base] raised to the power of [param exp]. [codeblock] pow(2, 5) # Returns 32 [/codeblock] @@ -786,7 +801,7 @@ <return type="PackedInt64Array" /> <param index="0" name="seed" type="int" /> <description> - Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits. + Random from seed: pass a [param seed], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits. </description> </method> <method name="randf"> @@ -803,7 +818,7 @@ <param index="0" name="from" type="float" /> <param index="1" name="to" type="float" /> <description> - Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive). + Returns a random floating point value on the interval between [param from] and [param to] (inclusive). [codeblock] prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315 [/codeblock] @@ -814,7 +829,7 @@ <param index="0" name="mean" type="float" /> <param index="1" name="deviation" type="float" /> <description> - Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. + Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution. </description> </method> <method name="randi"> @@ -834,7 +849,7 @@ <param index="0" name="from" type="int" /> <param index="1" name="to" type="int" /> <description> - Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped. + Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped. [codeblock] print(randi_range(0, 1)) # Prints 0 or 1 print(randi_range(-10, 1000)) # Prints any number from -10 to 1000 @@ -855,7 +870,7 @@ <param index="3" name="ostart" type="float" /> <param index="4" name="ostop" type="float" /> <description> - Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [code]value[/code] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired. + Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method range_lerp] if this is not desired. [codeblock] range_lerp(75, 0, 100, -1, 1) # Returns 0.5 [/codeblock] @@ -879,7 +894,7 @@ <return type="Variant" /> <param index="0" name="x" type="Variant" /> <description> - Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. + Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4]. [codeblock] round(2.4) # Returns 2 round(2.5) # Returns 3 @@ -893,7 +908,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. + Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. A type-safe version of [method round], specialzied in floats. </description> </method> @@ -901,7 +916,7 @@ <return type="int" /> <param index="0" name="x" type="float" /> <description> - Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. + Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. A type-safe version of [method round] that returns integer. </description> </method> @@ -919,7 +934,7 @@ <return type="Variant" /> <param index="0" name="x" type="Variant" /> <description> - Returns the sign of [code]x[/code] as same type of [Variant] as [code]x[/code] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. + Returns the sign of [param x] as same type of [Variant] as [param x] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported. [codeblock] sign(-6.0) # Returns -1 sign(0.0) # Returns 0 @@ -933,7 +948,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the sign of [code]x[/code] as a float: -1.0 or 1.0. Returns 0.0 if [code]x[/code] is 0. + Returns the sign of [param x] as a float: -1.0 or 1.0. Returns 0.0 if [param x] is 0. [codeblock] sign(-6.0) # Returns -1.0 sign(0.0) # Returns 0.0 @@ -945,7 +960,7 @@ <return type="int" /> <param index="0" name="x" type="int" /> <description> - Returns the sign of [code]x[/code] as an integer: -1 or 1. Returns 0 if [code]x[/code] is 0. + Returns the sign of [param x] as an integer: -1 or 1. Returns 0 if [param x] is 0. [codeblock] sign(-6) # Returns -1 sign(0) # Returns 0 @@ -957,7 +972,7 @@ <return type="float" /> <param index="0" name="angle_rad" type="float" /> <description> - Returns the sine of angle [code]angle_rad[/code] in radians. + Returns the sine of angle [param angle_rad] in radians. [codeblock] sin(0.523599) # Returns 0.5 sin(deg2rad(90)) # Returns 1.0 @@ -968,7 +983,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the hyperbolic sine of [code]x[/code]. + Returns the hyperbolic sine of [param x]. [codeblock] var a = log(2.0) # Returns 0.693147 sinh(a) # Returns 0.75 @@ -981,8 +996,8 @@ <param index="1" name="to" type="float" /> <param index="2" name="x" type="float" /> <description> - Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code]. - The return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code]. + Returns the result of smoothly interpolating the value of [param x] between [code]0[/code] and [code]1[/code], based on the where [param x] lies with respect to the edges [param from] and [param to]. + The return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [param x] lies between [param from] and [param to], the returned value follows an S-shaped curve that maps [param x] between [code]0[/code] and [code]1[/code]. This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code]. [codeblock] smoothstep(0, 2, -5.0) # Returns 0.0 @@ -999,7 +1014,7 @@ <param index="0" name="x" type="float" /> <param index="1" name="step" type="float" /> <description> - Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals. + Snaps float value [param x] to a given [param step]. This can also be used to round a floating point number to an arbitrary number of decimals. [codeblock] snapped(100, 32) # Returns 96 snapped(3.14159, 0.01) # Returns 3.14 @@ -1011,11 +1026,11 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the square root of [code]x[/code], where [code]x[/code] is a non-negative number. + Returns the square root of [param x], where [param x] is a non-negative number. [codeblock] sqrt(9) # Returns 3 [/codeblock] - [b]Note:[/b] Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#. + [b]Note:[/b] Negative values of [param x] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#. </description> </method> <method name="step_decimals"> @@ -1055,7 +1070,7 @@ <return type="float" /> <param index="0" name="angle_rad" type="float" /> <description> - Returns the tangent of angle [code]angle_rad[/code] in radians. + Returns the tangent of angle [param angle_rad] in radians. [codeblock] tan(deg2rad(45)) # Returns 1 [/codeblock] @@ -1065,7 +1080,7 @@ <return type="float" /> <param index="0" name="x" type="float" /> <description> - Returns the hyperbolic tangent of [code]x[/code]. + Returns the hyperbolic tangent of [param x]. [codeblock] var a = log(2.0) # Returns 0.693147 tanh(a) # Returns 0.6 @@ -1107,7 +1122,7 @@ <return type="String" /> <param index="0" name="variable" type="Variant" /> <description> - Converts a Variant [code]variable[/code] to a formatted string that can later be parsed using [method str2var]. + Converts a Variant [param variable] to a formatted string that can later be parsed using [method str2var]. [codeblock] a = { "a": 1, "b": 2 } print(var2str(a)) @@ -1135,7 +1150,7 @@ <param index="1" name="min" type="Variant" /> <param index="2" name="max" type="Variant" /> <description> - Wraps the [Variant] [code]value[/code] between [code]min[/code] and [code]max[/code]. + Wraps the [Variant] [param value] between [param min] and [param max]. Usable for creating loop-alike behavior or infinite surfaces. Variant types [int] and [float] (real) are supported. If any of the argument is [float] the result will be [float], otherwise it is [int]. [codeblock] @@ -1156,7 +1171,7 @@ <param index="1" name="min" type="float" /> <param index="2" name="max" type="float" /> <description> - Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code]. + Wraps float [param value] between [param min] and [param max]. Usable for creating loop-alike behavior or infinite surfaces. [codeblock] # Infinite loop between 5.0 and 9.9 @@ -1170,7 +1185,7 @@ # Infinite rotation (in radians) angle = wrapf(angle + 0.1, -PI, PI) [/codeblock] - [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead. + [b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead. [code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value. </description> </method> @@ -1180,7 +1195,7 @@ <param index="1" name="min" type="int" /> <param index="2" name="max" type="int" /> <description> - Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code]. + Wraps integer [param value] between [param min] and [param max]. Usable for creating loop-alike behavior or infinite surfaces. [codeblock] # Infinite loop between 5 and 9 @@ -1288,10 +1303,8 @@ <member name="TranslationServer" type="TranslationServer" setter="" getter=""> The [TranslationServer] singleton. </member> - <member name="VisualScriptCustomNodes" type="VisualScriptCustomNodes" setter="" getter=""> - The [VisualScriptCustomNodes] singleton. - </member> <member name="WorkerThreadPool" type="WorkerThreadPool" setter="" getter=""> + The [WorkerThreadPool] singleton. </member> <member name="XRServer" type="XRServer" setter="" getter=""> The [XRServer] singleton. @@ -2573,7 +2586,7 @@ </constant> <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint"> Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code]. - Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "no_slider" to hide the slider. + Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians"[/code] for editing radian angles in degrees, [code]"degrees"[/code] to hint at an angle and [code]"no_slider"[/code] to hide the slider. </constant> <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint"> Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string. @@ -2584,7 +2597,7 @@ Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values. </constant> <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint"> - Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing. + Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero. </constant> <constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint"> Hints that a vector property should allow linking values (e.g. to edit both [code]x[/code] and [code]y[/code] together). @@ -2695,7 +2708,10 @@ </constant> <constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint"> + <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="45" enum="PropertyHint"> + Hints that a quaternion property should disable the temporary euler editor. + </constant> + <constant name="PROPERTY_HINT_MAX" value="46" enum="PropertyHint"> </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> </constant> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 86f0487ea9..e2e4e7c61d 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -139,7 +139,7 @@ <return type="AABB" /> <param index="0" name="by" type="float" /> <description> - Returns a copy of the [AABB] grown a given amount of units towards all the sides. + Returns a copy of the [AABB] grown a given number of units towards all the sides. </description> </method> <method name="has_no_surface" qualifiers="const"> @@ -195,21 +195,21 @@ <param index="0" name="from" type="Vector3" /> <param index="1" name="to" type="Vector3" /> <description> - Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code]. + Returns [code]true[/code] if the [AABB] intersects the line segment between [param from] and [param to]. </description> </method> <method name="is_equal_approx" qualifiers="const"> <return type="bool" /> <param index="0" name="aabb" type="AABB" /> <description> - Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this [AABB] and [param aabb] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="merge" qualifiers="const"> <return type="AABB" /> <param index="0" name="with" type="AABB" /> <description> - Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. + Returns a larger [AABB] that contains both this [AABB] and [param with]. </description> </method> </methods> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index fe67f7de54..69cd54a79b 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -98,15 +98,15 @@ <param index="1" name="key" type="PackedByteArray" /> <param index="2" name="iv" type="PackedByteArray" default="PackedByteArray()" /> <description> - Start the AES context in the given [code]mode[/code]. A [code]key[/code] of either 16 or 32 bytes must always be provided, while an [code]iv[/code] (initialization vector) of exactly 16 bytes, is only needed when [code]mode[/code] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. + Start the AES context in the given [param mode]. A [param key] of either 16 or 32 bytes must always be provided, while an [param iv] (initialization vector) of exactly 16 bytes, is only needed when [param mode] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. </description> </method> <method name="update"> <return type="PackedByteArray" /> <param index="0" name="src" type="PackedByteArray" /> <description> - Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation. - [b]Note:[/b] The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed. + Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [param src]. See [method start] for mode of operation. + [b]Note:[/b] The size of [param src] must be a multiple of 16. Apply some padding if needed. </description> </method> </methods> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index eed0dd8688..6e76df647e 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -33,8 +33,8 @@ <param index="1" name="position" type="Vector2" /> <param index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. - The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. + Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. + The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. [codeblocks] [gdscript] var astar = AStar2D.new() @@ -45,7 +45,7 @@ astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1 [/csharp] [/codeblocks] - If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. + If there already exists a point for the given [param id], its position and weight scale are updated to the given values. </description> </method> <method name="are_points_connected" qualifiers="const"> @@ -54,7 +54,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Returns whether there is a connection/segment between the given points. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment. + Returns whether there is a connection/segment between the given points. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment. </description> </method> <method name="clear"> @@ -69,7 +69,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. + Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction. [codeblocks] [gdscript] var astar = AStar2D.new() @@ -92,7 +92,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains. + Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains. </description> </method> <method name="get_available_point_id" qualifiers="const"> @@ -106,15 +106,15 @@ <param index="0" name="to_position" type="Vector2" /> <param index="1" name="include_disabled" type="bool" default="false" /> <description> - Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. - [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result. + Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. + [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> <return type="Vector2" /> <param index="0" name="to_position" type="Vector2" /> <description> - Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. + Returns the closest position to [param to_position] that resides inside a segment between two connected points. [codeblocks] [gdscript] var astar = AStar2D.new() @@ -218,7 +218,7 @@ </description> </method> <method name="get_point_ids"> - <return type="Array" /> + <return type="PackedInt64Array" /> <description> Returns an array of all point IDs. </description> @@ -236,21 +236,21 @@ <return type="Vector2" /> <param index="0" name="id" type="int" /> <description> - Returns the position of the point associated with the given [code]id[/code]. + Returns the position of the point associated with the given [param id]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> <return type="float" /> <param index="0" name="id" type="int" /> <description> - Returns the weight scale of the point associated with the given [code]id[/code]. + Returns the weight scale of the point associated with the given [param id]. </description> </method> <method name="has_point" qualifiers="const"> <return type="bool" /> <param index="0" name="id" type="int" /> <description> - Returns whether a point associated with the given [code]id[/code] exists. + Returns whether a point associated with the given [param id] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> @@ -264,14 +264,14 @@ <return type="void" /> <param index="0" name="id" type="int" /> <description> - Removes the point associated with the given [code]id[/code] from the points pool. + Removes the point associated with the given [param id] from the points pool. </description> </method> <method name="reserve_space"> <return type="void" /> <param index="0" name="num_nodes" type="int" /> <description> - Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. + Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. </description> </method> <method name="set_point_disabled"> @@ -287,7 +287,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="position" type="Vector2" /> <description> - Sets the [code]position[/code] for the point with the given [code]id[/code]. + Sets the [param position] for the point with the given [param id]. </description> </method> <method name="set_point_weight_scale"> @@ -295,7 +295,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="weight_scale" type="float" /> <description> - Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. + Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. </description> </method> </methods> diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml index dc8c62054b..45b1019bab 100644 --- a/doc/classes/AStar3D.xml +++ b/doc/classes/AStar3D.xml @@ -62,8 +62,8 @@ <param index="1" name="position" type="Vector3" /> <param index="2" name="weight_scale" type="float" default="1.0" /> <description> - Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 0.0 or greater. - The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. + Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. + The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. [codeblocks] [gdscript] var astar = AStar3D.new() @@ -74,7 +74,7 @@ astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1 [/csharp] [/codeblocks] - If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. + If there already exists a point for the given [param id], its position and weight scale are updated to the given values. </description> </method> <method name="are_points_connected" qualifiers="const"> @@ -83,7 +83,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment. + Returns whether the two given points are directly connected by a segment. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment. </description> </method> <method name="clear"> @@ -98,7 +98,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. + Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction. [codeblocks] [gdscript] var astar = AStar3D.new() @@ -121,7 +121,7 @@ <param index="1" name="to_id" type="int" /> <param index="2" name="bidirectional" type="bool" default="true" /> <description> - Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains. + Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains. </description> </method> <method name="get_available_point_id" qualifiers="const"> @@ -135,15 +135,15 @@ <param index="0" name="to_position" type="Vector3" /> <param index="1" name="include_disabled" type="bool" default="false" /> <description> - Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. - [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result. + Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. + [b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> <return type="Vector3" /> <param index="0" name="to_position" type="Vector3" /> <description> - Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. + Returns the closest position to [param to_position] that resides inside a segment between two connected points. [codeblocks] [gdscript] var astar = AStar3D.new() @@ -245,7 +245,7 @@ </description> </method> <method name="get_point_ids"> - <return type="Array" /> + <return type="PackedInt64Array" /> <description> Returns an array of all point IDs. </description> @@ -263,21 +263,21 @@ <return type="Vector3" /> <param index="0" name="id" type="int" /> <description> - Returns the position of the point associated with the given [code]id[/code]. + Returns the position of the point associated with the given [param id]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> <return type="float" /> <param index="0" name="id" type="int" /> <description> - Returns the weight scale of the point associated with the given [code]id[/code]. + Returns the weight scale of the point associated with the given [param id]. </description> </method> <method name="has_point" qualifiers="const"> <return type="bool" /> <param index="0" name="id" type="int" /> <description> - Returns whether a point associated with the given [code]id[/code] exists. + Returns whether a point associated with the given [param id] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> @@ -291,14 +291,14 @@ <return type="void" /> <param index="0" name="id" type="int" /> <description> - Removes the point associated with the given [code]id[/code] from the points pool. + Removes the point associated with the given [param id] from the points pool. </description> </method> <method name="reserve_space"> <return type="void" /> <param index="0" name="num_nodes" type="int" /> <description> - Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. + Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. </description> </method> <method name="set_point_disabled"> @@ -314,7 +314,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="position" type="Vector3" /> <description> - Sets the [code]position[/code] for the point with the given [code]id[/code]. + Sets the [param position] for the point with the given [param id]. </description> </method> <method name="set_point_weight_scale"> @@ -322,7 +322,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="weight_scale" type="float" /> <description> - Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. + Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. </description> </method> </methods> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 3dde8664de..c83ea8c60a 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -15,8 +15,8 @@ <param index="1" name="right" type="bool" default="false" /> <param index="2" name="action" type="String" default="""" /> <description> - Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed. - If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons. + Adds a button with label [param text] and a custom [param action] to the dialog and returns the created button. [param action] will be passed to the [signal custom_action] signal when pressed. + If [code]true[/code], [param right] will place the button to the right of any sibling buttons. You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> @@ -24,7 +24,7 @@ <return type="Button" /> <param index="0" name="name" type="String" /> <description> - Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button. + Adds a button with label [param name] and a cancel action to the dialog and returns the created button. You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> @@ -53,7 +53,7 @@ <return type="void" /> <param index="0" name="button" type="Control" /> <description> - Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. + Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. </description> </method> </methods> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 39527664ed..b207eda27f 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -17,7 +17,7 @@ <param index="0" name="anim" type="StringName" default="&""" /> <param index="1" name="backwards" type="bool" default="false" /> <description> - Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. + Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. </description> </method> <method name="stop"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index aa56e50886..68354f092c 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -20,7 +20,7 @@ <return type="void" /> <param index="0" name="anim" type="StringName" default="&""" /> <description> - Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. + Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. </description> </method> <method name="stop"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 5186cb2ea1..faa9ae3569 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -44,7 +44,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track. + Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track. </description> </method> <method name="animation_track_insert_key"> @@ -53,7 +53,7 @@ <param index="1" name="time" type="float" /> <param index="2" name="animation" type="StringName" /> <description> - Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track. + Inserts a key with value [param animation] at the given [param time] (in seconds). The [param track_idx] must be the index of an Animation Track. </description> </method> <method name="animation_track_set_key_animation"> @@ -62,7 +62,7 @@ <param index="1" name="key_idx" type="int" /> <param index="2" name="animation" type="StringName" /> <description> - Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track. + Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track. </description> </method> <method name="audio_track_get_key_end_offset" qualifiers="const"> @@ -70,7 +70,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. End offset is the number of seconds cut off at the ending of the audio stream. </description> </method> @@ -79,7 +79,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. Start offset is the number of seconds cut off at the beginning of the audio stream. </description> </method> @@ -88,7 +88,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. </description> </method> <method name="audio_track_insert_key"> @@ -99,8 +99,8 @@ <param index="3" name="start_offset" type="float" default="0" /> <param index="4" name="end_offset" type="float" default="0" /> <description> - Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track. - [code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending. + Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track. + [param stream] is the [AudioStream] resource to play. [param start_offset] is the number of seconds cut off at the beginning of the audio stream, while [param end_offset] is at the ending. </description> </method> <method name="audio_track_set_key_end_offset"> @@ -109,7 +109,7 @@ <param index="1" name="key_idx" type="int" /> <param index="2" name="offset" type="float" /> <description> - Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Sets the end offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_start_offset"> @@ -118,7 +118,7 @@ <param index="1" name="key_idx" type="int" /> <param index="2" name="offset" type="float" /> <description> - Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Sets the start offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_stream"> @@ -127,15 +127,7 @@ <param index="1" name="key_idx" type="int" /> <param index="2" name="stream" type="Resource" /> <description> - Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track. - </description> - </method> - <method name="bezier_track_get_key_handle_mode" qualifiers="const"> - <return type="int" /> - <param index="0" name="track_idx" type="int" /> - <param index="1" name="key_idx" type="int" /> - <description> - Returns the handle mode of the key identified by [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track. + Sets the stream of the key identified by [param key_idx] to value [param stream]. The [param track_idx] must be the index of an Audio Track. </description> </method> <method name="bezier_track_get_key_in_handle" qualifiers="const"> @@ -143,7 +135,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. + Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_out_handle" qualifiers="const"> @@ -151,7 +143,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. + Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_value" qualifiers="const"> @@ -159,7 +151,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="key_idx" type="int" /> <description> - Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. + Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_insert_key"> @@ -169,10 +161,9 @@ <param index="2" name="value" type="float" /> <param index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" /> <param index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" /> - <param index="5" name="handle_mode" type="int" enum="Animation.HandleMode" default="1" /> <description> - Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track. - [code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point. + Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track. + [param in_handle] is the left-side weight of the added Bezier curve point, [param out_handle] is the right-side one, while [param value] is the actual value at this point. </description> </method> <method name="bezier_track_interpolate" qualifiers="const"> @@ -180,17 +171,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="time" type="float" /> <description> - Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track. - </description> - </method> - <method name="bezier_track_set_key_handle_mode"> - <return type="void" /> - <param index="0" name="track_idx" type="int" /> - <param index="1" name="key_idx" type="int" /> - <param index="2" name="key_handle_mode" type="int" enum="Animation.HandleMode" /> - <param index="3" name="balanced_value_time_ratio" type="float" default="1.0" /> - <description> - Changes the handle mode of the keyframe at the given [code]index[/code]. See [enum HandleMode] for possible values. The [code]track_idx[/code] must be the index of a Bezier Track. + Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_in_handle"> @@ -200,7 +181,7 @@ <param index="2" name="in_handle" type="Vector2" /> <param index="3" name="balanced_value_time_ratio" type="float" default="1.0" /> <description> - Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. + Sets the in handle of the key identified by [param key_idx] to value [param in_handle]. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_out_handle"> @@ -210,7 +191,7 @@ <param index="2" name="out_handle" type="Vector2" /> <param index="3" name="balanced_value_time_ratio" type="float" default="1.0" /> <description> - Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. + Sets the out handle of the key identified by [param key_idx] to value [param out_handle]. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_value"> @@ -219,7 +200,7 @@ <param index="1" name="key_idx" type="int" /> <param index="2" name="value" type="float" /> <description> - Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track. + Sets the value of the key identified by [param key_idx] to the given value. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="blend_shape_track_insert_key"> @@ -249,7 +230,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="to_animation" type="Animation" /> <description> - Adds a new track that is a copy of the given track from [code]to_animation[/code]. + Adds a new track that is a copy of the given track from [param to_animation]. </description> </method> <method name="find_track" qualifiers="const"> @@ -335,7 +316,7 @@ <return type="bool" /> <param index="0" name="track_idx" type="int" /> <description> - Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default. + Returns [code]true[/code] if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default. </description> </method> <method name="track_get_interpolation_type" qualifiers="const"> @@ -349,7 +330,7 @@ <return type="int" /> <param index="0" name="track_idx" type="int" /> <description> - Returns the amount of keys in a given track. + Returns the number of keys in a given track. </description> </method> <method name="track_get_key_time" qualifiers="const"> @@ -410,7 +391,7 @@ <return type="bool" /> <param index="0" name="track_idx" type="int" /> <description> - Returns [code]true[/code] if the track at index [code]idx[/code] is enabled. + Returns [code]true[/code] if the track at index [param track_idx] is enabled. </description> </method> <method name="track_is_imported" qualifiers="const"> @@ -432,7 +413,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="to_idx" type="int" /> <description> - Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code]. + Changes the index position of track [param track_idx] to the one defined in [param to_idx]. </description> </method> <method name="track_move_up"> @@ -455,7 +436,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="time" type="float" /> <description> - Removes a key at [code]time[/code] in a given track. + Removes a key at [param time] in a given track. </description> </method> <method name="track_set_enabled"> @@ -479,7 +460,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="interpolation" type="bool" /> <description> - If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop. + If [code]true[/code], the track at [param track_idx] wraps the interpolation loop. </description> </method> <method name="track_set_interpolation_type"> @@ -531,7 +512,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="with_idx" type="int" /> <description> - Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code]. + Swaps the track [param track_idx]'s index position with the track [param with_idx]. </description> </method> <method name="value_track_get_key_indices" qualifiers="const"> @@ -555,7 +536,7 @@ <param index="0" name="track_idx" type="int" /> <param index="1" name="time_sec" type="float" /> <description> - Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track. + Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track. </description> </method> <method name="value_track_set_update_mode"> @@ -619,6 +600,9 @@ <constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType"> Cubic interpolation. </constant> + <constant name="INTERPOLATION_CUBIC_IN_TIME" value="3" enum="InterpolationType"> + Cubic interpolation with uniformed time. + </constant> <constant name="UPDATE_CONTINUOUS" value="0" enum="UpdateMode"> Update between keyframes. </constant> @@ -640,11 +624,5 @@ <constant name="LOOP_PINGPONG" value="2" enum="LoopMode"> Repeats playback and reverse playback at both ends of the animation. </constant> - <constant name="HANDLE_MODE_FREE" value="0" enum="HandleMode"> - Assigning the free handle mode to a Bezier Track's keyframe allows you to edit the keyframe's left and right handles independently from one another. - </constant> - <constant name="HANDLE_MODE_BALANCED" value="1" enum="HandleMode"> - Assigning the balanced handle mode to a Bezier Track's keyframe makes it so the two handles of the keyframe always stay aligned when changing either the keyframe's left or right handle. - </constant> </constants> </class> diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml index 015d306b41..fbbf9a3be4 100644 --- a/doc/classes/AnimationLibrary.xml +++ b/doc/classes/AnimationLibrary.xml @@ -1,10 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimationLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Container for [Animation] resources. </brief_description> <description> + An animation library stores a set of animations accessible through [StringName] keys, for use with [AnimationPlayer] nodes. </description> <tutorials> + <link title="Animation tutorial index">$DOCS_URL/tutorials/animation/index.html</link> </tutorials> <methods> <method name="add_animation"> @@ -12,29 +15,34 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="animation" type="Animation" /> <description> + Adds the [param animation] to the library, accesible by the key [param name]. </description> </method> <method name="get_animation" qualifiers="const"> <return type="Animation" /> <param index="0" name="name" type="StringName" /> <description> + Returns the [Animation] with the key [param name], or [code]null[/code] if none is found. </description> </method> <method name="get_animation_list" qualifiers="const"> <return type="StringName[]" /> <description> + Returns the keys for the [Animation]s stored in the library. </description> </method> <method name="has_animation" qualifiers="const"> <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> + Returns [code]true[/code] if the library stores an [Animation] with [param name] as the key. </description> </method> <method name="remove_animation"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> + Removes the [Animation] with the key [param name]. </description> </method> <method name="rename_animation"> @@ -42,6 +50,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="newname" type="StringName" /> <description> + Changes the key of the [Animation] associated with the key [param name] to [param newname]. </description> </method> </methods> @@ -53,17 +62,20 @@ <signal name="animation_added"> <param index="0" name="name" type="StringName" /> <description> + Emitted when an [Animation] is added, under the key [param name]. </description> </signal> <signal name="animation_removed"> <param index="0" name="name" type="StringName" /> <description> + Emitted when an [Animation] stored with the key [param name] is removed. </description> </signal> <signal name="animation_renamed"> <param index="0" name="name" type="StringName" /> <param index="1" name="to_name" type="StringName" /> <description> + Emitted when the key for an [Animation] is changed, from [param name] to [param to_name]. </description> </signal> </signals> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index ba20007825..b856b5f208 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -14,39 +14,39 @@ <method name="_get_caption" qualifiers="virtual const"> <return type="String" /> <description> - Gets the text caption for this node (used by some editors). + When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node. </description> </method> <method name="_get_child_by_name" qualifiers="virtual const"> <return type="AnimationNode" /> <param index="0" name="name" type="StringName" /> <description> - Gets a child node by index (used by editors inheriting from [AnimationRootNode]). + When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [param name]. </description> </method> <method name="_get_child_nodes" qualifiers="virtual const"> <return type="Dictionary" /> <description> - Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode]. + When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary. </description> </method> <method name="_get_parameter_default_value" qualifiers="virtual const"> <return type="Variant" /> <param index="0" name="parameter" type="StringName" /> <description> - Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. + When inheriting from [AnimationRootNode], implement this virtual method to return the default value of a [param parameter]. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> <method name="_get_parameter_list" qualifiers="virtual const"> <return type="Array" /> <description> - Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. + When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. </description> </method> <method name="_has_filter" qualifiers="virtual const"> <return type="bool" /> <description> - Returns whether you want the blend tree editor to display filter editing on this node. + When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node. </description> </method> <method name="_process" qualifiers="virtual const"> @@ -55,7 +55,7 @@ <param index="1" name="seek" type="bool" /> <param index="2" name="seek_root" type="bool" /> <description> - User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. + When inheriting from [AnimationRootNode], implement this virtual method to run some code when this node is processed. The [param time] parameter is a relative delta, unless [param seek] is [code]true[/code], in which case it is absolute. Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called). </description> @@ -77,7 +77,7 @@ <param index="5" name="blend" type="float" /> <param index="6" name="pingponged" type="int" default="0" /> <description> - Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened. + Blend an animation by [param blend] amount (name must be valid in the linked [AnimationPlayer]). A [param time] and [param delta] may be passed, as well as whether [param seeked] happened. </description> </method> <method name="blend_input"> @@ -90,7 +90,7 @@ <param index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> <param index="6" name="sync" type="bool" default="true" /> <description> - Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). + Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [param time] parameter is a relative delta, unless [param seek] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). </description> </method> <method name="blend_node"> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 3279c5465e..0f1ce127cd 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -19,7 +19,7 @@ <param index="1" name="pos" type="float" /> <param index="2" name="at_index" type="int" default="-1" /> <description> - Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. + Adds a new point that represents a [param node] on the virtual axis at a given position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> @@ -32,21 +32,21 @@ <return type="AnimationRootNode" /> <param index="0" name="point" type="int" /> <description> - Returns the [AnimationNode] referenced by the point at index [code]point[/code]. + Returns the [AnimationNode] referenced by the point at index [param point]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> <return type="float" /> <param index="0" name="point" type="int" /> <description> - Returns the position of the point at index [code]point[/code]. + Returns the position of the point at index [param point]. </description> </method> <method name="remove_blend_point"> <return type="void" /> <param index="0" name="point" type="int" /> <description> - Removes the point at index [code]point[/code] from the blend axis. + Removes the point at index [param point] from the blend axis. </description> </method> <method name="set_blend_point_node"> @@ -54,7 +54,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="node" type="AnimationRootNode" /> <description> - Changes the [AnimationNode] referenced by the point at index [code]point[/code]. + Changes the [AnimationNode] referenced by the point at index [param point]. </description> </method> <method name="set_blend_point_position"> @@ -62,7 +62,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="pos" type="float" /> <description> - Updates the position of the point at index [code]point[/code] on the blend axis. + Updates the position of the point at index [param point] on the blend axis. </description> </method> </methods> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 9030634bac..8d5e153b03 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -19,7 +19,7 @@ <param index="1" name="pos" type="Vector2" /> <param index="2" name="at_index" type="int" default="-1" /> <description> - Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. + Adds a new point that represents a [param node] at the position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. </description> </method> <method name="add_triangle"> @@ -29,7 +29,7 @@ <param index="2" name="z" type="int" /> <param index="3" name="at_index" type="int" default="-1" /> <description> - Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. + Creates a new triangle using three points [param x], [param y], and [param z]. Triangles can overlap. You can insert the triangle at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> @@ -42,14 +42,14 @@ <return type="AnimationRootNode" /> <param index="0" name="point" type="int" /> <description> - Returns the [AnimationRootNode] referenced by the point at index [code]point[/code]. + Returns the [AnimationRootNode] referenced by the point at index [param point]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> <return type="Vector2" /> <param index="0" name="point" type="int" /> <description> - Returns the position of the point at index [code]point[/code]. + Returns the position of the point at index [param point]. </description> </method> <method name="get_triangle_count" qualifiers="const"> @@ -63,21 +63,21 @@ <param index="0" name="triangle" type="int" /> <param index="1" name="point" type="int" /> <description> - Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code]. + Returns the position of the point at index [param point] in the triangle of index [param triangle]. </description> </method> <method name="remove_blend_point"> <return type="void" /> <param index="0" name="point" type="int" /> <description> - Removes the point at index [code]point[/code] from the blend space. + Removes the point at index [param point] from the blend space. </description> </method> <method name="remove_triangle"> <return type="void" /> <param index="0" name="triangle" type="int" /> <description> - Removes the triangle at index [code]triangle[/code] from the blend space. + Removes the triangle at index [param triangle] from the blend space. </description> </method> <method name="set_blend_point_node"> @@ -85,7 +85,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="node" type="AnimationRootNode" /> <description> - Changes the [AnimationNode] referenced by the point at index [code]point[/code]. + Changes the [AnimationNode] referenced by the point at index [param point]. </description> </method> <method name="set_blend_point_position"> @@ -93,7 +93,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="pos" type="Vector2" /> <description> - Updates the position of the point at index [code]point[/code] on the blend axis. + Updates the position of the point at index [param point] on the blend axis. </description> </method> </methods> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index b4995b90c8..4c7943ece3 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -17,7 +17,7 @@ <param index="1" name="node" type="AnimationNode" /> <param index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> - Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later. + Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub-node later. </description> </method> <method name="connect_node"> @@ -26,7 +26,7 @@ <param index="1" name="input_index" type="int" /> <param index="2" name="output_node" type="StringName" /> <description> - Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code]. + Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index]. </description> </method> <method name="disconnect_node"> @@ -41,21 +41,21 @@ <return type="AnimationNode" /> <param index="0" name="name" type="StringName" /> <description> - Returns the sub-node with the specified [code]name[/code]. + Returns the sub-node with the specified [param name]. </description> </method> <method name="get_node_position" qualifiers="const"> <return type="Vector2" /> <param index="0" name="name" type="StringName" /> <description> - Returns the position of the sub-node with the specified [code]name[/code]. + Returns the position of the sub-node with the specified [param name]. </description> </method> <method name="has_node" qualifiers="const"> <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists. + Returns [code]true[/code] if a sub-node with specified [param name] exists. </description> </method> <method name="remove_node"> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 1fa05fa8f1..0fb789875f 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -27,7 +27,7 @@ <param index="1" name="node" type="AnimationNode" /> <param index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> - Adds a new node to the graph. The [code]position[/code] is used for display in the editor. + Adds a new node to the graph. The [param position] is used for display in the editor. </description> </method> <method name="add_transition"> diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 0badb831de..1b5a795b3c 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -9,7 +9,7 @@ </tutorials> <members> <member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&"""> - Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: + Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code]Using AnimationTree[/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblocks] [gdscript] $animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0)) @@ -37,6 +37,9 @@ <member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0"> The transition type. </member> + <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve"> + Ease curve for better control over cross-fade between this state and the next. + </member> <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0"> The time to cross-fade between this state and the next. </member> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index a5de170ccd..d574bc044d 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -46,7 +46,9 @@ <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> The number of available input ports for this node. </member> - <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0"> + <member name="xfade_curve" type="Curve" setter="set_xfade_curve" getter="get_xfade_curve"> + </member> + <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0"> Cross-fading time (in seconds) between each animation connected to the inputs. </member> </members> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 7b59051f49..d771206cc2 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -20,21 +20,21 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="library" type="AnimationLibrary" /> <description> - Adds [code]library[/code] to the animation player, under the key [code]name[/code]. + Adds [param library] to the animation player, under the key [param name]. </description> </method> <method name="advance"> <return type="void" /> <param index="0" name="delta" type="float" /> <description> - Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. + Shifts position in the animation timeline and immediately updates the animation. [param delta] is the time in seconds to shift. Events between the current frame and [param delta] are handled. </description> </method> <method name="animation_get_next" qualifiers="const"> <return type="StringName" /> <param index="0" name="anim_from" type="StringName" /> <description> - Returns the key of the animation which is queued to play after the [code]anim_from[/code] animation. + Returns the key of the animation which is queued to play after the [param anim_from] animation. </description> </method> <method name="animation_set_next"> @@ -42,7 +42,7 @@ <param index="0" name="anim_from" type="StringName" /> <param index="1" name="anim_to" type="StringName" /> <description> - Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes. + Triggers the [param anim_to] animation when the [param anim_from] animation completes. </description> </method> <method name="clear_caches"> @@ -61,28 +61,28 @@ <return type="StringName" /> <param index="0" name="animation" type="Animation" /> <description> - Returns the key of [code]animation[/code] or an empty [StringName] if not found. + Returns the key of [param animation] or an empty [StringName] if not found. </description> </method> <method name="find_animation_library" qualifiers="const"> <return type="StringName" /> <param index="0" name="animation" type="Animation" /> <description> - Returns the key for the [AnimationLibrary] that contains [code]animation[/code] or an empty [StringName] if not found. + Returns the key for the [AnimationLibrary] that contains [param animation] or an empty [StringName] if not found. </description> </method> <method name="get_animation" qualifiers="const"> <return type="Animation" /> <param index="0" name="name" type="StringName" /> <description> - Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found. + Returns the [Animation] with key [param name] or [code]null[/code] if not found. </description> </method> <method name="get_animation_library" qualifiers="const"> <return type="AnimationLibrary" /> <param index="0" name="name" type="StringName" /> <description> - Returns the first [AnimationLibrary] with key [code]name[/code] or [code]null[/code] if not found. + Returns the first [AnimationLibrary] with key [param name] or [code]null[/code] if not found. </description> </method> <method name="get_animation_library_list" qualifiers="const"> @@ -121,14 +121,14 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code]. + Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [param name]. </description> </method> <method name="has_animation_library" qualifiers="const"> <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [code]name[/code]. + Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [param name]. </description> </method> <method name="is_playing" qualifiers="const"> @@ -144,8 +144,8 @@ <param index="2" name="custom_speed" type="float" default="1.0" /> <param index="3" name="from_end" type="bool" default="false" /> <description> - Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]). - The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing. + Plays the animation with key [param name]. Custom blend times and speed can be set. If [param custom_speed] is negative and [param from_end] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]). + The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing. [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. </description> </method> @@ -154,7 +154,7 @@ <param index="0" name="name" type="StringName" default="""" /> <param index="1" name="custom_blend" type="float" default="-1" /> <description> - Plays the animation with key [code]name[/code] in reverse. + Plays the animation with key [param name] in reverse. This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information. </description> </method> @@ -170,7 +170,7 @@ <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes the [AnimationLibrary] assosiated with the key [code]name[/code]. + Removes the [AnimationLibrary] assosiated with the key [param name]. </description> </method> <method name="rename_animation_library"> @@ -178,7 +178,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="newname" type="StringName" /> <description> - Moves the [AnimationLibrary] associated with the key [code]name[/code] to the key [code]newname[/code]. + Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname]. </description> </method> <method name="seek"> @@ -186,7 +186,7 @@ <param index="0" name="seconds" type="float" /> <param index="1" name="update" type="bool" default="false" /> <description> - Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. + Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped. [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance]. </description> </method> @@ -203,8 +203,8 @@ <return type="void" /> <param index="0" name="reset" type="bool" default="true" /> <description> - Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. - If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. + Stops or pauses the currently playing animation. If [param reset] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + If [param reset] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. </description> </method> </methods> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 034140ff52..f1e40d4979 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -4,7 +4,9 @@ 2D area for detection and physics and audio influence. </brief_description> <description> - 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus. + 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. + To give the area its shape, add a [CollisionShape2D] or a [CollisionPolygon2D] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area. + [b]Warning:[/b] See [ConcavePolygonShape2D] for a warning about possibly unexpected behavior when using that shape for an area. </description> <tutorials> <link title="Using Area2D">$DOCS_URL/tutorials/physics/using_area_2d.html</link> @@ -41,7 +43,7 @@ <description> Returns [code]true[/code] if the given physics body intersects or overlaps this [Area2D], [code]false[/code] otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. + The [param body] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. </description> </method> </methods> @@ -99,14 +101,14 @@ <param index="0" name="area" type="Area2D" /> <description> Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [code]area[/code] the other Area2D. + [param area] the other Area2D. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area2D" /> <description> Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [code]area[/code] the other Area2D. + [param area] the other Area2D. </description> </signal> <signal name="area_shape_entered"> @@ -116,10 +118,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [code]area[/code] the other Area2D. - [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. + [param area] the other Area2D. + [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. + [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="area_shape_exited"> @@ -129,24 +131,24 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [code]area_rid[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [code]area[/code] the other Area2D. - [code]area_shape_index[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. + [param area] the other Area2D. + [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. + [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node2D" /> <description> Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node2D" /> <description> Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_shape_entered"> @@ -156,10 +158,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. + [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. + [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="body_shape_exited"> @@ -169,10 +171,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [code]body_rid[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [code]body_shape_index[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. + [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. + [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> </signals> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index 0313e8f679..14081918cf 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -5,6 +5,8 @@ </brief_description> <description> 3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to custom audio buses. + To give the area its shape, add a [CollisionShape3D] or a [CollisionPolygon3D] node as a [i]direct[/i] child (or add multiple such nodes as direct children) of the area. + [b]Warning:[/b] See [ConcavePolygonShape3D] (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area. </description> <tutorials> <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> @@ -39,7 +41,7 @@ <description> Returns [code]true[/code] if the given physics body intersects or overlaps this [Area3D], [code]false[/code] otherwise. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. - The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. + The [param body] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. </description> </method> </methods> @@ -118,14 +120,14 @@ <param index="0" name="area" type="Area3D" /> <description> Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [code]area[/code] the other Area3D. + [param area] the other Area3D. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area3D" /> <description> Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [code]area[/code] the other Area3D. + [param area] the other Area3D. </description> </signal> <signal name="area_shape_entered"> @@ -135,10 +137,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [code]area[/code] the other Area3D. - [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. + [param area] the other Area3D. + [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. + [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="area_shape_exited"> @@ -148,24 +150,24 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of another Area3D's [Shape3D]s exits one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [code]area_rid[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [code]area[/code] the other Area3D. - [code]area_shape_index[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. + [param area] the other Area3D. + [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. + [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node3D" /> <description> Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node3D" /> <description> Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_shape_entered"> @@ -175,10 +177,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. + [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. + [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> <signal name="body_shape_exited"> @@ -188,10 +190,10 @@ <param index="3" name="local_shape_index" type="int" /> <description> Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [code]body_rid[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [code]body_shape_index[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [code]local_shape_index[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. + [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. + [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. </description> </signal> </signals> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index ac8d09be43..f6d926031d 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -201,7 +201,7 @@ <param index="0" name="value" type="Variant" /> <param index="1" name="before" type="bool" default="true" /> <description> - Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> @@ -211,7 +211,7 @@ <param index="1" name="func" type="Callable" /> <param index="2" name="before" type="bool" default="true" /> <description> - Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. [b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior. </description> </method> @@ -233,7 +233,7 @@ <param index="0" name="deep" type="bool" default="false" /> <description> Returns a copy of the array. - If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. + If [param deep] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. </description> </method> <method name="erase"> @@ -399,7 +399,7 @@ <return type="Variant" /> <param index="0" name="position" type="int" /> <description> - Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. + Removes and returns the element of the array at index [param position]. If negative, [param position] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. [b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be. </description> </method> @@ -436,8 +436,8 @@ <param index="0" name="method" type="Callable" /> <param index="1" name="accum" type="Variant" default="null" /> <description> - Calls the provided [Callable] for each element in array and accumulates the result in [code]accum[/code]. - The callable's method takes two arguments: the current value of [code]accum[/code] and the current array element. If [code]accum[/code] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [code]accum[/code]. + Calls the provided [Callable] for each element in array and accumulates the result in [param accum]. + The callable's method takes two arguments: the current value of [param accum] and the current array element. If [param accum] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [param accum]. [codeblock] func _ready(): print([1, 2, 3].reduce(sum, 10)) # Prints 16. @@ -498,11 +498,11 @@ <param index="2" name="step" type="int" default="1" /> <param index="3" name="deep" type="bool" default="false" /> <description> - Returns the slice of the [Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [Array]. - The absolute value of [code]begin[/code] and [code]end[/code] will be clamped to the array size, so the default value for [code]end[/code] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]). - If either [code]begin[/code] or [code]end[/code] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]). - If specified, [code]step[/code] is the relative index between source elements. It can be negative, then [code]begin[/code] must be higher than [code]end[/code]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]). - If [code]deep[/code] is true, each element will be copied by value rather than by reference. + Returns the slice of the [Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [Array]. + The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]). + If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]). + If specified, [param step] is the relative index between source elements. It can be negative, then [param begin] must be higher than [param end]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code]). + If [param deep] is true, each element will be copied by value rather than by reference. </description> </method> <method name="sort"> @@ -562,56 +562,56 @@ <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Compares the left operand [Array] against the [code]right[/code] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise. + Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise. </description> </operator> <operator name="operator +"> <return type="Array" /> <param index="0" name="right" type="Array" /> <description> - Concatenates two [Array]s together, with the [code]right[/code] [Array] being added to the end of the [Array] specified in the left operand. For example, [code][1, 2] + [3, 4][/code] results in [code][1, 2, 3, 4][/code]. + Concatenates two [Array]s together, with the [param right] [Array] being added to the end of the [Array] specified in the left operand. For example, [code][1, 2] + [3, 4][/code] results in [code][1, 2, 3, 4][/code]. </description> </operator> <operator name="operator <"> <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]false[/code] if the left operand [Array] has less elements, otherwise it returns [code]true[/code]. + Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]false[/code] if the left operand [Array] has fewer elements, otherwise it returns [code]true[/code]. </description> </operator> <operator name="operator <="> <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the left operand [Array] has less or the same number of elements, otherwise it returns [code]false[/code]. + Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the left operand [Array] has the same number of elements or fewer, otherwise it returns [code]false[/code]. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Compares the left operand [Array] against the [code]right[/code] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise. + Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise. </description> </operator> <operator name="operator >"> <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [code]right[/code] [Array] has more elements, otherwise it returns [code]false[/code]. + Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more elements, otherwise it returns [code]false[/code]. </description> </operator> <operator name="operator >="> <return type="bool" /> <param index="0" name="right" type="Array" /> <description> - Performs a comparison for each index between the left operand [Array] and the [code]right[/code] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [code]right[/code] [Array] has more or the same number of elements, otherwise it returns [code]false[/code]. + Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more or the same number of elements, otherwise it returns [code]false[/code]. </description> </operator> <operator name="operator []"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Returns a reference to the element of type [Variant] at the specified location. Arrays start at index 0. [code]index[/code] can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor. + Returns a reference to the element of type [Variant] at the specified location. Arrays start at index 0. [param index] can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor. </description> </operator> </operators> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 500cf342c0..c766becce2 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -66,8 +66,8 @@ <param index="4" name="compress_flags" type="int" default="0" /> <description> Creates a new surface. - Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. - The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. + Surfaces are created to be rendered using a [param primitive], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. + The [param arrays] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. </description> </method> <method name="clear_blend_shapes"> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index 016c71bf27..c2a5ec3b45 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -15,7 +15,7 @@ <return type="bool" /> <param index="0" name="frames" type="int" /> <description> - Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer. + Returns [code]true[/code] if at least [param frames] audio frames are available to read in the internal ring buffer. </description> </method> <method name="clear_buffer"> @@ -28,8 +28,8 @@ <return type="PackedVector2Array" /> <param index="0" name="frames" type="int" /> <description> - Gets the next [code]frames[/code] audio samples from the internal ring buffer. - Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. + Gets the next [param frames] audio samples from the internal ring buffer. + Returns a [PackedVector2Array] containing exactly [param frames] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. </description> </method> <method name="get_buffer_length_frames" qualifiers="const"> diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index 83cbcff70c..de168cdfb0 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -166,7 +166,7 @@ The voice's filter rate. </member> <member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count" default="2"> - The amount of voices in the effect. + The number of voices in the effect. </member> <member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5"> The effect's processed signal. diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 8223ccd6bd..b9ae12204e 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -14,40 +14,40 @@ <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. </member> - <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false"> + <member name="feedback_active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false"> If [code]true[/code], feedback is enabled. </member> - <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0"> + <member name="feedback_delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0"> Feedback delay time in milliseconds. </member> - <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0"> + <member name="feedback_level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0"> Sound level for [code]tap1[/code]. </member> - <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0"> + <member name="feedback_lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0"> Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. </member> - <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true"> + <member name="tap1_active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true"> If [code]true[/code], [code]tap1[/code] will be enabled. </member> - <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0"> + <member name="tap1_delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0"> [code]tap1[/code] delay time in milliseconds. </member> - <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0"> + <member name="tap1_level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0"> Sound level for [code]tap1[/code]. </member> - <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2"> + <member name="tap1_pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2"> Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right). </member> - <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true"> + <member name="tap2_active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true"> If [code]true[/code], [code]tap2[/code] will be enabled. </member> - <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0"> + <member name="tap2_delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0"> [b]Tap2[/b] delay time in milliseconds. </member> - <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0"> + <member name="tap2_level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0"> Sound level for [code]tap2[/code]. </member> - <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4"> + <member name="tap2_pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4"> Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). </member> </members> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 98b28ae504..8dc80e3bdc 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -17,7 +17,7 @@ <return type="void" /> <param index="0" name="at_position" type="int" default="-1" /> <description> - Adds a bus at [code]at_position[/code]. + Adds a bus at [param at_position]. </description> </method> <method name="add_bus_effect"> @@ -26,11 +26,11 @@ <param index="1" name="effect" type="AudioEffect" /> <param index="2" name="at_position" type="int" default="-1" /> <description> - Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code]. + Adds an [AudioEffect] effect to the bus [param bus_idx] at [param at_position]. </description> </method> <method name="capture_get_device_list"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Returns the names of all audio input devices detected on the system. </description> @@ -45,7 +45,7 @@ <return type="int" /> <param index="0" name="bus_idx" type="int" /> <description> - Returns the amount of channels of the bus at index [code]bus_idx[/code]. + Returns the number of channels of the bus at index [param bus_idx]. </description> </method> <method name="get_bus_effect"> @@ -53,14 +53,14 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="effect_idx" type="int" /> <description> - Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code]. + Returns the [AudioEffect] at position [param effect_idx] in bus [param bus_idx]. </description> </method> <method name="get_bus_effect_count"> <return type="int" /> <param index="0" name="bus_idx" type="int" /> <description> - Returns the number of effects on the bus at [code]bus_idx[/code]. + Returns the number of effects on the bus at [param bus_idx]. </description> </method> <method name="get_bus_effect_instance"> @@ -76,14 +76,14 @@ <return type="int" /> <param index="0" name="bus_name" type="StringName" /> <description> - Returns the index of the bus with the name [code]bus_name[/code]. + Returns the index of the bus with the name [param bus_name]. </description> </method> <method name="get_bus_name" qualifiers="const"> <return type="String" /> <param index="0" name="bus_idx" type="int" /> <description> - Returns the name of the bus with the index [code]bus_idx[/code]. + Returns the name of the bus with the index [param bus_idx]. </description> </method> <method name="get_bus_peak_volume_left_db" qualifiers="const"> @@ -91,7 +91,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="channel" type="int" /> <description> - Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. + Returns the peak volume of the left speaker at bus index [param bus_idx] and channel index [param channel]. </description> </method> <method name="get_bus_peak_volume_right_db" qualifiers="const"> @@ -99,25 +99,25 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="channel" type="int" /> <description> - Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. + Returns the peak volume of the right speaker at bus index [param bus_idx] and channel index [param channel]. </description> </method> <method name="get_bus_send" qualifiers="const"> <return type="StringName" /> <param index="0" name="bus_idx" type="int" /> <description> - Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to. + Returns the name of the bus that the bus at index [param bus_idx] sends to. </description> </method> <method name="get_bus_volume_db" qualifiers="const"> <return type="float" /> <param index="0" name="bus_idx" type="int" /> <description> - Returns the volume of the bus at index [code]bus_idx[/code] in dB. + Returns the volume of the bus at index [param bus_idx] in dB. </description> </method> <method name="get_device_list"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Returns the names of all audio devices detected on the system. </description> @@ -156,7 +156,7 @@ <return type="bool" /> <param index="0" name="bus_idx" type="int" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [param bus_idx] is bypassing effects. </description> </method> <method name="is_bus_effect_enabled" qualifiers="const"> @@ -164,21 +164,21 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="effect_idx" type="int" /> <description> - If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled. </description> </method> <method name="is_bus_mute" qualifiers="const"> <return type="bool" /> <param index="0" name="bus_idx" type="int" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [param bus_idx] is muted. </description> </method> <method name="is_bus_solo" qualifiers="const"> <return type="bool" /> <param index="0" name="bus_idx" type="int" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [param bus_idx] is in solo mode. </description> </method> <method name="lock"> @@ -193,14 +193,14 @@ <param index="0" name="index" type="int" /> <param index="1" name="to_index" type="int" /> <description> - Moves the bus from index [code]index[/code] to index [code]to_index[/code]. + Moves the bus from index [param index] to index [param to_index]. </description> </method> <method name="remove_bus"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Removes the bus at index [code]index[/code]. + Removes the bus at index [param index]. </description> </method> <method name="remove_bus_effect"> @@ -208,7 +208,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="effect_idx" type="int" /> <description> - Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code]. + Removes the effect at index [param effect_idx] from the bus at index [param bus_idx]. </description> </method> <method name="set_bus_bypass_effects"> @@ -216,7 +216,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="enable" type="bool" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. + If [code]true[/code], the bus at index [param bus_idx] is bypassing effects. </description> </method> <method name="set_bus_effect_enabled"> @@ -225,7 +225,7 @@ <param index="1" name="effect_idx" type="int" /> <param index="2" name="enabled" type="bool" /> <description> - If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. + If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled. </description> </method> <method name="set_bus_layout"> @@ -240,7 +240,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="enable" type="bool" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. + If [code]true[/code], the bus at index [param bus_idx] is muted. </description> </method> <method name="set_bus_name"> @@ -248,7 +248,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="name" type="String" /> <description> - Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code]. + Sets the name of the bus at index [param bus_idx] to [param name]. </description> </method> <method name="set_bus_send"> @@ -256,7 +256,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="send" type="StringName" /> <description> - Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code]. + Connects the output of the bus at [param bus_idx] to the bus named [param send]. </description> </method> <method name="set_bus_solo"> @@ -264,7 +264,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="enable" type="bool" /> <description> - If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. + If [code]true[/code], the bus at index [param bus_idx] is in solo mode. </description> </method> <method name="set_bus_volume_db"> @@ -272,7 +272,7 @@ <param index="0" name="bus_idx" type="int" /> <param index="1" name="volume_db" type="float" /> <description> - Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code]. + Sets the volume of the bus at index [param bus_idx] to [param volume_db]. </description> </method> <method name="set_enable_tagging_used_audio_streams"> @@ -287,7 +287,7 @@ <param index="1" name="effect_idx" type="int" /> <param index="2" name="by_effect_idx" type="int" /> <description> - Swaps the position of two effects in bus [code]bus_idx[/code]. + Swaps the position of two effects in bus [param bus_idx]. </description> </method> <method name="unlock"> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index 8bc8e61869..1c02dbd3ce 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -15,7 +15,7 @@ <return type="bool" /> <param index="0" name="amount" type="int" /> <description> - Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise. + Returns [code]true[/code] if a buffer of the size [param amount] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise. </description> </method> <method name="clear_buffer"> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 29dbb1c1c9..06e183f4e2 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -32,7 +32,7 @@ <return type="void" /> <param index="0" name="from_position" type="float" default="0.0" /> <description> - Plays the audio from the given [code]from_position[/code], in seconds. + Plays the audio from the given [param from_position], in seconds. </description> </method> <method name="seek"> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index ee71651b42..ae86fd0e66 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -29,7 +29,7 @@ <return type="void" /> <param index="0" name="from_position" type="float" default="0.0" /> <description> - Plays the audio from the given position [code]from_position[/code], in seconds. + Plays the audio from the given position [param from_position], in seconds. </description> </method> <method name="seek"> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 0219562eca..02192a9b7c 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -29,7 +29,7 @@ <return type="void" /> <param index="0" name="from_position" type="float" default="0.0" /> <description> - Plays the audio from the given position [code]from_position[/code], in seconds. + Plays the audio from the given position [param from_position], in seconds. </description> </method> <method name="seek"> diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml index 1055fe053e..9f057dfa45 100644 --- a/doc/classes/AudioStreamWAV.xml +++ b/doc/classes/AudioStreamWAV.xml @@ -14,8 +14,8 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Saves the AudioStreamWAV as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved. - [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing. + Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM format can't be saved. + [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing. </description> </method> </methods> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 0d934f861d..629675132a 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -98,7 +98,7 @@ <signal name="toggled"> <param index="0" name="button_pressed" type="bool" /> <description> - Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument. + Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [param button_pressed] argument. </description> </signal> </signals> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 93818e6cfc..fcdf59e36e 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -52,7 +52,7 @@ <param index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" /> <param index="1" name="texture" type="Texture2D" /> <description> - Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots. + Sets the texture for the slot specified by [param param]. See [enum TextureParam] for available slots. </description> </method> </methods> @@ -398,6 +398,7 @@ </member> <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0"> A lower number blends the texture more softly while a higher number blends the texture more sharply. + [b]Note:[/b] [member uv1_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh. </member> <member name="uv1_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar]. @@ -413,6 +414,7 @@ </member> <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0"> A lower number blends the texture more softly while a higher number blends the texture more sharply. + [b]Note:[/b] [member uv2_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh. </member> <member name="uv2_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated in world space rather than object local space. See also [member uv2_triplanar]. @@ -496,10 +498,10 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera. </constant> <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter"> - The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. + The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> - The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. + The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. </constant> <constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter"> Represents the size of the [enum TextureFilter] enum. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 36242a4402..d62f704528 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -37,7 +37,7 @@ <param index="0" name="axis" type="Vector3" /> <param index="1" name="angle" type="float" /> <description> - Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]angle[/code] (in radians). The axis must be a normalized vector. + Constructs a pure rotation basis matrix, rotated around the given [param axis] by [param angle] (in radians). The axis must be a normalized vector. </description> </constructor> <constructor name="Basis"> @@ -87,12 +87,6 @@ Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. </description> </method> - <method name="get_orthogonal_index" qualifiers="const"> - <return type="int" /> - <description> - This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code. - </description> - </method> <method name="get_rotation_quaternion" qualifiers="const"> <return type="Quaternion" /> <description> @@ -115,7 +109,7 @@ <return type="bool" /> <param index="0" name="b" type="Basis" /> <description> - Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. + Returns [code]true[/code] if this basis and [param b] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="looking_at" qualifiers="static"> @@ -123,8 +117,8 @@ <param index="0" name="target" type="Vector3" /> <param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Creates a Basis with a rotation such that the forward axis (-Z) points towards the [code]target[/code] position. - The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [code]target[/code] and [code]up[/code] vectors cannot be zero, and cannot be parallel to each other. + Creates a Basis with a rotation such that the forward axis (-Z) points towards the [param target] position. + The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [param target] and [param up] vectors cannot be zero, and cannot be parallel to each other. </description> </method> <method name="orthonormalized" qualifiers="const"> @@ -138,7 +132,7 @@ <param index="0" name="axis" type="Vector3" /> <param index="1" name="angle" type="float" /> <description> - Introduce an additional rotation around the given axis by [code]angle[/code] (in radians). The axis must be a normalized vector. + Introduce an additional rotation around the given axis by [param angle] (in radians). The axis must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 402fc18373..9323642274 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -27,7 +27,7 @@ <param index="0" name="image" type="Image" /> <param index="1" name="threshold" type="float" default="0.1" /> <description> - Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and [code]true[/code] in other case. + Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [param threshold] or less, and [code]true[/code] in other case. </description> </method> <method name="get_bit" qualifiers="const"> @@ -46,7 +46,7 @@ <method name="get_true_bit_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of bitmap elements that are set to [code]true[/code]. + Returns the number of bitmap elements that are set to [code]true[/code]. </description> </method> <method name="grow_mask"> @@ -54,11 +54,11 @@ <param index="0" name="pixels" type="int" /> <param index="1" name="rect" type="Rect2" /> <description> - Applies morphological dilation or erosion to the bitmap. If [code]pixels[/code] is positive, dilation is applied to the bitmap. If [code]pixels[/code] is negative, erosion is applied to the bitmap. [code]rect[/code] defines the area where the morphological operation is applied. Pixels located outside the [code]rect[/code] are unaffected by [method grow_mask]. + Applies morphological dilation or erosion to the bitmap. If [param pixels] is positive, dilation is applied to the bitmap. If [param pixels] is negative, erosion is applied to the bitmap. [param rect] defines the area where the morphological operation is applied. Pixels located outside the [param rect] are unaffected by [method grow_mask]. </description> </method> <method name="opaque_to_polygons" qualifiers="const"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="rect" type="Rect2" /> <param index="1" name="epsilon" type="float" default="2.0" /> <description> @@ -67,14 +67,14 @@ [codeblock] Rect2(Vector2(), get_size()) [/codeblock] - [code]epsilon[/code] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [code]epsilon[/code] corresponds to more points in the polygons. + [param epsilon] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [param epsilon] corresponds to more points in the polygons. </description> </method> <method name="resize"> <return type="void" /> <param index="0" name="new_size" type="Vector2" /> <description> - Resizes the image to [code]new_size[/code]. + Resizes the image to [param new_size]. </description> </method> <method name="set_bit"> diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml index e9142e2c4b..f7a4845b7d 100644 --- a/doc/classes/BoneMap.xml +++ b/doc/classes/BoneMap.xml @@ -14,7 +14,7 @@ <return type="StringName" /> <param index="0" name="skeleton_bone_name" type="StringName" /> <description> - Returns a profile bone name having [code]skeleton_bone_name[/code]. If not found, an empty [StringName] will be returned. + Returns a profile bone name having [param skeleton_bone_name]. If not found, an empty [StringName] will be returned. In the retargeting process, the returned bone name is the bone name of the target skeleton. </description> </method> @@ -22,7 +22,7 @@ <return type="StringName" /> <param index="0" name="profile_bone_name" type="StringName" /> <description> - Returns a skeleton bone name is mapped to [code]profile_bone_name[/code]. + Returns a skeleton bone name is mapped to [param profile_bone_name]. In the retargeting process, the returned bone name is the bone name of the source skeleton. </description> </method> @@ -31,7 +31,7 @@ <param index="0" name="profile_bone_name" type="StringName" /> <param index="1" name="skeleton_bone_name" type="StringName" /> <description> - Maps a skeleton bone name to [code]profile_bone_name[/code]. + Maps a skeleton bone name to [param profile_bone_name]. In the retargeting process, the setting bone name is the bone name of the source skeleton. </description> </method> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index d7eac40505..65ceab3e30 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -14,7 +14,7 @@ <return type="Control" /> <param index="0" name="begin" type="bool" /> <description> - Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children. + Adds a [Control] node to the box as a spacer. If [param begin] is [code]true[/code], it will insert the [Control] node in front of all other children. </description> </method> </methods> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 1cd9ca0afb..e78cdfc951 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -114,7 +114,7 @@ Icon modulate [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="2"> - The horizontal space between [Button]'s icon and text. + The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 8bedb5a1ac..277bda2836 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -11,7 +11,7 @@ </tutorials> <methods> <method name="get_buttons"> - <return type="Array" /> + <return type="BaseButton[]" /> <description> Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]). </description> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 48c1b30d8e..6838bdeb70 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -54,7 +54,7 @@ <param index="0" name="object" type="Object" /> <param index="1" name="method" type="StringName" /> <description> - Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code]. + Creates a new [Callable] for the method called [param method] in the specified [param object]. </description> </constructor> </constructors> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 71d16b5791..65fdecc3c6 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -14,7 +14,7 @@ <return type="void" /> <param index="0" name="enable_next" type="bool" default="true" /> <description> - If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any. + If this is the current camera, remove it from being current. If [param enable_next] is [code]true[/code], request to make the next camera current, if any. </description> </method> <method name="get_camera_rid" qualifiers="const"> @@ -33,11 +33,11 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. + Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [param layer_number] between 1 and 20. </description> </method> <method name="get_frustum" qualifiers="const"> - <return type="Array" /> + <return type="Plane[]" /> <description> Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. </description> @@ -81,7 +81,7 @@ <param index="0" name="screen_point" type="Vector2" /> <param index="1" name="z_depth" type="float" /> <description> - Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera. + Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [param z_depth] distance into the scene away from the camera. </description> </method> <method name="project_ray_normal" qualifiers="const"> @@ -103,7 +103,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20. + Based on [param value], enables or disables the specified layer in the [member cull_mask], given a [param layer_number] between 1 and 20. </description> </method> <method name="set_frustum"> @@ -113,7 +113,7 @@ <param index="2" name="z_near" type="float" /> <param index="3" name="z_far" type="float" /> <description> - Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. See also [member frustum_offset]. + Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [param size], an [param offset], and the [param z_near] and [param z_far] clip planes in world space units. See also [member frustum_offset]. </description> </method> <method name="set_orthogonal"> @@ -122,7 +122,7 @@ <param index="1" name="z_near" type="float" /> <param index="2" name="z_far" type="float" /> <description> - Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) + Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [param size], and the [param z_near] and [param z_far] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) </description> </method> <method name="set_perspective"> @@ -131,7 +131,7 @@ <param index="1" name="z_near" type="float" /> <param index="2" name="z_far" type="float" /> <description> - Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. + Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [param fov] (field of view) angle in degrees, and the [param z_near] and [param z_far] clip planes in world space units. </description> </method> <method name="unproject_position" qualifiers="const"> @@ -194,7 +194,7 @@ The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. </member> <member name="size" type="float" setter="set_size" getter="get_size" default="1.0"> - The camera's size measured as 1/2 the width or height. Only applicable in orthogonal and frustum modes. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. + The camera's size in meters measured as the diameter of the width or height, depending on [member keep_aspect]. Only applicable in orthogonal and frustum modes. </member> <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> The vertical (Y) offset of the camera viewport. diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml index 7ec49c7df4..d346fbde4f 100644 --- a/doc/classes/CameraServer.xml +++ b/doc/classes/CameraServer.xml @@ -15,11 +15,11 @@ <return type="void" /> <param index="0" name="feed" type="CameraFeed" /> <description> - Adds the camera [code]feed[/code] to the camera server. + Adds the camera [param feed] to the camera server. </description> </method> <method name="feeds"> - <return type="Array" /> + <return type="CameraFeed[]" /> <description> Returns an array of [CameraFeed]s. </description> @@ -28,7 +28,7 @@ <return type="CameraFeed" /> <param index="0" name="index" type="int" /> <description> - Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code]. + Returns the [CameraFeed] corresponding to the camera with the given [param index]. </description> </method> <method name="get_feed_count"> @@ -41,7 +41,7 @@ <return type="void" /> <param index="0" name="feed" type="CameraFeed" /> <description> - Removes the specified camera [code]feed[/code]. + Removes the specified camera [param feed]. </description> </method> </methods> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 391ff1efb1..fe1fe498d1 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -5,7 +5,7 @@ </brief_description> <description> Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine. - Any [CanvasItem] can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside the [method Object._notification], signal or [method _draw] virtual functions. + Any [CanvasItem] can draw. For this, [method update] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal. Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. @@ -20,7 +20,8 @@ <method name="_draw" qualifiers="virtual"> <return type="void" /> <description> - Overridable function called by the engine (if defined) to draw the canvas item. + Called when [CanvasItem] has been requested to redraw (when [method update] is called, either manually or by the engine). + Corresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification]. </description> </method> <method name="draw_animation_slice"> @@ -44,7 +45,7 @@ <param index="6" name="width" type="float" default="1.0" /> <param index="7" name="antialiased" type="bool" default="false" /> <description> - Draws a unfilled arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. See also [method draw_circle]. + Draws a unfilled arc between the given angles. The larger the value of [param point_count], the smoother the curve. See also [method draw_circle]. </description> </method> <method name="draw_char" qualifiers="const"> @@ -86,7 +87,7 @@ <param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> <param index="3" name="texture" type="Texture2D" default="null" /> <description> - Draws a colored polygon of any amount of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon. + Draws a colored polygon of any number of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon. </description> </method> <method name="draw_dashed_line"> @@ -137,8 +138,8 @@ <param index="5" name="pixel_range" type="float" default="4.0" /> <description> Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. - If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius. - Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation. + If [param outline] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [param outline] radius. + Value of the [param pixel_range] should the same that was used during distance field texture generation. </description> </method> <method name="draw_multiline"> @@ -147,7 +148,7 @@ <param index="1" name="color" type="Color" /> <param index="2" name="width" type="float" default="1.0" /> <description> - Draws multiple disconnected lines with a uniform [code]color[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. + Draws multiple disconnected lines with a uniform [param color]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. </description> </method> <method name="draw_multiline_colors"> @@ -156,7 +157,7 @@ <param index="1" name="colors" type="PackedColorArray" /> <param index="2" name="width" type="float" default="1.0" /> <description> - Draws multiple disconnected lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. + Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Colors assigned to line segments match by index between [param points] and [param colors]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. </description> </method> <method name="draw_multiline_string" qualifiers="const"> @@ -174,7 +175,7 @@ <param index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Breaks [param text] into lines and draws it using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> </method> <method name="draw_multiline_string_outline" qualifiers="const"> @@ -193,7 +194,7 @@ <param index="11" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Breaks [code]text[/code] to the lines and draws text outline using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Breaks [param text] to the lines and draws text outline using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> </method> <method name="draw_multimesh"> @@ -211,7 +212,7 @@ <param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> <param index="3" name="texture" type="Texture2D" default="null" /> <description> - Draws a solid polygon of any amount of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. + Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. </description> </method> <method name="draw_polyline"> @@ -221,7 +222,7 @@ <param index="2" name="width" type="float" default="1.0" /> <param index="3" name="antialiased" type="bool" default="false" /> <description> - Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code] and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon]. + Draws interconnected line segments with a uniform [param color] and [param width] and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon]. </description> </method> <method name="draw_polyline_colors"> @@ -231,7 +232,7 @@ <param index="2" name="width" type="float" default="1.0" /> <param index="3" name="antialiased" type="bool" default="false" /> <description> - Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon]. + Draws interconnected line segments with a uniform [param width] and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between [param points] and [param colors]. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon]. </description> </method> <method name="draw_primitive"> @@ -252,8 +253,8 @@ <param index="2" name="filled" type="bool" default="true" /> <param index="3" name="width" type="float" default="1.0" /> <description> - Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified. - [b]Note:[/b] [code]width[/code] is only effective if [code]filled[/code] is [code]false[/code]. + Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. + [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code]. </description> </method> <method name="draw_set_transform"> @@ -285,7 +286,7 @@ <param index="8" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Draws [param text] using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] [codeblocks] [gdscript] @@ -322,7 +323,7 @@ <param index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Draws [code]text[/code] outline using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + Draws [param text] outline using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> </method> <method name="draw_style_box"> @@ -350,7 +351,7 @@ <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <param index="4" name="transpose" type="bool" default="false" /> <description> - Draws a textured rectangle at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. + Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. </description> </method> <method name="draw_texture_rect_region"> @@ -362,7 +363,7 @@ <param index="4" name="transpose" type="bool" default="false" /> <param index="5" name="clip_uv" type="bool" default="true" /> <description> - Draws a textured rectangle region at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. + Draws a textured rectangle region at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. </description> </method> <method name="force_update_transform"> @@ -465,35 +466,35 @@ <method name="is_visible_in_tree" qualifiers="const"> <return type="bool" /> <description> - 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. + 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, and is consequently not drawn (see [method _draw]). </description> </method> <method name="make_canvas_position_local" qualifiers="const"> <return type="Vector2" /> <param index="0" name="screen_point" type="Vector2" /> <description> - Assigns [code]screen_point[/code] as this node's new local transform. + Assigns [param screen_point] as this node's new local transform. </description> </method> <method name="make_input_local" qualifiers="const"> <return type="InputEvent" /> <param index="0" name="event" type="InputEvent" /> <description> - Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space. + Transformations issued by [param event]'s inputs are applied in local space instead of global space. </description> </method> <method name="set_notify_local_transform"> <return type="void" /> <param index="0" name="enable" type="bool" /> <description> - If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes. + If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes. </description> </method> <method name="set_notify_transform"> <return type="void" /> <param index="0" name="enable" type="bool" /> <description> - If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. + If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. </description> </method> <method name="show"> @@ -505,7 +506,7 @@ <method name="update"> <return type="void" /> <description> - Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw. + Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. This only occurs [b]once[/b] per frame, even if this method has been called multiple times. </description> </method> </methods> @@ -547,7 +548,8 @@ <signals> <signal name="draw"> <description> - Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing. + Emitted when the [CanvasItem] must redraw, [i]after[/i] the related [constant NOTIFICATION_DRAW] notification, and [i]before[/i] [method _draw] is called. + [b]Note:[/b] Deferred connections do not allow drawing through the [code]draw_*[/code] methods. </description> </signal> <signal name="hidden"> @@ -574,7 +576,7 @@ The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform]. </constant> <constant name="NOTIFICATION_DRAW" value="30"> - The [CanvasItem] is requested to draw. + The [CanvasItem] is requested to draw (see [method _draw]). </constant> <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31"> The [CanvasItem]'s visibility has changed. @@ -601,11 +603,11 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. </constant> <constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter"> - The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. + The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate. </constant> <constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter"> - The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. + The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate. </constant> <constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter"> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index ff2c3a8855..555137ac45 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -35,11 +35,11 @@ <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead. </member> - <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false"> + <member name="follow_viewport_enabled" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false"> Sets the layer to follow the viewport in order to simulate a pseudo 3D effect. </member> <member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0"> - Scales the layer when using [member follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. + Scales the layer when using [member follow_viewport_enabled]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. </member> <member name="layer" type="int" setter="set_layer" getter="get_layer" default="1"> Layer index for draw order. Lower values are drawn first. diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 4a95e18575..2d169904f7 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -19,7 +19,7 @@ <return type="float" /> <param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" /> <description> - Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_floor_normal" qualifiers="const"> @@ -140,12 +140,6 @@ </method> </methods> <members> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08"> - Extra margin used for collision recovery when calling [method move_and_slide]. - If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. - A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. - A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. - </member> <member name="floor_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true"> If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. </member> @@ -170,15 +164,21 @@ <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0"> Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes. </member> - <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody2D.MovingPlatformApplyVelocityOnLeave" default="0"> - Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior. - </member> - <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295"> + <member name="platform_floor_layers" type="int" setter="set_platform_floor_layers" getter="get_platform_floor_layers" default="4294967295"> Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity. </member> - <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0"> + <member name="platform_on_leave" type="int" setter="set_platform_on_leave" getter="get_platform_on_leave" enum="CharacterBody2D.PlatformOnLeave" default="0"> + Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior. + </member> + <member name="platform_wall_layers" type="int" setter="set_platform_wall_layers" getter="get_platform_wall_layers" default="0"> Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored. </member> + <member name="safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08"> + Extra margin used for collision recovery when calling [method move_and_slide]. + If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + </member> <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. </member> @@ -199,13 +199,13 @@ <constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode"> Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_ADD_VELOCITY" value="0" enum="PlatformOnLeave"> Add the last platform velocity to the [member velocity] when you leave a moving platform. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY" value="1" enum="PlatformOnLeave"> Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_DO_NOTHING" value="2" enum="PlatformOnLeave"> Do nothing when leaving a platform. </constant> </constants> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 73f4e1c82e..cbcd6b3af7 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -20,7 +20,7 @@ <return type="float" /> <param index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_floor_normal" qualifiers="const"> @@ -125,12 +125,6 @@ </method> </methods> <members> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001"> - Extra margin used for collision recovery when calling [method move_and_slide]. - If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. - A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. - A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. - </member> <member name="floor_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true"> If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. </member> @@ -155,15 +149,21 @@ <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody3D.MotionMode" default="0"> Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes. </member> - <member name="moving_platform_apply_velocity_on_leave" type="int" setter="set_moving_platform_apply_velocity_on_leave" getter="get_moving_platform_apply_velocity_on_leave" enum="CharacterBody3D.MovingPlatformApplyVelocityOnLeave" default="0"> - Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior. - </member> - <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295"> + <member name="platform_floor_layers" type="int" setter="set_platform_floor_layers" getter="get_platform_floor_layers" default="4294967295"> Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity. </member> - <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0"> + <member name="platform_on_leave" type="int" setter="set_platform_on_leave" getter="get_platform_on_leave" enum="CharacterBody3D.PlatformOnLeave" default="0"> + Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior. + </member> + <member name="platform_wall_layers" type="int" setter="set_platform_wall_layers" getter="get_platform_wall_layers" default="0"> Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored. </member> + <member name="safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001"> + Extra margin used for collision recovery when calling [method move_and_slide]. + If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + </member> <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. </member> @@ -184,13 +184,13 @@ <constant name="MOTION_MODE_FLOATING" value="1" enum="MotionMode"> Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_ALWAYS" value="0" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_ADD_VELOCITY" value="0" enum="PlatformOnLeave"> Add the last platform velocity to the [member velocity] when you leave a moving platform. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY" value="1" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY" value="1" enum="PlatformOnLeave"> Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. </constant> - <constant name="PLATFORM_VEL_ON_LEAVE_NEVER" value="2" enum="MovingPlatformApplyVelocityOnLeave"> + <constant name="PLATFORM_ON_LEAVE_DO_NOTHING" value="2" enum="PlatformOnLeave"> Do nothing when leaving a platform. </constant> </constants> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 6483faf763..d39b75ae52 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -39,7 +39,7 @@ The vertical offset used when rendering the check icons (in pixels). </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="4"> - The separation between the check icon and the text (in pixels). + The separation between the check icon and the text (in pixels). Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 51b0411f4e..f49da69926 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -39,7 +39,7 @@ The vertical offset used when rendering the toggle icons (in pixels). </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="4"> - The separation between the toggle icon and the text (in pixels). + The separation between the toggle icon and the text (in pixels). Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 151b34c430..58a536406f 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -13,14 +13,14 @@ <return type="bool" /> <param index="0" name="class" type="StringName" /> <description> - Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case. + Returns [code]true[/code] if you can instance objects from the specified [param class], [code]false[/code] in other case. </description> </method> <method name="class_exists" qualifiers="const"> <return type="bool" /> <param index="0" name="class" type="StringName" /> <description> - Returns whether the specified [code]class[/code] is available or not. + Returns whether the specified [param class] is available or not. </description> </method> <method name="class_get_enum_constants" qualifiers="const"> @@ -29,7 +29,7 @@ <param index="1" name="enum" type="StringName" /> <param index="2" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with all the keys in [code]enum[/code] of [code]class[/code] or its ancestry. + Returns an array with all the keys in [param enum] of [param class] or its ancestry. </description> </method> <method name="class_get_enum_list" qualifiers="const"> @@ -37,7 +37,7 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with all the enums of [code]class[/code] or its ancestry. + Returns an array with all the enums of [param class] or its ancestry. </description> </method> <method name="class_get_integer_constant" qualifiers="const"> @@ -45,7 +45,7 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="name" type="StringName" /> <description> - Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. + Returns the value of the integer constant [param name] of [param class] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> <method name="class_get_integer_constant_enum" qualifiers="const"> @@ -54,7 +54,7 @@ <param index="1" name="name" type="StringName" /> <param index="2" name="no_inheritance" type="bool" default="false" /> <description> - Returns which enum the integer constant [code]name[/code] of [code]class[/code] or its ancestry belongs to. + Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to. </description> </method> <method name="class_get_integer_constant_list" qualifiers="const"> @@ -62,15 +62,15 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with the names all the integer constants of [code]class[/code] or its ancestry. + Returns an array with the names all the integer constants of [param class] or its ancestry. </description> </method> <method name="class_get_method_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="class" type="StringName" /> <param index="1" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. + Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. [b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names. </description> </method> @@ -79,15 +79,15 @@ <param index="0" name="object" type="Object" /> <param index="1" name="property" type="StringName" /> <description> - Returns the value of [code]property[/code] of [code]class[/code] or its ancestry. + Returns the value of [param property] of [param object] or its ancestry. </description> </method> <method name="class_get_property_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="class" type="StringName" /> <param index="1" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with all the properties of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. + Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. </description> </method> <method name="class_get_signal" qualifiers="const"> @@ -95,15 +95,15 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="signal" type="StringName" /> <description> - Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. + Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. </description> </method> <method name="class_get_signal_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="class" type="StringName" /> <param index="1" name="no_inheritance" type="bool" default="false" /> <description> - Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. + Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. </description> </method> <method name="class_has_enum" qualifiers="const"> @@ -112,7 +112,7 @@ <param index="1" name="name" type="StringName" /> <param index="2" name="no_inheritance" type="bool" default="false" /> <description> - Returns whether [code]class[/code] or its ancestry has an enum called [code]name[/code] or not. + Returns whether [param class] or its ancestry has an enum called [param name] or not. </description> </method> <method name="class_has_integer_constant" qualifiers="const"> @@ -120,7 +120,7 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="name" type="StringName" /> <description> - Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not. + Returns whether [param class] or its ancestry has an integer constant called [param name] or not. </description> </method> <method name="class_has_method" qualifiers="const"> @@ -129,7 +129,7 @@ <param index="1" name="method" type="StringName" /> <param index="2" name="no_inheritance" type="bool" default="false" /> <description> - Returns whether [code]class[/code] (or its ancestry if [code]no_inheritance[/code] is [code]false[/code]) has a method called [code]method[/code] or not. + Returns whether [param class] (or its ancestry if [param no_inheritance] is [code]false[/code]) has a method called [param method] or not. </description> </method> <method name="class_has_signal" qualifiers="const"> @@ -137,7 +137,7 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="signal" type="StringName" /> <description> - Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not. + Returns whether [param class] or its ancestry has a signal called [param signal] or not. </description> </method> <method name="class_set_property" qualifiers="const"> @@ -146,7 +146,7 @@ <param index="1" name="property" type="StringName" /> <param index="2" name="value" type="Variant" /> <description> - Sets [code]property[/code] value of [code]class[/code] to [code]value[/code]. + Sets [param property] value of [param object] to [param value]. </description> </method> <method name="get_class_list" qualifiers="const"> @@ -159,28 +159,28 @@ <return type="PackedStringArray" /> <param index="0" name="class" type="StringName" /> <description> - Returns the names of all the classes that directly or indirectly inherit from [code]class[/code]. + Returns the names of all the classes that directly or indirectly inherit from [param class]. </description> </method> <method name="get_parent_class" qualifiers="const"> <return type="StringName" /> <param index="0" name="class" type="StringName" /> <description> - Returns the parent class of [code]class[/code]. + Returns the parent class of [param class]. </description> </method> <method name="instantiate" qualifiers="const"> <return type="Variant" /> <param index="0" name="class" type="StringName" /> <description> - Creates an instance of [code]class[/code]. + Creates an instance of [param class]. </description> </method> <method name="is_class_enabled" qualifiers="const"> <return type="bool" /> <param index="0" name="class" type="StringName" /> <description> - Returns whether this [code]class[/code] is enabled or not. + Returns whether this [param class] is enabled or not. </description> </method> <method name="is_parent_class" qualifiers="const"> @@ -188,7 +188,7 @@ <param index="0" name="class" type="StringName" /> <param index="1" name="inherits" type="StringName" /> <description> - Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not. + Returns whether [param inherits] is an ancestor of [param class] or not. </description> </method> </methods> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index d9f8e17145..ca482a39e0 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -14,22 +14,22 @@ <return type="void" /> <param index="0" name="replace" type="bool" /> <description> - Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. + Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced. </description> </method> <method name="_filter_code_completion_candidates" qualifiers="virtual const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="candidates" type="Dictionary[]" /> <description> - Override this method to define what items in [code]candidates[/code] should be displayed. - Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. + Override this method to define what items in [param candidates] should be displayed. + Both [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. </description> </method> <method name="_request_code_completion" qualifiers="virtual"> <return type="void" /> <param index="0" name="force" type="bool" /> <description> - Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed. + Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed. </description> </method> <method name="add_auto_brace_completion_pair"> @@ -123,7 +123,7 @@ <return type="void" /> <param index="0" name="replace" type="bool" default="false" /> <description> - Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. + Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather then merged. </description> </method> <method name="do_indent"> @@ -155,17 +155,17 @@ <return type="String" /> <param index="0" name="open_key" type="String" /> <description> - Gets the matching auto brace close key for [code]open_key[/code]. + Gets the matching auto brace close key for [param open_key]. </description> </method> <method name="get_bookmarked_lines" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <description> Gets all bookmarked lines. </description> </method> <method name="get_breakpointed_lines" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <description> Gets all breakpointed lines. </description> @@ -174,7 +174,7 @@ <return type="Dictionary" /> <param index="0" name="index" type="int" /> <description> - Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values: + Gets the completion option at [param index]. The return [Dictionary] has the following key-values: [code]kind[/code]: [enum CodeCompletionKind] [code]display_text[/code]: Text that is shown on the autocomplete menu. [code]insert_text[/code]: Text that is to be inserted when this item is selected. @@ -207,7 +207,7 @@ <param index="0" name="line" type="int" /> <param index="1" name="column" type="int" /> <description> - If [code]line[/code] [code]column[/code] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code]. + If [param line] [param column] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code]. </description> </method> <method name="get_delimiter_start_key" qualifiers="const"> @@ -222,11 +222,11 @@ <param index="0" name="line" type="int" /> <param index="1" name="column" type="int" /> <description> - If [code]line[/code] [code]column[/code] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code]. + If [param line] [param column] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code]. </description> </method> <method name="get_executing_lines" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <description> Gets all executing lines. </description> @@ -253,28 +253,28 @@ <return type="bool" /> <param index="0" name="close_key" type="String" /> <description> - Returns [code]true[/code] if close key [code]close_key[/code] exists. + Returns [code]true[/code] if close key [param close_key] exists. </description> </method> <method name="has_auto_brace_completion_open_key" qualifiers="const"> <return type="bool" /> <param index="0" name="open_key" type="String" /> <description> - Returns [code]true[/code] if open key [code]open_key[/code] exists. + Returns [code]true[/code] if open key [param open_key] exists. </description> </method> <method name="has_comment_delimiter" qualifiers="const"> <return type="bool" /> <param index="0" name="start_key" type="String" /> <description> - Returns [code]true[/code] if comment [code]start_key[/code] exists. + Returns [code]true[/code] if comment [param start_key] exists. </description> </method> <method name="has_string_delimiter" qualifiers="const"> <return type="bool" /> <param index="0" name="start_key" type="String" /> <description> - Returns [code]true[/code] if string [code]start_key[/code] exists. + Returns [code]true[/code] if string [param start_key] exists. </description> </method> <method name="indent_lines"> @@ -288,7 +288,7 @@ <param index="0" name="line" type="int" /> <param index="1" name="column" type="int" default="-1" /> <description> - Returns delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. + Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise [code]-1[/code]. </description> </method> <method name="is_in_string" qualifiers="const"> @@ -296,7 +296,7 @@ <param index="0" name="line" type="int" /> <param index="1" name="column" type="int" default="-1" /> <description> - Returns the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. + Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise [code]-1[/code]. </description> </method> <method name="is_line_bookmarked" qualifiers="const"> @@ -331,21 +331,21 @@ <return type="void" /> <param index="0" name="start_key" type="String" /> <description> - Removes the comment delimiter with [code]start_key[/code]. + Removes the comment delimiter with [param start_key]. </description> </method> <method name="remove_string_delimiter"> <return type="void" /> <param index="0" name="start_key" type="String" /> <description> - Removes the string delimiter with [code]start_key[/code]. + Removes the string delimiter with [param start_key]. </description> </method> <method name="request_code_completion"> <return type="void" /> <param index="0" name="force" type="bool" default="false" /> <description> - Emits [signal code_completion_requested], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. + Emits [signal code_completion_requested], if [param force] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. </description> </method> <method name="set_code_completion_selected_index"> @@ -430,7 +430,7 @@ <return type="void" /> <param index="0" name="force" type="bool" /> <description> - Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code]. + Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [param force] is [code]true[/code]. [b]Note:[/b] This will replace all current candidates. </description> </method> @@ -482,7 +482,7 @@ Prefixes to trigger an automatic indent. </member> <member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4"> - Size of tabs, if [code]indent_use_spaces[/code] is enabled the amount of spaces to use. + Size of tabs, if [code]indent_use_spaces[/code] is enabled the number of spaces to use. </member> <member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false"> Use spaces instead of tabs for indentation. diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 31858bf080..67d5a667e8 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -16,7 +16,7 @@ <param index="1" name="event" type="InputEvent" /> <param index="2" name="shape_idx" type="int" /> <description> - Accepts unhandled [InputEvent]s. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events. + Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events. [b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </method> @@ -31,14 +31,14 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> @@ -51,11 +51,11 @@ <return type="float" /> <param index="0" name="owner_id" type="int" /> <description> - Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code]. + Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id]. </description> </method> <method name="get_shape_owners"> - <return type="Array" /> + <return type="PackedInt32Array" /> <description> Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> @@ -86,7 +86,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. </description> </method> <method name="set_collision_mask_value"> @@ -94,7 +94,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> @@ -177,7 +177,7 @@ <param index="0" name="owner_id" type="int" /> <param index="1" name="enable" type="bool" /> <description> - If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. + If [param enable] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. </description> </method> <method name="shape_owner_set_one_way_collision_margin"> @@ -185,7 +185,7 @@ <param index="0" name="owner_id" type="int" /> <param index="1" name="margin" type="float" /> <description> - Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels. + Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id] to [param margin] pixels. </description> </method> <method name="shape_owner_set_transform"> @@ -206,6 +206,9 @@ The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> + <member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0"> + The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + </member> <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0"> Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. </member> @@ -237,13 +240,13 @@ <signal name="mouse_shape_entered"> <param index="0" name="shape_idx" type="int" /> <description> - Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [code]shape_idx[/code] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. + Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </signal> <signal name="mouse_shape_exited"> <param index="0" name="shape_idx" type="int" /> <description> - Emitted when the mouse pointer exits any of this object's shapes. [code]shape_idx[/code] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. + Emitted when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </signal> </signals> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index 1319274920..4d10a33032 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -17,7 +17,7 @@ <param index="3" name="normal" type="Vector3" /> <param index="4" name="shape_idx" type="int" /> <description> - Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. + Receives unhandled [InputEvent]s. [param position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. [b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </method> @@ -32,14 +32,14 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> @@ -49,7 +49,7 @@ </description> </method> <method name="get_shape_owners"> - <return type="Array" /> + <return type="PackedInt32Array" /> <description> Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> @@ -73,7 +73,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. </description> </method> <method name="set_collision_mask_value"> @@ -81,7 +81,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> @@ -177,6 +177,9 @@ The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> + <member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0"> + The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + </member> <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0"> Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. </member> @@ -195,7 +198,7 @@ <param index="3" name="normal" type="Vector3" /> <param index="4" name="shape_idx" type="int" /> <description> - Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. + Emitted when the object receives an unhandled [InputEvent]. [param position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. </description> </signal> <signal name="mouse_entered"> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 246e0e8663..fa8fbd0d3e 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -4,7 +4,8 @@ Node that represents collision shape data in 2D space. </brief_description> <description> - Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape. + Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape. + You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. </description> <tutorials> <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link> diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index c8423dac9e..304b46ba27 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -4,7 +4,8 @@ Node that represents collision shape data in 3D space. </brief_description> <description> - Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape. + Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape. + You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object. </description> <tutorials> <link title="Physics introduction">$DOCS_URL/tutorials/physics/physics_introduction.html</link> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 0ed623e0bc..3a3803c1da 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -57,7 +57,7 @@ <param index="0" name="code" type="String" /> <param index="1" name="alpha" type="float" /> <description> - Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. + Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0 to 1. Supported color names are the same as the constants. </description> </constructor> <constructor name="Color"> @@ -121,7 +121,7 @@ <param index="0" name="min" type="Color" default="Color(0, 0, 0, 0)" /> <param index="1" name="max" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. + Returns a new color with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="darkened" qualifiers="const"> @@ -154,7 +154,7 @@ <param index="2" name="v" type="float" /> <param index="3" name="alpha" type="float" default="1.0" /> <description> - Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1. + Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. [param h] (hue), [param s] (saturation), and [param v] (value) are typically between 0 and 1. [codeblocks] [gdscript] var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) @@ -172,7 +172,7 @@ <param index="2" name="l" type="float" /> <param index="3" name="alpha" type="float" default="1.0" /> <description> - Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [code]h[/code] (hue), [code]s[/code] (saturation), and [code]v[/code] (value) are typically between 0 and 1. + Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. [param h] (hue), [param s] (saturation), and [param l] (lightness) are typically between 0 and 1. [codeblocks] [gdscript] var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8) @@ -237,9 +237,9 @@ <return type="Color" /> <param index="0" name="rgba" type="String" /> <description> - Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character. - [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. - If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. + Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case sensitive, and may be prefixed with a '#' character. + [param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. + If [param rgba] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor. [codeblocks] [gdscript] @@ -257,7 +257,7 @@ <return type="bool" /> <param index="0" name="color" type="String" /> <description> - Returns [code]true[/code] if [code]color[/code] is a valid HTML hexadecimal color string. [code]color[/code] is not case sensitive, and may be prefixed with a '#' character. + Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color string. [param color] is not case sensitive, and may be prefixed with a '#' character. For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value. [codeblocks] [gdscript] @@ -299,7 +299,7 @@ <return type="bool" /> <param index="0" name="to" type="Color" /> <description> - Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this color and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="lerp" qualifiers="const"> @@ -307,7 +307,7 @@ <param index="0" name="to" type="Color" /> <param index="1" name="weight" type="float" /> <description> - Returns the linear interpolation with another color. The interpolation factor [code]weight[/code] is between 0 and 1. + Returns the linear interpolation with another color. The interpolation factor [param weight] is between 0 and 1. [codeblocks] [gdscript] var c1 = Color(1.0, 0.0, 0.0) @@ -420,7 +420,7 @@ <param index="0" name="with_alpha" type="bool" default="true" /> <description> Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]). - Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). + Setting [param with_alpha] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). [codeblocks] [gdscript] var color = Color(1, 1, 1, 0.5) diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index f3c245c229..902993e439 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -7,6 +7,7 @@ 2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidDynamicBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. [b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first. + [b]Warning:[/b] Using this shape for an [Area2D] (via a [CollisionShape2D] node) may give unexpected results: the area will only detect collisions with the segments in the [ConcavePolygonShape2D] (and not with any "inside" of the shape, for example). </description> <tutorials> </tutorials> diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml index 6a54b4bda7..d22793e52c 100644 --- a/doc/classes/ConcavePolygonShape3D.xml +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -7,6 +7,7 @@ 3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. This shape is created by feeding a list of triangles. Despite its name, [ConcavePolygonShape3D] can also store convex polygon shapes. However, unlike [ConvexPolygonShape3D], [ConcavePolygonShape3D] is [i]not[/i] limited to storing convex shapes exclusively. [b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static. [b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first. + [b]Warning:[/b] Using this shape for an [Area3D] (via a [CollisionShape3D] node, created e.g. by using the [i]Create Trimesh Collision Sibling[/i] option in the [i]Mesh[/i] menu that appears when selecting a [MeshInstance3D] node) may give unexpected results: the area will only detect collisions with the triangle faces in the [ConcavePolygonShape3D] (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if [member backface_collision] is [code]true[/code]. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml index 5f2ad109f2..1cfe9d197d 100644 --- a/doc/classes/ConeTwistJoint3D.xml +++ b/doc/classes/ConeTwistJoint3D.xml @@ -36,13 +36,13 @@ <member name="softness" type="float" setter="set_param" getter="get_param" default="0.8"> The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. </member> - <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" default="45.0"> + <member name="swing_span" type="float" setter="set_param" getter="get_param" default="0.785398"> Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. Could be defined as looseness in the [ConeTwistJoint3D]. If below 0.05, this behavior is locked. </member> - <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span" default="180.0"> + <member name="twist_span" type="float" setter="set_param" getter="get_param" default="3.14159"> Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. </member> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index ecd317e064..d3ad4e6e4b 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -132,7 +132,7 @@ <param index="1" name="key" type="String" /> <param index="2" name="default" type="Variant" default="null" /> <description> - Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [code]default[/code] value. If [code]default[/code] is not specified or set to [code]null[/code], an error is also raised. + Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [param default] value. If [param default] is not specified or set to [code]null[/code], an error is also raised. </description> </method> <method name="has_section" qualifiers="const"> @@ -165,7 +165,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="key" type="PackedByteArray" /> <description> - Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -174,7 +174,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="password" type="String" /> <description> - Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -199,7 +199,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="key" type="PackedByteArray" /> <description> - Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure. + Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -208,7 +208,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="password" type="String" /> <description> - Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure. + Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index ad5dcdfc45..b7a9ae235e 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -27,7 +27,7 @@ <param index="0" name="at_position" type="Vector2" /> <param index="1" name="data" type="Variant" /> <description> - Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control. + Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control. This method should only be used to test the data. Process the data in [method _drop_data]. [codeblocks] [gdscript] @@ -52,7 +52,7 @@ <param index="0" name="at_position" type="Vector2" /> <param index="1" name="data" type="Variant" /> <description> - Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control. + Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control. [codeblocks] [gdscript] func _can_drop_data(position, data): @@ -77,7 +77,7 @@ <return type="Variant" /> <param index="0" name="at_position" type="Vector2" /> <description> - Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. + Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [param at_position] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. [codeblocks] [gdscript] @@ -145,7 +145,7 @@ <return type="bool" /> <param index="0" name="position" type="Vector2" /> <description> - Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. + Virtual method to be implemented by the user. Returns whether the given [param position] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. </description> @@ -154,7 +154,7 @@ <return type="Object" /> <param index="0" name="for_text" type="String" /> <description> - Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property. + Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [param for_text] includes the contents of the [member hint_tooltip] property. The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member hint_tooltip] for an example). [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value. @@ -196,12 +196,12 @@ </description> </method> <method name="_structured_text_parser" qualifiers="virtual const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="args" type="Array" /> <param index="1" name="text" type="String" /> <description> User defined BiDi algorithm override function. - Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately. + Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="accept_event"> @@ -215,7 +215,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="color" type="Color" /> <description> - Creates a local override for a theme [Color] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. + Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. See also [method get_theme_color]. [b]Example of overriding a label's color and resetting it later:[/b] [codeblocks] @@ -243,7 +243,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="constant" type="int" /> <description> - Creates a local override for a theme constant with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. + Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. See also [method get_theme_constant]. </description> </method> @@ -252,7 +252,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="font" type="Font" /> <description> - Creates a local override for a theme [Font] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. + Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. See also [method get_theme_font]. </description> </method> @@ -261,7 +261,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="font_size" type="int" /> <description> - Creates a local override for a theme font size with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. + Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. See also [method get_theme_font_size]. </description> </method> @@ -270,7 +270,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="texture" type="Texture2D" /> <description> - Creates a local override for a theme icon with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. + Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. See also [method get_theme_icon]. </description> </method> @@ -279,7 +279,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="stylebox" type="StyleBox" /> <description> - Creates a local override for a theme [StyleBox] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. + Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. See also [method get_theme_stylebox]. [b]Example of modifying a property in a StyleBox by duplicating it:[/b] [codeblocks] @@ -337,7 +337,7 @@ <param index="0" name="data" type="Variant" /> <param index="1" name="preview" type="Control" /> <description> - Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control. + Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [param data] and [param preview]. Drag will start even if the mouse is neither over nor pressed on this control. The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data. </description> </method> @@ -435,7 +435,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [code]name[/code] and [code]theme_type[/code]. If [code]theme_type[/code] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. + Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. If [param theme_type] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used. [codeblocks] [gdscript] @@ -462,7 +462,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -492,7 +492,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -501,7 +501,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -510,7 +510,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -519,7 +519,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -565,7 +565,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -573,7 +573,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node. See [method add_theme_color_override]. </description> </method> @@ -582,7 +582,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -590,7 +590,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme constant with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node. See [method add_theme_constant_override]. </description> </method> @@ -599,7 +599,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -607,7 +607,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node. See [method add_theme_font_override]. </description> </method> @@ -616,7 +616,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -624,7 +624,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme font size with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node. See [method add_theme_font_size_override]. </description> </method> @@ -633,7 +633,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -641,7 +641,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme icon with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node. See [method add_theme_icon_override]. </description> </method> @@ -650,7 +650,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type]. See [method get_theme_color] for details. </description> </method> @@ -658,7 +658,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [code]name[/code] in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node. See [method add_theme_stylebox_override]. </description> </method> @@ -685,42 +685,42 @@ <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme [Color] with the specified [code]name[/code] previously added by [method add_theme_color_override] or via the Inspector dock. + Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock. </description> </method> <method name="remove_theme_constant_override"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme constant with the specified [code]name[/code] previously added by [method add_theme_constant_override] or via the Inspector dock. + Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_override"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme [Font] with the specified [code]name[/code] previously added by [method add_theme_font_override] or via the Inspector dock. + Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_size_override"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme font size with the specified [code]name[/code] previously added by [method add_theme_font_size_override] or via the Inspector dock. + Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock. </description> </method> <method name="remove_theme_icon_override"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme icon with the specified [code]name[/code] previously added by [method add_theme_icon_override] or via the Inspector dock. + Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock. </description> </method> <method name="remove_theme_stylebox_override"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock. + Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock. </description> </method> <method name="reset_size"> @@ -736,9 +736,9 @@ <param index="2" name="keep_offset" type="bool" default="false" /> <param index="3" name="push_opposite_anchor" type="bool" default="true" /> <description> - Sets the anchor for the specified [enum Side] to [code]anchor[/code]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. - If [code]keep_offset[/code] is [code]true[/code], offsets aren't updated after this operation. - If [code]push_opposite_anchor[/code] is [code]true[/code] and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [code]push_opposite_anchor[/code] was [code]false[/code], the left anchor would get value 0.5. + Sets the anchor for the specified [enum Side] to [param anchor]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. + If [param keep_offset] is [code]true[/code], offsets aren't updated after this operation. + If [param push_opposite_anchor] is [code]true[/code] and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [param push_opposite_anchor] was [code]false[/code], the left anchor would get value 0.5. </description> </method> <method name="set_anchor_and_offset"> @@ -765,8 +765,8 @@ <param index="0" name="preset" type="int" enum="Control.LayoutPreset" /> <param index="1" name="keep_offsets" type="bool" default="false" /> <description> - Sets the anchors to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. - If [code]keep_offsets[/code] is [code]true[/code], control's position will also be updated. + Sets the anchors to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. + If [param keep_offsets] is [code]true[/code], control's position will also be updated. </description> </method> <method name="set_begin"> @@ -780,7 +780,7 @@ <return type="void" /> <param index="0" name="target" type="Object" /> <description> - Forwards the handling of this control's drag and drop to [code]target[/code] object. + Forwards the handling of this control's drag and drop to [param target] object. Forwarding can be implemented in the target object similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences: 1. The function name must be suffixed with [b]_fw[/b] 2. The function must take an extra argument that is the control doing the forwarding @@ -887,7 +887,7 @@ <param index="0" name="side" type="int" enum="Side" /> <param index="1" name="neighbor" type="NodePath" /> <description> - Sets the anchor for the specified [enum Side] to the [Control] at [code]neighbor[/code] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. + Sets the anchor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. </description> </method> <method name="set_global_position"> @@ -895,8 +895,8 @@ <param index="0" name="position" type="Vector2" /> <param index="1" name="keep_offsets" type="bool" default="false" /> <description> - Sets the [member global_position] to given [code]position[/code]. - If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. + Sets the [member global_position] to given [param position]. + If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="set_offset"> @@ -904,7 +904,7 @@ <param index="0" name="side" type="int" enum="Side" /> <param index="1" name="offset" type="float" /> <description> - Sets the offset for the specified [enum Side] to [code]offset[/code]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. + Sets the offset for the specified [enum Side] to [param offset]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. </description> </method> <method name="set_offsets_preset"> @@ -913,9 +913,9 @@ <param index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" /> <param index="2" name="margin" type="int" default="0" /> <description> - Sets the offsets to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. - Use parameter [code]resize_mode[/code] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code]. - Use parameter [code]margin[/code] to determine the gap between the [Control] and the edges. + Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. + Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code]. + Use parameter [param margin] to determine the gap between the [Control] and the edges. </description> </method> <method name="set_position"> @@ -923,8 +923,8 @@ <param index="0" name="position" type="Vector2" /> <param index="1" name="keep_offsets" type="bool" default="false" /> <description> - Sets the [member position] to given [code]position[/code]. - If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. + Sets the [member position] to given [param position]. + If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="set_size"> @@ -933,7 +933,7 @@ <param index="1" name="keep_offsets" type="bool" default="false" /> <description> Sets the size (see [member size]). - If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. + If [param keep_offsets] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="update_minimum_size"> @@ -946,7 +946,7 @@ <return type="void" /> <param index="0" name="position" type="Vector2" /> <description> - Moves the mouse cursor to [code]position[/code], relative to [member position] of this [Control]. + Moves the mouse cursor to [param position], relative to [member position] of this [Control]. </description> </method> </methods> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index ed5b642f90..dab2a77584 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -86,7 +86,7 @@ <param index="0" name="key" type="CryptoKey" /> <param index="1" name="ciphertext" type="PackedByteArray" /> <description> - Decrypt the given [code]ciphertext[/code] with the provided private [code]key[/code]. + Decrypt the given [param ciphertext] with the provided private [param key]. [b]Note:[/b] The maximum size of accepted ciphertext is limited by the key size. </description> </method> @@ -95,7 +95,7 @@ <param index="0" name="key" type="CryptoKey" /> <param index="1" name="plaintext" type="PackedByteArray" /> <description> - Encrypt the given [code]plaintext[/code] with the provided public [code]key[/code]. + Encrypt the given [param plaintext] with the provided public [param key]. [b]Note:[/b] The maximum size of accepted plaintext is limited by the key size. </description> </method> @@ -103,7 +103,7 @@ <return type="PackedByteArray" /> <param index="0" name="size" type="int" /> <description> - Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code]. + Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size]. </description> </method> <method name="generate_rsa"> @@ -120,7 +120,7 @@ <param index="2" name="not_before" type="String" default=""20140101000000"" /> <param index="3" name="not_after" type="String" default=""20340101000000"" /> <description> - Generates a self-signed [X509Certificate] from the given [CryptoKey] and [code]issuer_name[/code]. The certificate validity will be defined by [code]not_before[/code] and [code]not_after[/code] (first valid date and last valid date). The [code]issuer_name[/code] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). + Generates a self-signed [X509Certificate] from the given [CryptoKey] and [param issuer_name]. The certificate validity will be defined by [param not_before] and [param not_after] (first valid date and last valid date). The [param issuer_name] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). A small example to generate an RSA key and a X509 self-signed certificate. [codeblocks] [gdscript] @@ -146,7 +146,7 @@ <param index="1" name="key" type="PackedByteArray" /> <param index="2" name="msg" type="PackedByteArray" /> <description> - Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [code]msg[/code] using [code]key[/code]. The [code]hash_type[/code] parameter is the hashing algorithm that is used for the inner and outer hashes. + Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [param msg] using [param key]. The [param hash_type] parameter is the hashing algorithm that is used for the inner and outer hashes. Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported. </description> </method> @@ -156,7 +156,7 @@ <param index="1" name="hash" type="PackedByteArray" /> <param index="2" name="key" type="CryptoKey" /> <description> - Sign a given [code]hash[/code] of type [code]hash_type[/code] with the provided private [code]key[/code]. + Sign a given [param hash] of type [param hash_type] with the provided private [param key]. </description> </method> <method name="verify"> @@ -166,7 +166,7 @@ <param index="2" name="signature" type="PackedByteArray" /> <param index="3" name="key" type="CryptoKey" /> <description> - Verify that a given [code]signature[/code] for [code]hash[/code] of type [code]hash_type[/code] against the provided public [code]key[/code]. + Verify that a given [param signature] for [param hash] of type [param hash_type] against the provided public [param key]. </description> </method> </methods> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 4859e182fe..1f502846b4 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -21,8 +21,8 @@ <param index="0" name="path" type="String" /> <param index="1" name="public_only" type="bool" default="false" /> <description> - Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. - [b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + Loads a key from [param path]. If [param public_only] is [code]true[/code], only the public key will be loaded. + [b]Note:[/b] [param path] should be a "*.pub" file if [param public_only] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="load_from_string"> @@ -30,7 +30,7 @@ <param index="0" name="string_key" type="String" /> <param index="1" name="public_only" type="bool" default="false" /> <description> - Loads a key from the given [code]string[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. + Loads a key from the given [param string_key]. If [param public_only] is [code]true[/code], only the public key will be loaded. </description> </method> <method name="save"> @@ -38,15 +38,15 @@ <param index="0" name="path" type="String" /> <param index="1" name="public_only" type="bool" default="false" /> <description> - Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved. - [b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. + Saves a key to the given [param path]. If [param public_only] is [code]true[/code], only the public key will be saved. + [b]Note:[/b] [param path] should be a "*.pub" file if [param public_only] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="save_to_string"> <return type="String" /> <param index="0" name="public_only" type="bool" default="false" /> <description> - Returns a string containing the key in PEM format. If [code]public_only[/code] is [code]true[/code], only the public key will be included. + Returns a string containing the key in PEM format. If [param public_only] is [code]true[/code], only the public key will be included. </description> </method> </methods> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index ca6c92f2aa..ae9add995b 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -43,56 +43,56 @@ <return type="int" enum="Curve.TangentMode" /> <param index="0" name="index" type="int" /> <description> - Returns the left [enum TangentMode] for the point at [code]index[/code]. + Returns the left [enum TangentMode] for the point at [param index]. </description> </method> <method name="get_point_left_tangent" qualifiers="const"> <return type="float" /> <param index="0" name="index" type="int" /> <description> - Returns the left tangent angle (in degrees) for the point at [code]index[/code]. + Returns the left tangent angle (in degrees) for the point at [param index]. </description> </method> <method name="get_point_position" qualifiers="const"> <return type="Vector2" /> <param index="0" name="index" type="int" /> <description> - Returns the curve coordinates for the point at [code]index[/code]. + Returns the curve coordinates for the point at [param index]. </description> </method> <method name="get_point_right_mode" qualifiers="const"> <return type="int" enum="Curve.TangentMode" /> <param index="0" name="index" type="int" /> <description> - Returns the right [enum TangentMode] for the point at [code]index[/code]. + Returns the right [enum TangentMode] for the point at [param index]. </description> </method> <method name="get_point_right_tangent" qualifiers="const"> <return type="float" /> <param index="0" name="index" type="int" /> <description> - Returns the right tangent angle (in degrees) for the point at [code]index[/code]. + Returns the right tangent angle (in degrees) for the point at [param index]. </description> </method> <method name="interpolate" qualifiers="const"> <return type="float" /> <param index="0" name="offset" type="float" /> <description> - Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve. + Returns the Y value for the point that would exist at the X position [param offset] along the curve. </description> </method> <method name="interpolate_baked" qualifiers="const"> <return type="float" /> <param index="0" name="offset" type="float" /> <description> - Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. + Returns the Y value for the point that would exist at the X position [param offset] along the curve using the baked cache. Bakes the curve's points if not already baked. </description> </method> <method name="remove_point"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Removes the point at [code]index[/code] from the curve. + Removes the point at [param index] from the curve. </description> </method> <method name="set_point_left_mode"> @@ -100,7 +100,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="mode" type="int" enum="Curve.TangentMode" /> <description> - Sets the left [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. + Sets the left [enum TangentMode] for the point at [param index] to [param mode]. </description> </method> <method name="set_point_left_tangent"> @@ -108,7 +108,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="tangent" type="float" /> <description> - Sets the left tangent angle for the point at [code]index[/code] to [code]tangent[/code]. + Sets the left tangent angle for the point at [param index] to [param tangent]. </description> </method> <method name="set_point_offset"> @@ -124,7 +124,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="mode" type="int" enum="Curve.TangentMode" /> <description> - Sets the right [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. + Sets the right [enum TangentMode] for the point at [param index] to [param mode]. </description> </method> <method name="set_point_right_tangent"> @@ -132,7 +132,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="tangent" type="float" /> <description> - Sets the right tangent angle for the point at [code]index[/code] to [code]tangent[/code]. + Sets the right tangent angle for the point at [param index] to [param tangent]. </description> </method> <method name="set_point_value"> @@ -140,7 +140,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="y" type="float" /> <description> - Assigns the vertical position [code]y[/code] to the point at [code]index[/code]. + Assigns the vertical position [param y] to the point at [param index]. </description> </method> </methods> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 09e6e23410..f15c0d74ca 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -15,10 +15,10 @@ <param index="0" name="position" type="Vector2" /> <param index="1" name="in" type="Vector2" default="Vector2(0, 0)" /> <param index="2" name="out" type="Vector2" default="Vector2(0, 0)" /> - <param index="3" name="at_position" type="int" default="-1" /> + <param index="3" name="index" type="int" default="-1" /> <description> - Adds a point to a curve at [code]position[/code] relative to the [Curve2D]'s position, with control points [code]in[/code] and [code]out[/code]. - If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. + Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. + If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [member point_count]. </description> </method> <method name="clear_points"> @@ -43,37 +43,37 @@ <return type="float" /> <param index="0" name="to_point" type="Vector2" /> <description> - Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked]. - [code]to_point[/code] must be in this curve's local space. + Returns the closest offset to [param to_point]. This offset is meant to be used in [method interpolate_baked]. + [param to_point] must be in this curve's local space. </description> </method> <method name="get_closest_point" qualifiers="const"> <return type="Vector2" /> <param index="0" name="to_point" type="Vector2" /> <description> - Returns the closest baked point (in curve's local space) to [code]to_point[/code]. - [code]to_point[/code] must be in this curve's local space. + Returns the closest baked point (in curve's local space) to [param to_point]. + [param to_point] must be in this curve's local space. </description> </method> <method name="get_point_in" qualifiers="const"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. + Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. + Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. + Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate" qualifiers="const"> @@ -81,8 +81,8 @@ <param index="0" name="idx" type="int" /> <param index="1" name="t" type="float" /> <description> - Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. - If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code]. + Returns the position between the vertex [param idx] and the vertex [code]idx + 1[/code], where [param t] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [param t] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. + If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> @@ -90,8 +90,8 @@ <param index="0" name="offset" type="float" /> <param index="1" name="cubic" type="bool" default="false" /> <description> - Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve. - To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code]. + Returns a point within the curve at position [param offset], where [param offset] is measured as a pixel distance along the curve. + To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code]. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> @@ -99,14 +99,14 @@ <return type="Vector2" /> <param index="0" name="fofs" type="float" /> <description> - Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. + Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> <return type="void" /> <param index="0" name="idx" type="int" /> <description> - Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. + Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. </description> </method> <method name="set_point_in"> @@ -114,7 +114,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector2" /> <description> - Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_out"> @@ -122,7 +122,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector2" /> <description> - Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_position"> @@ -130,7 +130,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector2" /> <description> - Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. + Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="tessellate" qualifiers="const"> @@ -140,8 +140,8 @@ <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. </description> </method> </methods> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 7115da8543..0843453820 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -15,10 +15,10 @@ <param index="0" name="position" type="Vector3" /> <param index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)" /> <param index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)" /> - <param index="3" name="at_position" type="int" default="-1" /> + <param index="3" name="index" type="int" default="-1" /> <description> - Adds a point to a curve at [code]position[/code] relative to the [Curve3D]'s position, with control points [code]in[/code] and [code]out[/code]. - If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. + Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. + If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [member point_count]. </description> </method> <method name="clear_points"> @@ -56,44 +56,44 @@ <return type="float" /> <param index="0" name="to_point" type="Vector3" /> <description> - Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector]. - [code]to_point[/code] must be in this curve's local space. + Returns the closest offset to [param to_point]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector]. + [param to_point] must be in this curve's local space. </description> </method> <method name="get_closest_point" qualifiers="const"> <return type="Vector3" /> <param index="0" name="to_point" type="Vector3" /> <description> - Returns the closest baked point (in curve's local space) to [code]to_point[/code]. - [code]to_point[/code] must be in this curve's local space. + Returns the closest baked point (in curve's local space) to [param to_point]. + [param to_point] must be in this curve's local space. </description> </method> <method name="get_point_in" qualifiers="const"> <return type="Vector3" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. + Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> <return type="Vector3" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. + Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> <return type="Vector3" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. + Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_tilt" qualifiers="const"> <return type="float" /> <param index="0" name="idx" type="int" /> <description> - Returns the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code]. + Returns the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code]. </description> </method> <method name="interpolate" qualifiers="const"> @@ -101,8 +101,8 @@ <param index="0" name="idx" type="int" /> <param index="1" name="t" type="float" /> <description> - Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. - If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. + Returns the position between the vertex [param idx] and the vertex [code]idx + 1[/code], where [param t] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [param t] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. + If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> @@ -110,8 +110,8 @@ <param index="0" name="offset" type="float" /> <param index="1" name="cubic" type="bool" default="false" /> <description> - Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve. - To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code]. + Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. + To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code]. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> @@ -120,8 +120,8 @@ <param index="0" name="offset" type="float" /> <param index="1" name="apply_tilt" type="bool" default="false" /> <description> - Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve. - To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector. + Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. + To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector. If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code]. </description> </method> @@ -129,14 +129,14 @@ <return type="Vector3" /> <param index="0" name="fofs" type="float" /> <description> - Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. + Returns the position at the vertex [param fofs]. It calls [method interpolate] using the integer part of [param fofs] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> <return type="void" /> <param index="0" name="idx" type="int" /> <description> - Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. + Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. </description> </method> <method name="set_point_in"> @@ -144,7 +144,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector3" /> <description> - Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_out"> @@ -152,7 +152,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector3" /> <description> - Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_position"> @@ -160,7 +160,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="position" type="Vector3" /> <description> - Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. + Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_tilt"> @@ -168,7 +168,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="tilt" type="float" /> <description> - Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. + Sets the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console. The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates. </description> </method> @@ -179,8 +179,8 @@ <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. - [code]max_stages[/code] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! - [code]tolerance_degrees[/code] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. </description> </method> </methods> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 562d16fec7..9af8be99ef 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -152,14 +152,14 @@ <param index="1" name="certificate" type="X509Certificate" /> <param index="2" name="chain" type="X509Certificate" default="null" /> <description> - Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. + Setup the DTLS server to use the given [param key] and provide the given [param certificate] to clients. You can pass the optional [param chain] parameter to provide additional CA chain information along with the certificate. </description> </method> <method name="take_connection"> <return type="PacketPeerDTLS" /> <param index="0" name="udp_peer" type="PacketPeerUDP" /> <description> - Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]). + Try to initiate the DTLS handshake with the given [param udp_peer] which must be already connected (see [method PacketPeerUDP.connect_to_host]). [b]Note:[/b] You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange. </description> </method> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 68fa069618..40b5e88fff 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -207,7 +207,7 @@ <return type="Dictionary" /> <param index="0" name="deep" type="bool" default="false" /> <description> - Creates a copy of the dictionary, and returns it. The [code]deep[/code] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects. + Creates a copy of the dictionary, and returns it. The [param deep] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects. </description> </method> <method name="erase"> @@ -296,7 +296,7 @@ <param index="0" name="dictionary" type="Dictionary" /> <param index="1" name="overwrite" type="bool" default="false" /> <description> - Adds elements from [code]dictionary[/code] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [code]overwrite[/code] is [code]true[/code]. + Adds elements from [param dictionary] to this [Dictionary]. By default, duplicate keys will not be copied over, unless [param overwrite] is [code]true[/code]. </description> </method> <method name="size" qualifiers="const"> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index c3eb469934..c9a9f346a5 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -70,7 +70,7 @@ <param index="0" name="from" type="String" /> <param index="1" name="to" type="String" /> <description> - Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -188,7 +188,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). + Opens an existing directory of the filesystem. The [param path] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> @@ -206,7 +206,7 @@ <param index="0" name="from" type="String" /> <param index="1" name="to" type="String" /> <description> - Renames (move) the [code]from[/code] file or directory to the [code]to[/code] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. + Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index e642bc7b73..bcad75215a 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -105,7 +105,7 @@ </description> </method> <method name="get_display_cutouts" qualifiers="const"> - <return type="Array" /> + <return type="Rect2[]" /> <description> Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area]. [b]Note:[/b] Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. @@ -144,7 +144,7 @@ </description> </method> <method name="global_menu_add_check_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> @@ -152,17 +152,18 @@ <param index="4" name="accelerator" type="int" enum="Key" default="0" /> <param index="5" name="index" type="int" default="-1" /> <description> - Adds a new checkable item with text [code]label[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new checkable item with text [param label] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_icon_check_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> @@ -171,17 +172,18 @@ <param index="5" name="accelerator" type="int" enum="Key" default="0" /> <param index="6" name="index" type="int" default="-1" /> <description> - Adds a new checkable item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_icon_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> @@ -190,17 +192,18 @@ <param index="5" name="accelerator" type="int" enum="Key" default="0" /> <param index="6" name="index" type="int" default="-1" /> <description> - Adds a new item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_icon_radio_check_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="icon" type="Texture2D" /> <param index="2" name="label" type="String" /> @@ -209,18 +212,19 @@ <param index="5" name="accelerator" type="int" enum="Key" default="0" /> <param index="6" name="index" type="int" default="-1" /> <description> - Adds a new radio-checkable item with text [code]label[/code] and icon [code]icon[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> @@ -228,17 +232,18 @@ <param index="4" name="accelerator" type="int" enum="Key" default="0" /> <param index="5" name="index" type="int" default="-1" /> <description> - Adds a new item with text [code]label[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new item with text [param label] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_multistate_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="labe" type="String" /> <param index="2" name="max_states" type="int" /> @@ -248,18 +253,20 @@ <param index="6" name="accelerator" type="int" enum="Key" default="0" /> <param index="7" name="index" type="int" default="-1" /> <description> - Adds a new item with text [code]label[/code] to the global menu with ID [code]menu_root[/code]. - Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code]. + Adds a new item with text [param labe] to the global menu with ID [param menu_root]. + Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + [b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_radio_check_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="callback" type="Callable" /> @@ -267,42 +274,45 @@ <param index="4" name="accelerator" type="int" enum="Key" default="0" /> <param index="5" name="index" type="int" default="-1" /> <description> - Adds a new radio-checkable item with text [code]label[/code] to the global menu with ID [code]menu_root[/code]. + Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root]. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_separator"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="index" type="int" default="-1" /> <description> - Adds a separator between items to the global menu with ID [code]menu_root[/code]. Separators also occupy an index. + Adds a separator between items to the global menu with ID [param menu_root]. Separators also occupy an index. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> </method> <method name="global_menu_add_submenu_item"> - <return type="void" /> + <return type="int" /> <param index="0" name="menu_root" type="String" /> <param index="1" name="label" type="String" /> <param index="2" name="submenu" type="String" /> <param index="3" name="index" type="int" default="-1" /> <description> - Adds an item that will act as a submenu of the global menu [code]menu_root[/code]. The [code]submenu[/code] argument is the ID of the global menu root that will be shown when the item is clicked. + Adds an item that will act as a submenu of the global menu [param menu_root]. The [param submenu] argument is the ID of the global menu root that will be shown when the item is clicked. + Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> @@ -311,11 +321,11 @@ <return type="void" /> <param index="0" name="menu_root" type="String" /> <description> - Removes all items from the global menu with ID [code]menu_root[/code]. + Removes all items from the global menu with ID [param menu_root]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] - "" - Main menu (macOS). + "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). [/codeblock] </description> @@ -325,7 +335,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -334,7 +344,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the callback of the item at index [code]idx[/code]. + Returns the callback of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -343,7 +353,16 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the icon of the item at index [code]idx[/code]. + Returns the icon of the item at index [param idx]. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> + <method name="global_menu_get_item_indentation_level" qualifiers="const"> + <return type="int" /> + <param index="0" name="menu_root" type="String" /> + <param index="1" name="idx" type="int" /> + <description> + Returns the horizontal offset of the item at the given [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -352,7 +371,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="tag" type="Variant" /> <description> - Returns the index of the item with the specified [code]tag[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually. + Returns the index of the item with the specified [param tag]. Index is automatically assigned to each item by the engine. Index can not be set manually. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -361,7 +380,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="text" type="String" /> <description> - Returns the index of the item with the specified [code]text[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually. + Returns the index of the item with the specified [param text]. Index is automatically assigned to each item by the engine. Index can not be set manually. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -388,7 +407,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the submenu ID of the item at index [code]idx[/code]. See [method global_menu_add_submenu_item] for more info on how to add a submenu. + Returns the submenu ID of the item at index [param idx]. See [method global_menu_add_submenu_item] for more info on how to add a submenu. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -406,7 +425,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the text of the item at index [code]idx[/code]. + Returns the text of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -415,7 +434,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns the tooltip associated with the specified index index [code]idx[/code]. + Returns the tooltip associated with the specified index index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -424,7 +443,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button. + Returns [code]true[/code] if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -433,7 +452,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns [code]true[/code] if the item at index [code]idx[/code] is checked. + Returns [code]true[/code] if the item at index [param idx] is checked. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -442,7 +461,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked. + Returns [code]true[/code] if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked. See [method global_menu_set_item_disabled] for more info on how to disable an item. [b]Note:[/b] This method is implemented on macOS. </description> @@ -452,7 +471,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability. + Returns [code]true[/code] if the item at index [param idx] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented on macOS. </description> @@ -462,7 +481,7 @@ <param index="0" name="menu_root" type="String" /> <param index="1" name="idx" type="int" /> <description> - Removes the item at index [code]idx[/code] from the global menu [code]menu_root[/code]. + Removes the item at index [param idx] from the global menu [param menu_root]. [b]Note:[/b] The indices of items after the removed item will be shifted by one. [b]Note:[/b] This method is implemented on macOS. </description> @@ -473,7 +492,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="keycode" type="int" enum="Key" /> <description> - Sets the accelerator of the item at index [code]idx[/code]. + Sets the accelerator of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -483,7 +502,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="callback" type="Callable" /> <description> - Sets the callback of the item at index [code]idx[/code]. Callback is emitted when an item is pressed or its accelerator is activated. + Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed or its accelerator is activated. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -493,7 +512,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="checkable" type="bool" /> <description> - Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. + Sets whether the item at index [param idx] has a checkbox. If [code]false[/code], sets the type of the item to plain text. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -503,7 +522,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="checked" type="bool" /> <description> - Sets the checkstate status of the item at index [code]idx[/code]. + Sets the checkstate status of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -513,7 +532,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="disabled" type="bool" /> <description> - Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked. + Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -523,11 +542,21 @@ <param index="1" name="idx" type="int" /> <param index="2" name="icon" type="Texture2D" /> <description> - Replaces the [Texture2D] icon of the specified [code]idx[/code]. + Replaces the [Texture2D] icon of the specified [param idx]. [b]Note:[/b] This method is implemented on macOS. [b]Note:[/b] This method is not supported by macOS "_dock" menu items. </description> </method> + <method name="global_menu_set_item_indentation_level"> + <return type="void" /> + <param index="0" name="menu_root" type="String" /> + <param index="1" name="idx" type="int" /> + <param index="2" name="level" type="int" /> + <description> + Sets the horizontal offset of the item at the given [param idx]. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> <method name="global_menu_set_item_max_states"> <return type="void" /> <param index="0" name="menu_root" type="String" /> @@ -544,7 +573,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="checkable" type="bool" /> <description> - Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text + Sets the type of the item at the specified index [param idx] to radio button. If [code]false[/code], sets the type of the item to plain text [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. [b]Note:[/b] This method is implemented on macOS. </description> @@ -565,7 +594,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="submenu" type="String" /> <description> - Sets the submenu of the item at index [code]idx[/code]. The submenu is the ID of a global menu root that would be shown when the item is clicked. + Sets the submenu of the item at index [param idx]. The submenu is the ID of a global menu root that would be shown when the item is clicked. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -585,7 +614,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="text" type="String" /> <description> - Sets the text of the item at index [code]idx[/code]. + Sets the text of the item at index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -595,7 +624,7 @@ <param index="1" name="idx" type="int" /> <param index="2" name="tooltip" type="String" /> <description> - Sets the [String] tooltip of the item at the specified index [code]idx[/code]. + Sets the [String] tooltip of the item at the specified index [param idx]. [b]Note:[/b] This method is implemented on macOS. </description> </method> @@ -626,7 +655,7 @@ <return type="int" enum="Key" /> <param index="0" name="keycode" type="int" enum="Key" /> <description> - Converts a physical (US QWERTY) [code]keycode[/code] to one in the active keyboard layout. + Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> @@ -641,7 +670,7 @@ <return type="String" /> <param index="0" name="index" type="int" /> <description> - Returns the ISO-639/BCP-47 language code of the keyboard layout at position [code]index[/code]. + Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index]. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> @@ -649,7 +678,7 @@ <return type="String" /> <param index="0" name="index" type="int" /> <description> - Returns the localized name of the keyboard layout at position [code]index[/code]. + Returns the localized name of the keyboard layout at position [param index]. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> @@ -692,7 +721,7 @@ <return type="int" /> <param index="0" name="screen" type="int" default="-1" /> <description> - Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used. + Returns the dots per inch density of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used. [b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities: [codeblock] @@ -730,7 +759,7 @@ <return type="float" /> <param index="0" name="screen" type="int" default="-1" /> <description> - Returns the current refresh rate of the specified screen. If [code]screen[/code] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. + Returns the current refresh rate of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform. To fallback to a default refresh rate if the method fails, try: [codeblock] @@ -828,7 +857,7 @@ </description> </method> <method name="tts_get_voices" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns an [Array] of voice information dictionaries. Each [Dictionary] contains two [String] entries: @@ -842,7 +871,7 @@ <return type="PackedStringArray" /> <param index="0" name="language" type="String" /> <description> - Returns an [PackedStringArray] of voice identifiers for the [code]language[/code]. + Returns an [PackedStringArray] of voice identifiers for the [param language]. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. </description> </method> @@ -896,13 +925,13 @@ <param index="5" name="utterance_id" type="int" default="0" /> <param index="6" name="interrupt" type="bool" default="false" /> <description> - Adds an utterance to the queue. If [code]interrupt[/code] is [code]true[/code], the queue is cleared first. - - [code]voice[/code] identifier is one of the [code]"id"[/code] values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language]. - - [code]volume[/code] ranges from [code]0[/code] (lowest) to [code]100[/code] (highest). - - [code]pitch[/code] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice. - - [code]rate[/code] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative. - - [code]utterance_id[/code] is passed as a parameter to the callback functions. - [b]Note:[/b] On Windows and Linux, utterance [code]text[/code] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. + Adds an utterance to the queue. If [param interrupt] is [code]true[/code], the queue is cleared first. + - [param voice] identifier is one of the [code]"id"[/code] values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language]. + - [param volume] ranges from [code]0[/code] (lowest) to [code]100[/code] (highest). + - [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice. + - [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative. + - [param utterance_id] is passed as a parameter to the callback functions. + [b]Note:[/b] On Windows and Linux, utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. [b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. </description> @@ -936,12 +965,12 @@ <param index="5" name="cursor_end" type="int" default="-1" /> <description> Shows the virtual keyboard if the platform has one. - [code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). - [code]position[/code] parameter is the screen space [Rect2] of the edited text. - [code]type[/code] parameter allows configuring which type of virtual keyboard to show. - [code]max_length[/code] limits the number of characters that can be entered if different from [code]-1[/code]. - [code]cursor_start[/code] can optionally define the current text cursor position if [code]cursor_end[/code] is not set. - [code]cursor_start[/code] and [code]cursor_end[/code] can optionally define the current text selection. + [param existing_text] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + [param position] parameter is the screen space [Rect2] of the edited text. + [param type] parameter allows configuring which type of virtual keyboard to show. + [param max_length] limits the number of characters that can be entered if different from [code]-1[/code]. + [param cursor_start] can optionally define the current text cursor position if [param cursor_end] is not set. + [param cursor_start] and [param cursor_end] can optionally define the current text selection. [b]Note:[/b] This method is implemented on Android, iOS and HTML5. </description> </method> @@ -949,7 +978,7 @@ <return type="void" /> <param index="0" name="position" type="Vector2i" /> <description> - Sets the mouse cursor position to the given [code]position[/code] relative to an origin at the upper left corner of the currently focused game Window Manager window. + Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window. </description> </method> <method name="window_attach_instance_id"> @@ -988,7 +1017,7 @@ <param index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Returns the current value of the given window's [code]flag[/code]. + Returns the current value of the given window's [param flag]. </description> </method> <method name="window_get_max_size" qualifiers="const"> @@ -1094,7 +1123,7 @@ <param index="1" name="enabled" type="bool" /> <param index="2" name="window_id" type="int" default="0" /> <description> - Enables or disables the given window's given [code]flag[/code]. See [enum WindowFlags] for possible values and their behavior. + Enables or disables the given window's given [param flag]. See [enum WindowFlags] for possible values and their behavior. </description> </method> <method name="window_set_ime_active"> @@ -1137,7 +1166,7 @@ <param index="0" name="min_size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the minimum size for the given window to [code]min_size[/code] (in pixels). + Sets the minimum size for the given window to [param min_size] (in pixels). [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. </description> </method> @@ -1146,7 +1175,7 @@ <param index="0" name="mode" type="int" enum="DisplayServer.WindowMode" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets window mode for the given window to [code]mode[/code]. See [enum WindowMode] for possible values and how each mode behaves. + Sets window mode for the given window to [param mode]. See [enum WindowMode] for possible values and how each mode behaves. [b]Note:[/b] Setting the window to fullscreen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted. </description> </method> @@ -1196,7 +1225,7 @@ <param index="0" name="position" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the position of the given window to [code]position[/code]. + Sets the position of the given window to [param position]. </description> </method> <method name="window_set_rect_changed_callback"> @@ -1211,7 +1240,7 @@ <param index="0" name="size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the size of the given window to [code]size[/code]. + Sets the size of the given window to [param size]. </description> </method> <method name="window_set_title"> @@ -1219,7 +1248,7 @@ <param index="0" name="title" type="String" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the title of the given window to [code]title[/code]. + Sets the title of the given window to [param title]. </description> </method> <method name="window_set_transient"> diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml index 23e9349cb5..53a3fe5d19 100644 --- a/doc/classes/EditorCommandPalette.xml +++ b/doc/classes/EditorCommandPalette.xml @@ -33,10 +33,10 @@ <param index="3" name="shortcut_text" type="String" default=""None"" /> <description> Adds a custom command to EditorCommandPalette. - - [code]command_name[/code]: [String] (Name of the [b]Command[/b]. This is displayed to the user.) - - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].) - - [code]binded_callable[/code]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.) - - [code]shortcut_text[/code]: [String] (Shortcut text of the [b]Command[/b] if available.) + - [param command_name]: [String] (Name of the [b]Command[/b]. This is displayed to the user.) + - [param key_name]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].) + - [param binded_callable]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.) + - [param shortcut_text]: [String] (Shortcut text of the [b]Command[/b] if available.) </description> </method> <method name="remove_command"> @@ -44,7 +44,7 @@ <param index="0" name="key_name" type="String" /> <description> Removes the custom command from EditorCommandPalette. - - [code]key_name[/code]: [String] (Name of the key for a particular [b]Command[/b].) + - [param key_name]: [String] (Name of the key for a particular [b]Command[/b].) </description> </method> </methods> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index 0b208fb921..c3e0a995c6 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -42,7 +42,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="callable" type="Callable" /> <description> - Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. + Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. </description> </method> @@ -51,7 +51,7 @@ <param index="0" name="message" type="String" /> <param index="1" name="data" type="Array" /> <description> - Sends a message with given [code]message[/code] and [code]data[/code] array. + Sends a message with given [param message] and [param data] array. </description> </method> <method name="unregister_message_capture"> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 17697cb20b..091bac7d8e 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -17,7 +17,7 @@ <param index="2" name="path" type="String" /> <param index="3" name="flags" type="int" /> <description> - Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [code]features[/code] is the list of features for the export, [code]is_debug[/code] is [code]true[/code] for debug builds, [code]path[/code] is the target path for the exported project. [code]flags[/code] is only used when running a runnable profile, e.g. when using native run on Android. + Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [param features] is the list of features for the export, [param is_debug] is [code]true[/code] for debug builds, [param path] is the target path for the exported project. [param flags] is only used when running a runnable profile, e.g. when using native run on Android. </description> </method> <method name="_export_end" qualifiers="virtual"> @@ -32,7 +32,7 @@ <param index="1" name="type" type="String" /> <param index="2" name="features" type="PackedStringArray" /> <description> - Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [code]path[/code] is the path of the file, [code]type[/code] is the [Resource] represented by the file (e.g. [PackedScene]) and [code]features[/code] is the list of features for the export. + Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]) and [param features] is the list of features for the export. Calling [method skip] inside this callback will make the file not included in the export. </description> </method> @@ -42,14 +42,14 @@ <param index="1" name="file" type="PackedByteArray" /> <param index="2" name="remap" type="bool" /> <description> - Adds a custom file to be exported. [code]path[/code] is the virtual path that can be used to load the file, [code]file[/code] is the binary data of the file. If [code]remap[/code] is [code]true[/code], file will not be exported, but instead remapped to the given [code]path[/code]. + Adds a custom file to be exported. [param path] is the virtual path that can be used to load the file, [param file] is the binary data of the file. If [param remap] is [code]true[/code], file will not be exported, but instead remapped to the given [param path]. </description> </method> <method name="add_ios_bundle_file"> <return type="void" /> <param index="0" name="path" type="String" /> <description> - Adds an iOS bundle file from the given [code]path[/code] to the exported project. + Adds an iOS bundle file from the given [param path] to the exported project. </description> </method> <method name="add_ios_cpp_code"> @@ -93,14 +93,14 @@ <return type="void" /> <param index="0" name="path" type="String" /> <description> - Adds a static lib from the given [code]path[/code] to the iOS project. + Adds a static lib from the given [param path] to the iOS project. </description> </method> <method name="add_macos_plugin_file"> <return type="void" /> <param index="0" name="path" type="String" /> <description> - Adds file or directory matching [code]path[/code] to [code]PlugIns[/code] directory of macOS app bundle. + Adds file or directory matching [param path] to [code]PlugIns[/code] directory of macOS app bundle. [b]Note:[/b] This is useful only for macOS exports. </description> </method> @@ -110,7 +110,7 @@ <param index="1" name="tags" type="PackedStringArray" /> <param index="2" name="target" type="String" /> <description> - Adds a shared object or a directory containing only shared objects with the given [code]tags[/code] and destination [code]path[/code]. + Adds a shared object or a directory containing only shared objects with the given [param tags] and destination [param path]. [b]Note:[/b] In case of macOS exports, those shared objects will be added to [code]Frameworks[/code] directory of app bundle. In case of a directory code-sign will error if you place non code object in directory. </description> diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index f5d6763bce..e216059364 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -14,21 +14,21 @@ <return type="String" /> <param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> <description> - Returns the specified [code]feature[/code]'s human-readable name. + Returns the specified [param feature]'s human-readable name. </description> </method> <method name="is_class_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="class_name" type="StringName" /> <description> - Returns [code]true[/code] if the class specified by [code]class_name[/code] is disabled. When disabled, the class won't appear in the Create New Node dialog. + Returns [code]true[/code] if the class specified by [param class_name] is disabled. When disabled, the class won't appear in the Create New Node dialog. </description> </method> <method name="is_class_editor_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="class_name" type="StringName" /> <description> - Returns [code]true[/code] if editing for the class specified by [code]class_name[/code] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="is_class_property_disabled" qualifiers="const"> @@ -36,14 +36,14 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="property" type="StringName" /> <description> - Returns [code]true[/code] if [code]property[/code] is disabled in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code]. + Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="is_feature_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> <description> - Returns [code]true[/code] if the [code]feature[/code] is disabled. When a feature is disabled, it will disappear from the editor entirely. + Returns [code]true[/code] if the [param feature] is disabled. When a feature is disabled, it will disappear from the editor entirely. </description> </method> <method name="load_from_file"> @@ -65,7 +65,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="disable" type="bool" /> <description> - If [code]disable[/code] is [code]true[/code], disables the class specified by [code]class_name[/code]. When disabled, the class won't appear in the Create New Node dialog. + If [param disable] is [code]true[/code], disables the class specified by [param class_name]. When disabled, the class won't appear in the Create New Node dialog. </description> </method> <method name="set_disable_class_editor"> @@ -73,7 +73,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="disable" type="bool" /> <description> - If [code]disable[/code] is [code]true[/code], disables editing for the class specified by [code]class_name[/code]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="set_disable_class_property"> @@ -82,7 +82,7 @@ <param index="1" name="property" type="StringName" /> <param index="2" name="disable" type="bool" /> <description> - If [code]disable[/code] is [code]true[/code], disables editing for [code]property[/code] in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code]. + If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="set_disable_feature"> @@ -90,7 +90,7 @@ <param index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> <param index="1" name="disable" type="bool" /> <description> - If [code]disable[/code] is [code]true[/code], disables the editor feature specified in [code]feature[/code]. When a feature is disabled, it will disappear from the editor entirely. + If [param disable] is [code]true[/code], disables the editor feature specified in [param feature]. When a feature is disabled, it will disappear from the editor entirely. </description> </method> </methods> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 0b1a85ebd1..891c8d7d92 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -13,9 +13,9 @@ <param index="0" name="filter" type="String" /> <param index="1" name="description" type="String" default="""" /> <description> - Adds a comma-delimited file name [code]filter[/code] option to the [EditorFileDialog] with an optional [code]description[/code], which restricts what files can be picked. - A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. - For example, a [code]filter[/code] of [code]"*.tscn, *.scn"[/code] and a [code]description[/code] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)". + Adds a comma-delimited file name [param filter] option to the [EditorFileDialog] with an optional [param description], which restricts what files can be picked. + A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. + For example, a [param filter] of [code]"*.tscn, *.scn"[/code] and a [param description] of [code]"Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)". </description> </method> <method name="clear_filters"> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 5a14dd0672..e8df6ae7fe 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -27,7 +27,7 @@ <return type="EditorFileSystemDirectory" /> <param index="0" name="path" type="String" /> <description> - Returns a view into the filesystem at [code]path[/code]. + Returns a view into the filesystem at [param path]. </description> </method> <method name="get_scanning_progress" qualifiers="const"> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index 3bc004e522..e9a0e3310c 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -13,21 +13,21 @@ <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the index of the directory with name [code]name[/code] or [code]-1[/code] if not found. + Returns the index of the directory with name [param name] or [code]-1[/code] if not found. </description> </method> <method name="find_file_index" qualifiers="const"> <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the index of the file with name [code]name[/code] or [code]-1[/code] if not found. + Returns the index of the file with name [param name] or [code]-1[/code] if not found. </description> </method> <method name="get_file" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the name of the file at index [code]idx[/code]. + Returns the name of the file at index [param idx]. </description> </method> <method name="get_file_count" qualifiers="const"> @@ -40,35 +40,35 @@ <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns [code]true[/code] if the file at index [code]idx[/code] imported properly. + Returns [code]true[/code] if the file at index [param idx] imported properly. </description> </method> <method name="get_file_path" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the path to the file at index [code]idx[/code]. + Returns the path to the file at index [param idx]. </description> </method> <method name="get_file_script_class_extends" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. + Returns the base class of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_script_class_name" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. + Returns the name of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_type" qualifiers="const"> <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Returns the resource type of the file at index [code]idx[/code]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. + Returns the resource type of the file at index [param idx]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. </description> </method> <method name="get_name"> @@ -93,7 +93,7 @@ <return type="EditorFileSystemDirectory" /> <param index="0" name="idx" type="int" /> <description> - Returns the subdirectory at index [code]idx[/code]. + Returns the subdirectory at index [param idx]. </description> </method> <method name="get_subdir_count" qualifiers="const"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index d3af6c1269..f7f1d456d0 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -115,7 +115,7 @@ </tutorials> <methods> <method name="_get_import_options" qualifiers="virtual const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="path" type="String" /> <param index="1" name="preset_index" type="int" /> <description> @@ -217,7 +217,7 @@ <param index="3" name="platform_variants" type="Array" /> <param index="4" name="gen_files" type="Array" /> <description> - Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function. + Imports [param source_file] into [param save_path] with the import [param options] specified. The [param platform_variants] and [param gen_files] arrays will be modified by this function. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. </description> </method> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index e52046f8c2..c8a499260e 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -27,7 +27,7 @@ <return type="void" /> <param index="0" name="object" type="Object" /> <description> - Called to allow adding controls at the beginning of the property list for [code]object[/code]. + Called to allow adding controls at the beginning of the property list for [param object]. </description> </method> <method name="_parse_category" qualifiers="virtual"> @@ -35,14 +35,14 @@ <param index="0" name="object" type="Object" /> <param index="1" name="category" type="String" /> <description> - Called to allow adding controls at the beginning of a category in the property list for [code]object[/code]. + Called to allow adding controls at the beginning of a category in the property list for [param object]. </description> </method> <method name="_parse_end" qualifiers="virtual"> <return type="void" /> <param index="0" name="object" type="Object" /> <description> - Called to allow adding controls at the end of the property list for [code]object[/code]. + Called to allow adding controls at the end of the property list for [param object]. </description> </method> <method name="_parse_group" qualifiers="virtual"> @@ -50,7 +50,7 @@ <param index="0" name="object" type="Object" /> <param index="1" name="group" type="String" /> <description> - Called to allow adding controls at the beginning of a group or a sub-group in the property list for [code]object[/code]. + Called to allow adding controls at the beginning of a group or a sub-group in the property list for [param object]. </description> </method> <method name="_parse_property" qualifiers="virtual"> @@ -63,7 +63,7 @@ <param index="5" name="usage_flags" type="int" /> <param index="6" name="wide" type="bool" /> <description> - Called to allow adding property-specific editors to the property list for [code]object[/code]. The added editor control must extend [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. + Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. </description> </method> <method name="add_custom_control"> @@ -79,7 +79,7 @@ <param index="1" name="editor" type="Control" /> <param index="2" name="add_to_end" type="bool" default="false" /> <description> - Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty]. + Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty]. </description> </method> <method name="add_property_editor_for_multiple_properties"> @@ -88,7 +88,7 @@ <param index="1" name="properties" type="PackedStringArray" /> <param index="2" name="editor" type="Control" /> <description> - Adds an editor that allows modifying multiple properties. The [code]editor[/code] control must extend [EditorProperty]. + Adds an editor that allows modifying multiple properties. The [param editor] control must extend [EditorProperty]. </description> </method> </methods> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index bdd5b87cd8..49cd715f5e 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -101,7 +101,7 @@ </description> </method> <method name="get_open_scenes" qualifiers="const"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Returns an [Array] with the file paths of the currently opened scenes. </description> @@ -149,7 +149,7 @@ <param index="1" name="for_property" type="String" default="""" /> <param index="2" name="inspector_only" type="bool" default="false" /> <description> - Shows the given property on the given [code]object[/code] in the editor's Inspector dock. If [code]inspector_only[/code] is [code]true[/code], plugins will not attempt to edit [code]object[/code]. + Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is [code]true[/code], plugins will not attempt to edit [param object]. </description> </method> <method name="is_playing_scene" qualifiers="const"> @@ -162,11 +162,11 @@ <return type="bool" /> <param index="0" name="plugin" type="String" /> <description> - Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name. + Returns [code]true[/code] if the specified [param plugin] is enabled. The plugin name is the same as its directory name. </description> </method> <method name="make_mesh_previews"> - <return type="Array" /> + <return type="Texture2D[]" /> <param index="0" name="meshes" type="Array" /> <param index="1" name="preview_size" type="int" /> <description> @@ -206,6 +206,13 @@ Reloads the scene at the given path. </description> </method> + <method name="restart_editor"> + <return type="void" /> + <param index="0" name="save" type="bool" default="true" /> + <description> + Restarts the editor. This closes the editor and then opens the same project. If [param save] is [code]true[/code], the project will be saved before restarting. + </description> + </method> <method name="save_scene"> <return type="int" enum="Error" /> <description> @@ -217,21 +224,21 @@ <param index="0" name="path" type="String" /> <param index="1" name="with_preview" type="bool" default="true" /> <description> - Saves the scene as a file at [code]path[/code]. + Saves the scene as a file at [param path]. </description> </method> <method name="select_file"> <return type="void" /> <param index="0" name="file" type="String" /> <description> - Selects the file, with the path provided by [code]file[/code], in the FileSystem dock. + Selects the file, with the path provided by [param file], in the FileSystem dock. </description> </method> <method name="set_main_screen_editor"> <return type="void" /> <param index="0" name="name" type="String" /> <description> - Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). + Sets the editor's current main screen to the one specified in [param name]. [param name] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). </description> </method> <method name="set_plugin_enabled"> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 13bf9e3028..9ee21fd63b 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -16,9 +16,9 @@ <param index="2" name="restore" type="Variant" /> <param index="3" name="cancel" type="bool" /> <description> - Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". - If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. - The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information). + Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". + If the [param cancel] argument is [code]true[/code], the [param restore] value should be directly set, without any [UndoRedo] action. + The [param secondary] argument is [code]true[/code] when the committed handle is secondary (see [method add_handles] for more information). </description> </method> <method name="_commit_subgizmos" qualifiers="virtual"> @@ -27,8 +27,8 @@ <param index="1" name="restores" type="Transform3D[]" /> <param index="2" name="cancel" type="bool" /> <description> - Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". - If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. + Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". + If the [param cancel] argument is [code]true[/code], the [param restores] transforms should be directly set, without any [UndoRedo] action. </description> </method> <method name="_get_handle_name" qualifiers="virtual const"> @@ -37,7 +37,7 @@ <param index="1" name="secondary" type="bool" /> <description> Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing. - The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). + The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). </description> </method> <method name="_get_handle_value" qualifiers="virtual const"> @@ -46,7 +46,7 @@ <param index="1" name="secondary" type="bool" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. - The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). + The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). </description> </method> <method name="_get_subgizmo_transform" qualifiers="virtual const"> @@ -62,7 +62,7 @@ <param index="1" name="secondary" type="bool" /> <description> Override this method to return [code]true[/code] whenever the given handle should be highlighted in the editor. - The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). + The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method add_handles] for more information). </description> </method> <method name="_redraw" qualifiers="virtual"> @@ -78,8 +78,8 @@ <param index="2" name="camera" type="Camera3D" /> <param index="3" name="point" type="Vector2" /> <description> - Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. - The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information). + Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [param point] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. + The [param secondary] argument is [code]true[/code] when the edited handle is secondary (see [method add_handles] for more information). </description> </method> <method name="_set_subgizmo_transform" qualifiers="virtual"> @@ -87,7 +87,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="transform" type="Transform3D" /> <description> - Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. + Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. </description> </method> <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> @@ -95,7 +95,7 @@ <param index="0" name="camera" type="Camera3D" /> <param index="1" name="frustum" type="Plane[]" /> <description> - Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. + Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. </description> </method> <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> @@ -103,14 +103,14 @@ <param index="0" name="camera" type="Camera3D" /> <param index="1" name="point" type="Vector2" /> <description> - Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. + Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param point] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. </description> </method> <method name="add_collision_segments"> <return type="void" /> <param index="0" name="segments" type="PackedVector3Array" /> <description> - Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this method during [method _redraw]. + Adds the specified [param segments] to the gizmo's collision shape for picking. Call this method during [method _redraw]. </description> </method> <method name="add_collision_triangles"> @@ -128,8 +128,8 @@ <param index="3" name="billboard" type="bool" default="false" /> <param index="4" name="secondary" type="bool" default="false" /> <description> - Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [code]ids[/code] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [code]handles[/code] argument order. - The [code]secondary[/code] argument marks the added handles as secondary, meaning they will normally have less selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. + Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [param ids] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [param handles] argument order. + The [param secondary] argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw]. </description> </method> @@ -150,7 +150,7 @@ <param index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" /> <param index="3" name="skeleton" type="SkinReference" default="null" /> <description> - Adds a mesh to the gizmo with the specified [code]material[/code], local [code]transform[/code] and [code]skeleton[/code]. Call this method during [method _redraw]. + Adds a mesh to the gizmo with the specified [param material], local [param transform] and [param skeleton]. Call this method during [method _redraw]. </description> </method> <method name="add_unscaled_billboard"> @@ -204,7 +204,7 @@ <return type="void" /> <param index="0" name="node" type="Node" /> <description> - Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D]. + Sets the reference [Node3D] node for the gizmo. [param node] must inherit from [Node3D]. </description> </method> </methods> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index a6f4a3a0f5..8a97dda9ae 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -25,9 +25,9 @@ <param index="3" name="restore" type="Variant" /> <param index="4" name="cancel" type="bool" /> <description> - Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". - If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. - The [code]secondary[/code] argument is [code]true[/code] when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". + If the [param cancel] argument is [code]true[/code], the [param restore] value should be directly set, without any [UndoRedo] action. + The [param secondary] argument is [code]true[/code] when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. </description> </method> @@ -38,8 +38,8 @@ <param index="2" name="restores" type="Transform3D[]" /> <param index="3" name="cancel" type="bool" /> <description> - Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". - If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. + Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". + If the [param cancel] argument is [code]true[/code], the [param restores] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. </description> </method> <method name="_create_gizmo" qualifiers="virtual const"> @@ -61,7 +61,7 @@ <param index="1" name="handle_id" type="int" /> <param index="2" name="secondary" type="bool" /> <description> - Override this method to provide gizmo's handle names. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. + Override this method to provide gizmo's handle names. The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. </description> </method> <method name="_get_handle_value" qualifiers="virtual const"> @@ -71,7 +71,7 @@ <param index="2" name="secondary" type="bool" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. - The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. </description> </method> @@ -103,7 +103,7 @@ <param index="1" name="handle_id" type="int" /> <param index="2" name="secondary" type="bool" /> <description> - Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. The [code]secondary[/code] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. + Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. The [param secondary] argument is [code]true[/code] when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. </description> </method> <method name="_is_selectable_when_hidden" qualifiers="virtual const"> @@ -127,8 +127,8 @@ <param index="3" name="camera" type="Camera3D" /> <param index="4" name="screen_pos" type="Vector2" /> <description> - Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. - The [code]secondary[/code] argument is [code]true[/code] when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [param screen_pos] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. + The [param secondary] argument is [code]true[/code] when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. </description> </method> @@ -138,7 +138,7 @@ <param index="1" name="subgizmo_id" type="int" /> <param index="2" name="transform" type="Transform3D" /> <description> - Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. + Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. </description> </method> <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> @@ -147,7 +147,7 @@ <param index="1" name="camera" type="Camera3D" /> <param index="2" name="frustum_planes" type="Plane[]" /> <description> - Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. + Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> @@ -156,7 +156,7 @@ <param index="1" name="camera" type="Camera3D" /> <param index="2" name="screen_pos" type="Vector2" /> <description> - Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. + Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param screen_pos] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> <method name="add_material"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index ab41c1c493..fdd3807b69 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -100,7 +100,7 @@ <param index="0" name="viewport_camera" type="Camera3D" /> <param index="1" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example: [codeblocks] [gdscript] # Prevents the InputEvent to reach other Editor classes. @@ -182,7 +182,7 @@ <return type="bool" /> <param index="0" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example: [codeblocks] [gdscript] # Prevents the InputEvent to reach other Editor classes. @@ -351,7 +351,7 @@ <return type="void" /> <param index="0" name="configuration" type="ConfigFile" /> <description> - Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [code]configuration[/code] file to read your saved data. + Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [param configuration] file to read your saved data. [codeblock] func _set_window_layout(configuration): $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2()) @@ -364,7 +364,7 @@ <param index="0" name="name" type="String" /> <param index="1" name="path" type="String" /> <description> - Adds a script at [code]path[/code] to the Autoload list as [code]name[/code]. + Adds a script at [param path] to the Autoload list as [param name]. </description> </method> <method name="add_control_to_bottom_panel"> @@ -429,7 +429,7 @@ <param index="1" name="first_priority" type="bool" default="false" /> <description> Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. - If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead. See [method add_inspector_plugin] for an example of how to register a plugin. </description> @@ -460,7 +460,7 @@ <param index="1" name="first_priority" type="bool" default="false" /> <description> Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes. - If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. </description> </method> <method name="add_scene_post_import_plugin"> @@ -469,7 +469,7 @@ <param index="1" name="first_priority" type="bool" default="false" /> <description> Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. - If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + If [param first_priority] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. </description> </method> <method name="add_spatial_gizmo_plugin"> @@ -485,7 +485,7 @@ <param index="0" name="name" type="String" /> <param index="1" name="callable" type="Callable" /> <description> - Adds a custom menu item to [b]Project > Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called. + Adds a custom menu item to [b]Project > Tools[/b] named [param name]. When clicked, the provided [param callable] will be called. </description> </method> <method name="add_tool_submenu_item"> @@ -493,7 +493,7 @@ <param index="0" name="name" type="String" /> <param index="1" name="submenu" type="PopupMenu" /> <description> - Adds a custom [PopupMenu] submenu under [b]Project > Tools >[/b] [code]name[/code]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu. + Adds a custom [PopupMenu] submenu under [b]Project > Tools >[/b] [param name]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu. </description> </method> <method name="add_translation_parser_plugin"> @@ -532,7 +532,7 @@ </description> </method> <method name="get_undo_redo"> - <return type="UndoRedo" /> + <return type="EditorUndoRedoManager" /> <description> Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. </description> @@ -560,7 +560,7 @@ <return type="void" /> <param index="0" name="name" type="String" /> <description> - Removes an Autoload [code]name[/code] from the list. + Removes an Autoload [param name] from the list. </description> </method> <method name="remove_control_from_bottom_panel"> @@ -645,7 +645,7 @@ <return type="void" /> <param index="0" name="name" type="String" /> <description> - Removes a menu [code]name[/code] from [b]Project > Tools[/b]. + Removes a menu [param name] from [b]Project > Tools[/b]. </description> </method> <method name="remove_translation_parser_plugin"> @@ -729,7 +729,7 @@ </constant> <constant name="CONTAINER_CANVAS_EDITOR_BOTTOM" value="8" enum="CustomControlContainer"> </constant> - <constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="9" enum="CustomControlContainer"> + <constant name="CONTAINER_INSPECTOR_BOTTOM" value="9" enum="CustomControlContainer"> </constant> <constant name="CONTAINER_PROJECT_SETTING_TAB_LEFT" value="10" enum="CustomControlContainer"> </constant> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 0badcf1639..4a6a0e7226 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -29,7 +29,7 @@ <param index="2" name="field" type="StringName" default="&""" /> <param index="3" name="changing" type="bool" default="false" /> <description> - If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure). + If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure). </description> </method> <method name="get_edited_object"> @@ -54,7 +54,7 @@ <return type="void" /> <param index="0" name="editor" type="Control" /> <description> - Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child]. + Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child]. </description> </method> <method name="update_property"> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml index f531037f59..4182ab3c16 100644 --- a/doc/classes/EditorResourcePicker.xml +++ b/doc/classes/EditorResourcePicker.xml @@ -21,7 +21,7 @@ <return type="void" /> <param index="0" name="menu_node" type="Object" /> <description> - This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node. + This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node. [b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items. </description> </method> @@ -62,9 +62,9 @@ </signal> <signal name="resource_selected"> <param index="0" name="resource" type="Resource" /> - <param index="1" name="edit" type="bool" /> + <param index="1" name="inspect" type="bool" /> <description> - Emitted when the resource value was set and user clicked to edit it. When [code]edit[/code] is [code]true[/code], the signal was caused by the context menu "Edit" option. + Emitted when the resource value was set and user clicked to edit it. When [param inspect] is [code]true[/code], the signal was caused by the context menu "Edit" or "Inspect" option. </description> </signal> </signals> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 2953c19761..68ead12c03 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -31,8 +31,8 @@ <param index="2" name="receiver_func" type="StringName" /> <param index="3" name="userdata" type="Variant" /> <description> - Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. - [b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. + Queue the [param resource] being edited for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. + [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null. </description> </method> <method name="queue_resource_preview"> @@ -42,8 +42,8 @@ <param index="2" name="receiver_func" type="StringName" /> <param index="3" name="userdata" type="Variant" /> <description> - Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. - [b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. + Queue a resource file located at [param path] for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. + [b]Note:[/b] If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null. </description> </method> <method name="remove_preview_generator"> @@ -58,7 +58,7 @@ <signal name="preview_invalidated"> <param index="0" name="path" type="String" /> <description> - Emitted if a preview was invalidated (changed). [code]path[/code] corresponds to the path of the preview. + Emitted if a preview was invalidated (changed). [param path] corresponds to the path of the preview. </description> </signal> </signals> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index f24260cd1b..75628beae9 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -47,7 +47,7 @@ <return type="bool" /> <param index="0" name="type" type="String" /> <description> - Returns [code]true[/code] if your generator supports the resource of type [code]type[/code]. + Returns [code]true[/code] if your generator supports the resource of type [param type]. </description> </method> </methods> diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index b39972694b..2ff8a7ba2a 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -44,7 +44,7 @@ <return type="void" /> <param index="0" name="node" type="Node" /> <description> - Adds [code]node[/code] as a child of the root node in the editor context. + Adds [param node] as a child of the root node in the editor context. [b]Warning:[/b] The implementation of this method is currently disabled. </description> </method> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 9c3e87ddb0..54029c2ccf 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -31,7 +31,7 @@ </description> </method> <method name="get_transformable_selected_nodes"> - <return type="Array" /> + <return type="Node[]" /> <description> Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. </description> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 2362213109..c7ff0a2d59 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -74,18 +74,18 @@ <return type="bool" /> <param index="0" name="setting_prefix" type="String" /> <description> - Checks if any settings with the prefix [code]setting_prefix[/code] exist in the set of changed settings. See also [method get_changed_settings]. + Checks if any settings with the prefix [param setting_prefix] exist in the set of changed settings. See also [method get_changed_settings]. </description> </method> <method name="erase"> <return type="void" /> <param index="0" name="property" type="String" /> <description> - Erases the setting whose name is specified by [code]property[/code]. + Erases the setting whose name is specified by [param property]. </description> </method> <method name="get_changed_settings" qualifiers="const"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED] </description> @@ -102,7 +102,7 @@ <param index="1" name="key" type="String" /> <param index="2" name="default" type="Variant" default="null" /> <description> - Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata]. + Returns project-specific metadata for the [param section] and [param key] specified. If the metadata doesn't exist, [param default] will be returned instead. See also [method set_project_metadata]. </description> </method> <method name="get_recent_dirs" qualifiers="const"> @@ -115,14 +115,14 @@ <return type="Variant" /> <param index="0" name="name" type="String" /> <description> - Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. + Returns the value of the setting specified by [param name]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> <method name="has_setting" qualifiers="const"> <return type="bool" /> <param index="0" name="name" type="String" /> <description> - Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise. + Returns [code]true[/code] if the setting specified by [param name] exists, [code]false[/code] otherwise. </description> </method> <method name="mark_setting_changed"> @@ -132,26 +132,12 @@ Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings. - </description> - </method> <method name="set_builtin_action_override"> <return type="void" /> <param index="0" name="name" type="String" /> <param index="1" name="actions_list" type="Array" /> <description> - Overrides the built-in editor action [code]name[/code] with the input actions defined in [code]actions_list[/code]. + Overrides the built-in editor action [param name] with the input actions defined in [param actions_list]. </description> </method> <method name="set_favorites"> @@ -167,7 +153,7 @@ <param index="1" name="value" type="Variant" /> <param index="2" name="update_current" type="bool" /> <description> - Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well. + Sets the initial value of the setting specified by [param name] to [param value]. This is used to provide a value for the Revert button in the Editor Settings. If [param update_current] is true, the current value of the setting will be set to [param value] as well. </description> </method> <method name="set_project_metadata"> @@ -176,7 +162,7 @@ <param index="1" name="key" type="String" /> <param index="2" name="data" type="Variant" /> <description> - Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. + Sets project-specific metadata with the [param section], [param key] and [param data] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. </description> </method> <method name="set_recent_dirs"> @@ -191,7 +177,7 @@ <param index="0" name="name" type="String" /> <param index="1" name="value" type="Variant" /> <description> - Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance. + Sets the [param value] of the setting specified by [param name]. This is equivalent to using [method Object.set] on the EditorSettings instance. </description> </method> </methods> @@ -553,6 +539,10 @@ <member name="interface/editor/unfocused_low_processor_mode_sleep_usec" type="float" setter="" getter=""> When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also [member interface/editor/low_processor_mode_sleep_usec]. </member> + <member name="interface/editor/use_embedded_menu" type="bool" setter="" getter=""> + If [code]true[/code], editor main menu is using embedded [MenuBar] instead of system global menu. + Specific to the macOS platform. + </member> <member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter=""> The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor. </member> @@ -710,7 +700,7 @@ If [code]true[/code], draws tab characters as chevrons. </member> <member name="text_editor/appearance/whitespace/line_spacing" type="int" setter="" getter=""> - The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying less lines on screen. + The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. </member> <member name="text_editor/behavior/files/auto_reload_scripts_on_external_change" type="bool" setter="" getter=""> If [code]true[/code], automatically reloads scripts in the editor when they have been modified and saved by external editors. @@ -866,7 +856,7 @@ </member> <member name="text_editor/theme/highlighting/function_color" type="Color" setter="" getter=""> The script editor's function call color. - [b]Note:[/b] When using the GDScript syntax highlighter, this is replaced by the function declaration color configured in the syntax theme for function declarations (e.g. [code]func _ready():[/code]). + [b]Note:[/b] When using the GDScript syntax highlighter, this is replaced by the function definition color configured in the syntax theme for function definitions (e.g. [code]func _ready():[/code]). </member> <member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter=""> The script editor's non-control flow keyword color (used for keywords like [code]var[/code], [code]func[/code], some built-in methods, ...). diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml index 15b730acb4..51f4474fe7 100644 --- a/doc/classes/EditorSyntaxHighlighter.xml +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -17,7 +17,7 @@ </description> </method> <method name="_get_supported_languages" qualifiers="virtual const"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Virtual method which can be overridden to return the supported language names. </description> diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml new file mode 100644 index 0000000000..1350e4487c --- /dev/null +++ b/doc/classes/EditorUndoRedoManager.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorUndoRedoManager" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Manages undo history of scenes opened in the editor. + </brief_description> + <description> + [EditorUndoRedoManager] is a manager for [UndoRedo] objects associated with edited scenes. Each scene has its own undo history and [EditorUndoRedoManager] ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes ([ProjectSettings] edits, external resources, etc.), a separate global history is used. + The usage is mostly the same as [UndoRedo]. You create and commit actions and the manager automatically decides under-the-hood what scenes it belongs to. The scene is deduced based on the first operation in an action, using the object from the operation. The rules are as follows: + - If the object is a [Node], use the currently edited scene; + - If the object is a built-in resource, use the scene from its path; + - If the object is external resource or anything else, use global history. + This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_do_method" qualifiers="vararg"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <param index="1" name="method" type="StringName" /> + <description> + Register a method that will be called when the action is committed (i.e. the "do" action). + If this is the first operation, the [param object] will be used to deduce target undo history. + </description> + </method> + <method name="add_do_property"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <param index="1" name="property" type="StringName" /> + <param index="2" name="value" type="Variant" /> + <description> + Register a property value change for "do". + If this is the first operation, the [param object] will be used to deduce target undo history. + </description> + </method> + <method name="add_do_reference"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <description> + Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. + </description> + </method> + <method name="add_undo_method" qualifiers="vararg"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <param index="1" name="method" type="StringName" /> + <description> + Register a method that will be called when the action is undone (i.e. the "undo" action). + If this is the first operation, the [param object] will be used to deduce target undo history. + </description> + </method> + <method name="add_undo_property"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <param index="1" name="property" type="StringName" /> + <param index="2" name="value" type="Variant" /> + <description> + Register a property value change for "undo". + If this is the first operation, the [param object] will be used to deduce target undo history. + </description> + </method> + <method name="add_undo_reference"> + <return type="void" /> + <param index="0" name="object" type="Object" /> + <description> + Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). + </description> + </method> + <method name="commit_action"> + <return type="void" /> + <param index="0" name="execute" type="bool" default="true" /> + <description> + Commit the action. If [param execute] is true (default), all "do" methods/properties are called/set when this function is called. + </description> + </method> + <method name="create_action"> + <return type="void" /> + <param index="0" name="name" type="String" /> + <param index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0" /> + <param index="2" name="custom_context" type="Object" default="null" /> + <description> + Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. + The way actions are merged is dictated by the [param merge_mode] argument. See [enum UndoRedo.MergeMode] for details. + If [param custom_context] object is provided, it will be used for deducing target history (instead of using the first operation). + </description> + </method> + <method name="get_history_undo_redo" qualifiers="const"> + <return type="UndoRedo" /> + <param index="0" name="id" type="int" /> + <description> + Returns the [UndoRedo] object associated with the given history [param id]. + [param id] above [code]0[/code] are mapped to the opened scene tabs (but it doesn't match their order). [param id] of [code]0[/code] or lower have special meaning (see [enum SpecialHistory]). + Best used with [method get_object_history_id]. This method is only provided in case you need some more advanced methods of [UndoRedo] (but keep in mind that directly operating on the [UndoRedo] object might affect editor's stability). + </description> + </method> + <method name="get_object_history_id" qualifiers="const"> + <return type="int" /> + <param index="0" name="object" type="Object" /> + <description> + Returns the history ID deduced from the given [param object]. It can be used with [method get_history_undo_redo]. + </description> + </method> + <method name="is_committing_action" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the [EditorUndoRedoManager] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]). + </description> + </method> + </methods> + <constants> + <constant name="GLOBAL_HISTORY" value="0" enum="SpecialHistory"> + Global history not associated with any scene, but with external resources etc. + </constant> + <constant name="INVALID_HISTORY" value="-99" enum="SpecialHistory"> + Invalid "null" history. It's a special value, not associated with any object. + </constant> + </constants> +</class> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index cc75861130..89ba79f7d9 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -17,7 +17,7 @@ </description> </method> <method name="get_file_diff"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="file_path" type="String" /> <description> Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file. diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index a982d69b07..301a3e55fb 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -34,7 +34,7 @@ </description> </method> <method name="get_copyright_info" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns an Array of copyright information Dictionaries. [code]name[/code] - String, component name @@ -123,7 +123,7 @@ <return type="Object" /> <param index="0" name="name" type="StringName" /> <description> - Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. + Returns a global singleton with given [param name]. Often used for plugins, e.g. GodotPayments. </description> </method> <method name="get_singleton_list" qualifiers="const"> @@ -175,7 +175,7 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. + Returns [code]true[/code] if a singleton with given [param name] exists in global scope. </description> </method> <method name="is_editor_hint" qualifiers="const"> diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml index c3e76b8cad..176bc1f135 100644 --- a/doc/classes/EngineDebugger.xml +++ b/doc/classes/EngineDebugger.xml @@ -41,7 +41,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="data" type="Array" /> <description> - Calls the [code]add[/code] callable of the profiler with given [code]name[/code] and [code]data[/code]. + Calls the [code]add[/code] callable of the profiler with given [param name] and [param data]. </description> </method> <method name="profiler_enable"> @@ -50,7 +50,7 @@ <param index="1" name="enable" type="bool" /> <param index="2" name="arguments" type="Array" default="[]" /> <description> - Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument. + Calls the [code]toggle[/code] callable of the profiler with given [param name] and [param arguments]. Enables/Disables the same profiler depending on [code]enable[/code] argument. </description> </method> <method name="register_message_capture"> @@ -58,7 +58,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="callable" type="Callable" /> <description> - Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. + Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. </description> </method> @@ -67,7 +67,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="profiler" type="EngineProfiler" /> <description> - Registers a profiler with the given [code]name[/code]. See [EngineProfiler] for more information. + Registers a profiler with the given [param name]. See [EngineProfiler] for more information. </description> </method> <method name="send_message"> @@ -75,21 +75,21 @@ <param index="0" name="message" type="String" /> <param index="1" name="data" type="Array" /> <description> - Sends a message with given [code]message[/code] and [code]data[/code] array. + Sends a message with given [param message] and [param data] array. </description> </method> <method name="unregister_message_capture"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Unregisters the message capture with given [code]name[/code]. + Unregisters the message capture with given [param name]. </description> </method> <method name="unregister_profiler"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Unregisters a profiler with given [code]name[/code]. + Unregisters a profiler with given [param name]. </description> </method> </methods> diff --git a/doc/classes/EngineProfiler.xml b/doc/classes/EngineProfiler.xml index d8fb193761..a7a66c4564 100644 --- a/doc/classes/EngineProfiler.xml +++ b/doc/classes/EngineProfiler.xml @@ -32,7 +32,7 @@ <param index="0" name="enable" type="bool" /> <param index="1" name="options" type="Array" /> <description> - Called when the profiler is enabled/disabled, along with a set of [code]options[/code]. + Called when the profiler is enabled/disabled, along with a set of [param options]. </description> </method> </methods> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index fce12b3602..864dbd423a 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -22,7 +22,7 @@ <return type="float" /> <param index="0" name="idx" type="int" /> <description> - Returns the intensity of the glow level [code]idx[/code]. + Returns the intensity of the glow level [param idx]. </description> </method> <method name="set_glow_level"> @@ -30,7 +30,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="intensity" type="float" /> <description> - Sets the intensity of the glow level [code]idx[/code]. A value above [code]0.0[/code] enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. + Sets the intensity of the glow level [param idx]. A value above [code]0.0[/code] enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. </description> </method> </methods> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index 130f2f2272..3a397f56a9 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -80,7 +80,7 @@ <param index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()" /> <description> Parses the expression and returns an [enum Error] code. - You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed. + You can optionally specify names of variables that may appear in the expression with [param input_names], so that you can bind them when it gets executed. </description> </method> </methods> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 0c6310c09f..76c6a4871c 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -118,21 +118,21 @@ <param index="0" name="skip_cr" type="bool" default="false" /> <description> Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded. - If [code]skip_cr[/code] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention). + If [param skip_cr] is [code]true[/code], carriage return characters ([code]\r[/code], CR) will be ignored when parsing the UTF-8, so that only line feed characters ([code]\n[/code], LF) represent a new line (Unix convention). </description> </method> <method name="get_buffer" qualifiers="const"> <return type="PackedByteArray" /> <param index="0" name="length" type="int" /> <description> - Returns next [code]length[/code] bytes of the file as a [PackedByteArray]. + Returns next [param length] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> <return type="PackedStringArray" /> <param index="0" name="delim" type="String" default="","" /> <description> - Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark. + Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark. Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. For example, the following CSV lines are valid and will be properly parsed as two strings each: [codeblock] @@ -185,7 +185,7 @@ <return type="int" /> <param index="0" name="file" type="String" /> <description> - Returns the last time the [code]file[/code] was modified in Unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This Unix timestamp can be converted to another format using the [Time] singleton. + Returns the last time the [param file] was modified in Unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This Unix timestamp can be converted to another format using the [Time] singleton. </description> </method> <method name="get_pascal_string"> @@ -230,7 +230,7 @@ <return type="Variant" /> <param index="0" name="allow_objects" type="bool" default="false" /> <description> - Returns the next [Variant] value from the file. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + Returns the next [Variant] value from the file. If [param allow_objects] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> @@ -297,7 +297,7 @@ <param index="0" name="value" type="int" /> <description> Stores an integer as 16 bits in the file. - [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around. + [b]Note:[/b] The [param value] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around. To store a signed integer, use [method store_64] or store a signed integer from the interval [code][-2^15, 2^15 - 1][/code] (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: [codeblocks] [gdscript] @@ -340,7 +340,7 @@ <param index="0" name="value" type="int" /> <description> Stores an integer as 32 bits in the file. - [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^32 - 1][/code]. Any other value will overflow and wrap around. + [b]Note:[/b] The [param value] should lie in the interval [code][0, 2^32 - 1][/code]. Any other value will overflow and wrap around. To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example). </description> </method> @@ -349,7 +349,7 @@ <param index="0" name="value" type="int" /> <description> Stores an integer as 64 bits in the file. - [b]Note:[/b] The [code]value[/code] must lie in the interval [code][-2^63, 2^63 - 1][/code] (i.e. be a valid [int] value). + [b]Note:[/b] The [param value] must lie in the interval [code][-2^63, 2^63 - 1][/code] (i.e. be a valid [int] value). </description> </method> <method name="store_8"> @@ -357,7 +357,7 @@ <param index="0" name="value" type="int" /> <description> Stores an integer as 8 bits in the file. - [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 255][/code]. Any other value will overflow and wrap around. + [b]Note:[/b] The [param value] should lie in the interval [code][0, 255][/code]. Any other value will overflow and wrap around. To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example). </description> </method> @@ -373,7 +373,7 @@ <param index="0" name="values" type="PackedStringArray" /> <param index="1" name="delim" type="String" default="","" /> <description> - Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. + Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. </description> </method> @@ -395,7 +395,7 @@ <return type="void" /> <param index="0" name="line" type="String" /> <description> - Appends [code]line[/code] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8. + Appends [param line] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8. </description> </method> <method name="store_pascal_string"> @@ -417,7 +417,7 @@ <return type="void" /> <param index="0" name="string" type="String" /> <description> - Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8. + Appends [param string] to the file without a line return, encoding the text as UTF-8. [b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use [code]get_buffer(length).get_string_from_utf8()[/code] (if you know the length) or [method get_as_text]. </description> </method> @@ -426,7 +426,7 @@ <param index="0" name="value" type="Variant" /> <param index="1" name="full_objects" type="bool" default="false" /> <description> - Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). + Stores any Variant value in the file. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code). [b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags. </description> </method> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 00a1028c5e..ba6f4ffb89 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -14,9 +14,9 @@ <param index="0" name="filter" type="String" /> <param index="1" name="description" type="String" default="""" /> <description> - Adds a comma-delimited file name [code]filter[/code] option to the [FileDialog] with an optional [code]description[/code], which restricts what files can be picked. - A [code]filter[/code] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. - For example, a [code]filter[/code] of [code]"*.png, *.jpg"[/code] and a [code]description[/code] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)". + Adds a comma-delimited file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked. + A [param filter] should be of the form [code]"filename.extension"[/code], where filename and extension can be [code]*[/code] to match any string. Filters starting with [code].[/code] (i.e. empty filenames) are not allowed. + For example, a [param filter] of [code]"*.png, *.jpg"[/code] and a [param description] of [code]"Images"[/code] results in filter text "Images (*.png, *.jpg)". </description> </method> <method name="clear_filters"> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 9e9c592400..ad3a16afbb 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -17,7 +17,7 @@ <param index="3" name="font_size" type="int" /> <param index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw a single Unicode character [param char] into a canvas item using the font, at a given position, with [param modulate] color. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. </description> </method> @@ -30,7 +30,7 @@ <param index="4" name="size" type="int" default="-1" /> <param index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Draw a single Unicode character [code]char[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw a single Unicode character [param char] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. </description> </method> @@ -49,7 +49,7 @@ <param index="10" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="11" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Breaks [param text] into lines using rules specified by [param brk_flags] and draws it into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string]. </description> </method> @@ -69,7 +69,7 @@ <param index="11" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="12" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws text outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Breaks [param text] to the lines using rules specified by [param brk_flags] and draws text outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string_outline]. </description> </method> @@ -86,7 +86,7 @@ <param index="8" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="9" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw [param text] into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_string]. </description> </method> @@ -104,7 +104,7 @@ <param index="9" name="direction" type="int" enum="TextServer.Direction" default="0" /> <param index="10" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> - Draw [code]text[/code] outline into a canvas item using the font, at a given position, with [code]modulate[/code] color and [code]size[/code] outline size, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw [param text] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_string_outline]. </description> </method> @@ -274,7 +274,7 @@ <return type="bool" /> <param index="0" name="char" type="int" /> <description> - Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. + Returns [code]true[/code] if a Unicode [param char] is available in the font. </description> </method> <method name="is_language_supported" qualifiers="const"> diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index 622bb17e59..b9b20dc75b 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -142,11 +142,11 @@ <param index="1" name="char" type="int" /> <param index="2" name="variation_selector" type="int" /> <description> - Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. + Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. </description> </method> <method name="get_glyph_list" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="Vector2i" /> <description> @@ -199,7 +199,7 @@ </description> </method> <method name="get_kerning_list" qualifiers="const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="cache_index" type="int" /> <param index="1" name="size" type="int" /> <description> @@ -210,7 +210,7 @@ <return type="bool" /> <param index="0" name="language" type="String" /> <description> - Returns [code]true[/code] if support override is enabled for the [code]language[/code]. + Returns [code]true[/code] if support override is enabled for the [param language]. </description> </method> <method name="get_language_support_overrides" qualifiers="const"> @@ -223,7 +223,7 @@ <return type="bool" /> <param index="0" name="script" type="String" /> <description> - Returns [code]true[/code] if support override is enabled for the [code]script[/code]. + Returns [code]true[/code] if support override is enabled for the [param script]. </description> </method> <method name="get_script_support_overrides" qualifiers="const"> @@ -233,7 +233,7 @@ </description> </method> <method name="get_size_cache_list" qualifiers="const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="cache_index" type="int" /> <description> Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. @@ -283,7 +283,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [code]path[/code]. + Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [param path]. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. </description> </method> @@ -291,7 +291,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [code]path[/code]. + Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [param path]. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the [code]user://[/code] directory. </description> </method> diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml index 30cb732751..6aa381c2de 100644 --- a/doc/classes/FontVariation.xml +++ b/doc/classes/FontVariation.xml @@ -32,7 +32,7 @@ <param index="0" name="spacing" type="int" enum="TextServer.SpacingType" /> <param index="1" name="value" type="int" /> <description> - Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size). </description> </method> </methods> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 7c2966bd4f..606d2456c5 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -26,7 +26,7 @@ <param index="3" name="custom" type="Color" /> <param index="4" name="flags" type="int" /> <description> - Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags]. + Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. </description> </method> <method name="restart"> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 4cd95f561f..fc7b12e64f 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -26,14 +26,14 @@ <param index="3" name="custom" type="Color" /> <param index="4" name="flags" type="int" /> <description> - Emits a single particle. Whether [code]xform[/code], [code]velocity[/code], [code]color[/code] and [code]custom[/code] are applied depends on the value of [code]flags[/code]. See [enum EmitFlags]. + Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. </description> </method> <method name="get_draw_pass_mesh" qualifiers="const"> <return type="Mesh" /> <param index="0" name="pass" type="int" /> <description> - Returns the [Mesh] that is drawn at index [code]pass[/code]. + Returns the [Mesh] that is drawn at index [param pass]. </description> </method> <method name="restart"> @@ -47,7 +47,7 @@ <param index="0" name="pass" type="int" /> <param index="1" name="mesh" type="Mesh" /> <description> - Sets the [Mesh] that is drawn at index [code]pass[/code]. + Sets the [Mesh] that is drawn at index [param pass]. </description> </method> </methods> diff --git a/doc/classes/GPUParticlesCollision3D.xml b/doc/classes/GPUParticlesCollision3D.xml index 435f9781f0..27e3590e75 100644 --- a/doc/classes/GPUParticlesCollision3D.xml +++ b/doc/classes/GPUParticlesCollision3D.xml @@ -7,7 +7,7 @@ Particle collision shapes can be used to make particles stop or bounce against them. Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is [i]not[/i] supported. Particle collision shapes can be temporarily disabled by hiding them. - [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. [b]Note:[/b] Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting [member GPUParticles3D.fixed_fps] to [code]0[/code] or a value that matches or exceeds the target framerate. </description> @@ -15,7 +15,7 @@ </tutorials> <members> <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> - The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_enabled] set to [code]true[/code] will be affected by a collision shape. + The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticlesMaterial.collision_mode] set to [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] will be affected by a collision shape. After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. Particle attraction can also be disabled on a per-process material basis by setting [member ParticlesMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. </member> diff --git a/doc/classes/GPUParticlesCollisionBox3D.xml b/doc/classes/GPUParticlesCollisionBox3D.xml index 60d66ca682..65b69c0098 100644 --- a/doc/classes/GPUParticlesCollisionBox3D.xml +++ b/doc/classes/GPUParticlesCollisionBox3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. - [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> diff --git a/doc/classes/GPUParticlesCollisionHeightField3D.xml b/doc/classes/GPUParticlesCollisionHeightField3D.xml index 3fcad43efb..72d273112e 100644 --- a/doc/classes/GPUParticlesCollisionHeightField3D.xml +++ b/doc/classes/GPUParticlesCollisionHeightField3D.xml @@ -7,7 +7,7 @@ Real-time heightmap-shaped 3D particle attractor affecting [GPUParticles3D] nodes. Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than [GPUParticlesCollisionSDF3D], but it doesn't require a baking step. [GPUParticlesCollisionHeightField3D] can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes [GPUParticlesCollisionHeightField3D] a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, [GPUParticlesCollisionHeightField3D] is not suited for indoor particle collision. - [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> diff --git a/doc/classes/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml index 1a530b2561..0e7640ba89 100644 --- a/doc/classes/GPUParticlesCollisionSDF3D.xml +++ b/doc/classes/GPUParticlesCollisionSDF3D.xml @@ -8,7 +8,7 @@ Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than [GPUParticlesCollisionHeightField3D], but it requires a baking step. [b]Baking:[/b] The signed distance field texture can be baked by selecting the [GPUParticlesCollisionSDF3D] node in the editor, then clicking [b]Bake SDF[/b] at the top of the 3D viewport. Any [i]visible[/i] [MeshInstance3D]s touching the [member extents] will be taken into account for baking, regardless of their [member GeometryInstance3D.gi_mode]. [b]Note:[/b] Baking a [GPUParticlesCollisionSDF3D]'s [member texture] is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked [Texture3D]s into its [member texture] property in an exported project. - [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> @@ -18,7 +18,7 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="set_bake_mask_value"> @@ -26,7 +26,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/GPUParticlesCollisionSphere3D.xml b/doc/classes/GPUParticlesCollisionSphere3D.xml index 6651a732da..bfebe05005 100644 --- a/doc/classes/GPUParticlesCollisionSphere3D.xml +++ b/doc/classes/GPUParticlesCollisionSphere3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. - [b]Note:[/b] [member ParticlesMaterial.collision_enabled] must be [code]true[/code] on the [GPUParticles3D]'s process material for collision to work. + [b]Note:[/b] [member ParticlesMaterial.collision_mode] must be [constant ParticlesMaterial.COLLISION_RIGID] or [constant ParticlesMaterial.COLLISION_HIDE_ON_CONTACT] on the [GPUParticles3D]'s process material for collision to work. [b]Note:[/b] Particle collision only affects [GPUParticles3D], not [CPUParticles3D]. </description> <tutorials> diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml index 5eec089a6f..e6058b1bf9 100644 --- a/doc/classes/Generic6DOFJoint3D.xml +++ b/doc/classes/Generic6DOFJoint3D.xml @@ -102,7 +102,7 @@ <member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> The maximum amount of force that can occur, when rotating around the X axis. </member> - <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x" default="0.0"> + <member name="angular_limit_x/lower_angle" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> The minimum rotation in negative direction to break loose and rotate around the X axis. </member> <member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> @@ -111,7 +111,7 @@ <member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.5"> The speed of all rotations across the X axis. </member> - <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x" default="0.0"> + <member name="angular_limit_x/upper_angle" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> The minimum rotation in positive direction to break loose and rotate around the X axis. </member> <member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0"> @@ -126,7 +126,7 @@ <member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> The maximum amount of force that can occur, when rotating around the Y axis. </member> - <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y" default="0.0"> + <member name="angular_limit_y/lower_angle" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> The minimum rotation in negative direction to break loose and rotate around the Y axis. </member> <member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> @@ -135,7 +135,7 @@ <member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.5"> The speed of all rotations across the Y axis. </member> - <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y" default="0.0"> + <member name="angular_limit_y/upper_angle" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> The minimum rotation in positive direction to break loose and rotate around the Y axis. </member> <member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0"> @@ -150,7 +150,7 @@ <member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> The maximum amount of force that can occur, when rotating around the Z axis. </member> - <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z" default="0.0"> + <member name="angular_limit_z/lower_angle" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> The minimum rotation in negative direction to break loose and rotate around the Z axis. </member> <member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> @@ -159,7 +159,7 @@ <member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.5"> The speed of all rotations across the Z axis. </member> - <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z" default="0.0"> + <member name="angular_limit_z/upper_angle" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> The minimum rotation in positive direction to break loose and rotate around the Z axis. </member> <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false"> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 0926f0acfe..392ca2cabb 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -10,20 +10,20 @@ </tutorials> <methods> <method name="clip_polygons"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polygon_a" type="PackedVector2Array" /> <param index="1" name="polygon_b" type="PackedVector2Array" /> <description> - Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code]. - If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise]. + Clips [param polygon_a] against [param polygon_b] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [param polygon_b] completely overlaps [param polygon_a]. + If [param polygon_b] is enclosed by [param polygon_a], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="clip_polyline_with_polygon"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polyline" type="PackedVector2Array" /> <param index="1" name="polygon" type="PackedVector2Array" /> <description> - Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. + Clips [param polyline] against [param polygon] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. </description> </method> <method name="convex_hull"> @@ -34,11 +34,11 @@ </description> </method> <method name="exclude_polygons"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polygon_a" type="PackedVector2Array" /> <param index="1" name="polygon_b" type="PackedVector2Array" /> <description> - Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. + Mutually excludes common area defined by intersection of [param polygon_a] and [param polygon_b] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> @@ -48,7 +48,7 @@ <param index="1" name="s1" type="Vector2" /> <param index="2" name="s2" type="Vector2" /> <description> - Returns the 2D point on the 2D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. + Returns the 2D point on the 2D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_uncapped"> @@ -57,7 +57,7 @@ <param index="1" name="s1" type="Vector2" /> <param index="2" name="s2" type="Vector2" /> <description> - Returns the 2D point on the 2D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. + Returns the 2D point on the 2D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_points_between_segments"> @@ -67,24 +67,24 @@ <param index="2" name="p2" type="Vector2" /> <param index="3" name="q2" type="Vector2" /> <description> - Given the two 2D segments ([code]p1[/code], [code]q1[/code]) and ([code]p2[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]q1[/code]) as well the accompanying point on ([code]p2[/code], [code]q2[/code]). + Given the two 2D segments ([param p1], [param q1]) and ([param p2], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([param p1], [param q1]) as well the accompanying point on ([param p2], [param q2]). </description> </method> <method name="intersect_polygons"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polygon_a" type="PackedVector2Array" /> <param index="1" name="polygon_b" type="PackedVector2Array" /> <description> - Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. + Intersects [param polygon_a] with [param polygon_b] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="intersect_polyline_with_polygon"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polyline" type="PackedVector2Array" /> <param index="1" name="polygon" type="PackedVector2Array" /> <description> - Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. + Intersects [param polyline] with [param polygon] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. </description> </method> <method name="is_point_in_circle"> @@ -93,7 +93,7 @@ <param index="1" name="circle_position" type="Vector2" /> <param index="2" name="circle_radius" type="float" /> <description> - Returns [code]true[/code] if [code]point[/code] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns [code]false[/code]. + Returns [code]true[/code] if [param point] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns [code]false[/code]. </description> </method> <method name="is_point_in_polygon"> @@ -101,14 +101,14 @@ <param index="0" name="point" type="Vector2" /> <param index="1" name="polygon" type="PackedVector2Array" /> <description> - Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code]. + Returns [code]true[/code] if [param point] is inside [param polygon] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code]. </description> </method> <method name="is_polygon_clockwise"> <return type="bool" /> <param index="0" name="polygon" type="PackedVector2Array" /> <description> - Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. + Returns [code]true[/code] if [param polygon]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. </description> </method> <method name="line_intersects_line"> @@ -118,7 +118,7 @@ <param index="2" name="from_b" type="Vector2" /> <param index="3" name="dir_b" type="Vector2" /> <description> - Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. + Checks if the two lines ([param from_a], [param dir_a]) and ([param from_b], [param dir_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. [b]Note:[/b] The lines are specified using direction vectors, not end points. </description> </method> @@ -130,22 +130,22 @@ </description> </method> <method name="merge_polygons"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polygon_a" type="PackedVector2Array" /> <param index="1" name="polygon_b" type="PackedVector2Array" /> <description> - Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. + Merges (combines) [param polygon_a] and [param polygon_b] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="offset_polygon"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polygon" type="PackedVector2Array" /> <param index="1" name="delta" type="float" /> <param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" /> <description> - Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. - Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType]. + Inflates or deflates [param polygon] by [param delta] units (pixels). If [param delta] is positive, makes the polygon grow outward. If [param delta] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [param delta] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. + Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType]. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. [b]Note:[/b] To translate the polygon's vertices specifically, multiply them to a [Transform2D]: [codeblocks] @@ -166,15 +166,15 @@ </description> </method> <method name="offset_polyline"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="polyline" type="PackedVector2Array" /> <param index="1" name="delta" type="float" /> <param index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" /> <param index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3" /> <description> - Inflates or deflates [code]polyline[/code] by [code]delta[/code] units (pixels), producing polygons. If [code]delta[/code] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [code]delta[/code] is negative, returns an empty array. - Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType]. - Each polygon's endpoints will be rounded as determined by [code]end_type[/code], see [enum PolyEndType]. + Inflates or deflates [param polyline] by [param delta] units (pixels), producing polygons. If [param delta] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [param delta] is negative, returns an empty array. + Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType]. + Each polygon's endpoints will be rounded as determined by [param end_type], see [enum PolyEndType]. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> @@ -185,7 +185,7 @@ <param index="2" name="b" type="Vector2" /> <param index="3" name="c" type="Vector2" /> <description> - Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. + Returns if [param point] is inside the triangle specified by [param a], [param b] and [param c]. </description> </method> <method name="segment_intersects_circle"> @@ -195,7 +195,7 @@ <param index="2" name="circle_position" type="Vector2" /> <param index="3" name="circle_radius" type="float" /> <description> - Given the 2D segment ([code]segment_from[/code], [code]segment_to[/code]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [code]circle_position[/code] and has radius [code]circle_radius[/code]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + Given the 2D segment ([param segment_from], [param segment_to]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [param circle_position] and has radius [param circle_radius]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). </description> </method> <method name="segment_intersects_segment"> @@ -205,21 +205,21 @@ <param index="2" name="from_b" type="Vector2" /> <param index="3" name="to_b" type="Vector2" /> <description> - Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. + Checks if the two segments ([param from_a], [param to_a]) and ([param from_b], [param to_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns [code]null[/code]. </description> </method> <method name="triangulate_delaunay"> <return type="PackedInt32Array" /> <param index="0" name="points" type="PackedVector2Array" /> <description> - Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. + Triangulates the area specified by discrete set of [param points] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param points] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> <method name="triangulate_polygon"> <return type="PackedInt32Array" /> <param index="0" name="polygon" type="PackedVector2Array" /> <description> - Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned. + Triangulates the polygon specified by the points in [param polygon]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param polygon] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> </methods> diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml index 654c499c97..d37b0b7b81 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -10,31 +10,31 @@ </tutorials> <methods> <method name="build_box_planes"> - <return type="Array" /> + <return type="Plane[]" /> <param index="0" name="extents" type="Vector3" /> <description> - Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size). + Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [param extents], which represents one (positive) corner of the box (i.e. half its actual size). </description> </method> <method name="build_capsule_planes"> - <return type="Array" /> + <return type="Plane[]" /> <param index="0" name="radius" type="float" /> <param index="1" name="height" type="float" /> <param index="2" name="sides" type="int" /> <param index="3" name="lats" type="int" /> <param index="4" name="axis" type="int" enum="Vector3.Axis" default="2" /> <description> - Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). + Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the side part of the capsule, whereas [param lats] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [param axis] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). </description> </method> <method name="build_cylinder_planes"> - <return type="Array" /> + <return type="Plane[]" /> <param index="0" name="radius" type="float" /> <param index="1" name="height" type="float" /> <param index="2" name="sides" type="int" /> <param index="3" name="axis" type="int" enum="Vector3.Axis" default="2" /> <description> - Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). + Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the round part of the cylinder. The parameter [param axis] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). </description> </method> <method name="clip_polygon"> @@ -42,7 +42,7 @@ <param index="0" name="points" type="PackedVector3Array" /> <param index="1" name="plane" type="Plane" /> <description> - Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon. + Clips the polygon defined by the points in [param points] against the [param plane] and returns the points of the clipped polygon. </description> </method> <method name="get_closest_point_to_segment"> @@ -51,7 +51,7 @@ <param index="1" name="s1" type="Vector3" /> <param index="2" name="s2" type="Vector3" /> <description> - Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. + Returns the 3D point on the 3D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_uncapped"> @@ -60,7 +60,7 @@ <param index="1" name="s1" type="Vector3" /> <param index="2" name="s2" type="Vector3" /> <description> - Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. + Returns the 3D point on the 3D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_points_between_segments"> @@ -70,7 +70,7 @@ <param index="2" name="q1" type="Vector3" /> <param index="3" name="q2" type="Vector3" /> <description> - Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). + Given the two 3D segments ([param p1], [param p2]) and ([param q1], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([param p1], [param p2]) as well the accompanying point on ([param q1], [param q2]). </description> </method> <method name="ray_intersects_triangle"> @@ -81,7 +81,7 @@ <param index="3" name="b" type="Vector3" /> <param index="4" name="c" type="Vector3" /> <description> - Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. + Tests if the 3D ray starting at [param from] with the direction of [param dir] intersects the triangle specified by [param a], [param b] and [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. </description> </method> <method name="segment_intersects_convex"> @@ -90,7 +90,7 @@ <param index="1" name="to" type="Vector3" /> <param index="2" name="planes" type="Array" /> <description> - Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array. + Given a convex hull defined though the [Plane]s in the array [param planes], tests if the segment ([param from], [param to]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array. </description> </method> <method name="segment_intersects_cylinder"> @@ -100,7 +100,7 @@ <param index="2" name="height" type="float" /> <param index="3" name="radius" type="float" /> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. + Checks if the segment ([param from], [param to]) intersects the cylinder with height [param height] that is centered at the origin and has radius [param radius]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. </description> </method> <method name="segment_intersects_sphere"> @@ -110,7 +110,7 @@ <param index="2" name="sphere_position" type="Vector3" /> <param index="3" name="sphere_radius" type="float" /> <description> - Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. + Checks if the segment ([param from], [param to]) intersects the sphere that is located at [param sphere_position] and has radius [param sphere_radius]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. </description> </method> <method name="segment_intersects_triangle"> @@ -121,7 +121,7 @@ <param index="3" name="b" type="Vector3" /> <param index="4" name="c" type="Vector3" /> <description> - Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. + Tests if the segment ([param from], [param to]) intersects the triangle [param a], [param b], [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns [code]null[/code]. </description> </method> </methods> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index bf64feedda..f081174b67 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -22,14 +22,14 @@ <return type="Color" /> <param index="0" name="point" type="int" /> <description> - Returns the color of the gradient color at index [code]point[/code]. + Returns the color of the gradient color at index [param point]. </description> </method> <method name="get_offset"> <return type="float" /> <param index="0" name="point" type="int" /> <description> - Returns the offset of the gradient color at index [code]point[/code]. + Returns the offset of the gradient color at index [param point]. </description> </method> <method name="get_point_count" qualifiers="const"> @@ -42,14 +42,14 @@ <return type="Color" /> <param index="0" name="offset" type="float" /> <description> - Returns the interpolated color specified by [code]offset[/code]. + Returns the interpolated color specified by [param offset]. </description> </method> <method name="remove_point"> <return type="void" /> <param index="0" name="point" type="int" /> <description> - Removes the color at the index [code]point[/code]. + Removes the color at the index [param point]. </description> </method> <method name="reverse"> @@ -63,7 +63,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="color" type="Color" /> <description> - Sets the color of the gradient color at index [code]point[/code]. + Sets the color of the gradient color at index [param point]. </description> </method> <method name="set_offset"> @@ -71,7 +71,7 @@ <param index="0" name="point" type="int" /> <param index="1" name="offset" type="float" /> <description> - Sets the offset for the gradient color at index [code]point[/code]. + Sets the offset for the gradient color at index [param point]. </description> </method> </methods> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index d257e990f7..e5aa78971e 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -24,8 +24,8 @@ <param index="1" name="slot_index" type="int" /> <param index="2" name="mouse_position" type="Vector2" /> <description> - Returns whether the [code]mouse_position[/code] is in the input hot zone. - By default, a hot zone is a [Rect2] positioned such that its center is at [code]graph_node[/code].[method GraphNode.get_connection_input_position]([code]slot_index[/code]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code]. + Returns whether the [param mouse_position] is in the input hot zone. + By default, a hot zone is a [Rect2] positioned such that its center is at [param graph_node].[method GraphNode.get_connection_input_position]([param slot_index]) (For output's case, call [method GraphNode.get_connection_output_position] instead). The hot zone's width is twice the Theme Property [code]port_grab_distance_horizontal[/code], and its height is twice the [code]port_grab_distance_vertical[/code]. Below is a sample code to help get started: [codeblock] func _is_in_input_hotzone(graph_node, slot_index, mouse_position): @@ -43,7 +43,7 @@ <param index="1" name="slot_index" type="int" /> <param index="2" name="mouse_position" type="Vector2" /> <description> - Returns whether the [code]mouse_position[/code] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone]. + Returns whether the [param mouse_position] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone]. Below is a sample code to help get started: [codeblock] func _is_in_output_hotzone(graph_node, slot_index, mouse_position): @@ -119,7 +119,7 @@ <param index="2" name="to" type="StringName" /> <param index="3" name="to_port" type="int" /> <description> - Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created. + Create a connection between the [param from_port] slot of the [param from] GraphNode and the [param to_port] slot of the [param to] GraphNode. If the connection already exists, no connection is created. </description> </method> <method name="disconnect_node"> @@ -129,7 +129,7 @@ <param index="2" name="to" type="StringName" /> <param index="3" name="to_port" type="int" /> <description> - Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed. + Removes the connection between the [param from_port] slot of the [param from] GraphNode and the [param to_port] slot of the [param to] GraphNode. If the connection does not exist, no connection is removed. </description> </method> <method name="force_connection_drag_end"> @@ -145,11 +145,11 @@ <param index="0" name="from" type="Vector2" /> <param index="1" name="to" type="Vector2" /> <description> - Returns the points which would make up a connection between [code]from[/code] and [code]to[/code]. + Returns the points which would make up a connection between [param from] and [param to]. </description> </method> <method name="get_connection_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code]. </description> @@ -168,7 +168,7 @@ <param index="2" name="to" type="StringName" /> <param index="3" name="to_port" type="int" /> <description> - Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode. + Returns [code]true[/code] if the [param from_port] slot of the [param from] GraphNode is connected to the [param to_port] slot of the [param to] GraphNode. </description> </method> <method name="is_valid_connection_type" qualifiers="const"> @@ -209,14 +209,14 @@ <param index="3" name="to_port" type="int" /> <param index="4" name="amount" type="float" /> <description> - Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [theme_item activity] theme property. + Sets the coloration of the connection between [param from]'s [param from_port] and [param to]'s [param to_port] with the color provided in the [theme_item activity] theme property. </description> </method> <method name="set_selected"> <return type="void" /> <param index="0" name="node" type="Node" /> <description> - Sets the specified [code]node[/code] as the one selected. + Sets the specified [param node] as the one selected. </description> </method> </methods> @@ -285,7 +285,7 @@ </signal> <signal name="connection_drag_started"> <param index="0" name="from" type="String" /> - <param index="1" name="slot" type="String" /> + <param index="1" name="slot" type="int" /> <param index="2" name="is_output" type="bool" /> <description> Emitted at the beginning of a connection drag. @@ -305,7 +305,7 @@ <param index="2" name="to" type="StringName" /> <param index="3" name="to_slot" type="int" /> <description> - Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. + Emitted to the GraphEdit when the connection between the [param from_slot] slot of the [param from] GraphNode and the [param to_slot] slot of the [param to] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> @@ -333,7 +333,7 @@ <param index="2" name="to" type="StringName" /> <param index="3" name="to_slot" type="int" /> <description> - Emitted to the GraphEdit when the connection between [code]from_slot[/code] slot of [code]from[/code] GraphNode and [code]to_slot[/code] slot of [code]to[/code] GraphNode is attempted to be removed. + Emitted to the GraphEdit when the connection between [param from_slot] slot of [param from] GraphNode and [param to_slot] slot of [param to] GraphNode is attempted to be removed. </description> </signal> <signal name="duplicate_nodes_request"> @@ -365,7 +365,7 @@ <signal name="popup_request"> <param index="0" name="position" type="Vector2" /> <description> - Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [code]position[/code] is the position of the mouse pointer when the signal is sent. + Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [param position] is the position of the mouse pointer when the signal is sent. </description> </signal> <signal name="scroll_offset_changed"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 435c6dae14..009c329ee2 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -21,14 +21,14 @@ <return type="void" /> <param index="0" name="idx" type="int" /> <description> - Disables input and output slot whose index is [code]idx[/code]. + Disables input and output slot whose index is [param idx]. </description> </method> <method name="get_connection_input_color"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the [Color] of the input connection [code]idx[/code]. + Returns the [Color] of the input connection [param idx]. </description> </method> <method name="get_connection_input_count"> @@ -41,28 +41,28 @@ <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the height of the input connection [code]idx[/code]. + Returns the height of the input connection [param idx]. </description> </method> <method name="get_connection_input_position"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the input connection [code]idx[/code]. + Returns the position of the input connection [param idx]. </description> </method> <method name="get_connection_input_type"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the type of the input connection [code]idx[/code]. + Returns the type of the input connection [param idx]. </description> </method> <method name="get_connection_output_color"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the [Color] of the output connection [code]idx[/code]. + Returns the [Color] of the output connection [param idx]. </description> </method> <method name="get_connection_output_count"> @@ -75,70 +75,70 @@ <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the height of the output connection [code]idx[/code]. + Returns the height of the output connection [param idx]. </description> </method> <method name="get_connection_output_position"> <return type="Vector2" /> <param index="0" name="idx" type="int" /> <description> - Returns the position of the output connection [code]idx[/code]. + Returns the position of the output connection [param idx]. </description> </method> <method name="get_connection_output_type"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the type of the output connection [code]idx[/code]. + Returns the type of the output connection [param idx]. </description> </method> <method name="get_slot_color_left" qualifiers="const"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the left (input) [Color] of the slot [code]idx[/code]. + Returns the left (input) [Color] of the slot [param idx]. </description> </method> <method name="get_slot_color_right" qualifiers="const"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the right (output) [Color] of the slot [code]idx[/code]. + Returns the right (output) [Color] of the slot [param idx]. </description> </method> <method name="get_slot_type_left" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the left (input) type of the slot [code]idx[/code]. + Returns the left (input) type of the slot [param idx]. </description> </method> <method name="get_slot_type_right" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the right (output) type of the slot [code]idx[/code]. + Returns the right (output) type of the slot [param idx]. </description> </method> <method name="is_slot_draw_stylebox" qualifiers="const"> <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns true if the background [StyleBox] of the slot [code]idx[/code] is drawn. + Returns true if the background [StyleBox] of the slot [param idx] is drawn. </description> </method> <method name="is_slot_enabled_left" qualifiers="const"> <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled. + Returns [code]true[/code] if left (input) side of the slot [param idx] is enabled. </description> </method> <method name="is_slot_enabled_right" qualifiers="const"> <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled. + Returns [code]true[/code] if right (output) side of the slot [param idx] is enabled. </description> </method> <method name="set_slot"> @@ -154,11 +154,11 @@ <param index="8" name="custom_right" type="Texture2D" default="null" /> <param index="9" name="enable" type="bool" default="true" /> <description> - Sets properties of the slot with ID [code]idx[/code]. - If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. - [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. - [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. - [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. + Sets properties of the slot with ID [param idx]. + If [param enable_left]/[param enable_right], a port will appear and the slot will be able to be connected from this side. + [param type_left]/[param type_right] is an arbitrary type of the port. Only ports with the same type values can be connected. + [param color_left]/[param color_right] is the tint of the port's icon on this side. + [param custom_left]/[param custom_right] is a custom texture for this side's port. [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. Individual properties can be set using one of the [code]set_slot_*[/code] methods. You must enable at least one side of the slot to do so. </description> @@ -168,7 +168,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="color_left" type="Color" /> <description> - Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code]. + Sets the [Color] of the left (input) side of the slot [param idx] to [param color_left]. </description> </method> <method name="set_slot_color_right"> @@ -176,7 +176,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="color_right" type="Color" /> <description> - Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. + Sets the [Color] of the right (output) side of the slot [param idx] to [param color_right]. </description> </method> <method name="set_slot_draw_stylebox"> @@ -184,7 +184,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="draw_stylebox" type="bool" /> <description> - Toggles the background [StyleBox] of the slot [code]idx[/code]. + Toggles the background [StyleBox] of the slot [param idx]. </description> </method> <method name="set_slot_enabled_left"> @@ -192,7 +192,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="enable_left" type="bool" /> <description> - Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side. + Toggles the left (input) side of the slot [param idx]. If [param enable_left] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side. </description> </method> <method name="set_slot_enabled_right"> @@ -200,7 +200,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="enable_right" type="bool" /> <description> - Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side. + Toggles the right (output) side of the slot [param idx]. If [param enable_right] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side. </description> </method> <method name="set_slot_type_left"> @@ -208,7 +208,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="type_left" type="int" /> <description> - Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code]. + Sets the left (input) type of the slot [param idx] to [param type_left]. </description> </method> <method name="set_slot_type_right"> @@ -216,7 +216,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="type_right" type="int" /> <description> - Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code]. + Sets the right (output) type of the slot [param idx] to [param type_right]. </description> </method> </methods> diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index d033738e52..52d4fce28f 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -72,7 +72,7 @@ <return type="int" enum="Error" /> <param index="0" name="data" type="PackedByteArray" /> <description> - Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called. + Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [param data] to the message, but cannot be called until [method start] has been called. </description> </method> </methods> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 645f328be0..97178bc94d 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -35,8 +35,8 @@ <description> Connects to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. - If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled). - [code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code]. + If no [param port] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [param use_ssl] is enabled). + [param verify_host] will check the SSL identity of the host if set to [code]true[/code]. </description> </method> <method name="get_response_body_length" qualifiers="const"> @@ -158,7 +158,7 @@ var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString); [/csharp] [/codeblocks] - [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. + [b]Note:[/b] The [param body] parameter is ignored if [param method] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. </description> </method> <method name="request_raw"> @@ -180,7 +180,7 @@ <param index="1" name="port" type="int" /> <description> Sets the proxy server for HTTP requests. - The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1. + The proxy server is unset if [param host] is empty or [param port] is -1. </description> </method> <method name="set_https_proxy"> @@ -189,7 +189,7 @@ <param index="1" name="port" type="int" /> <description> Sets the proxy server for HTTPS requests. - The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1. + The proxy server is unset if [param host] is empty or [param port] is -1. </description> </method> </methods> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 2307cf149d..4b098bf585 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -176,7 +176,7 @@ <method name="get_downloaded_bytes" qualifiers="const"> <return type="int" /> <description> - Returns the amount of bytes this HTTPRequest downloaded. + Returns the number of bytes this HTTPRequest downloaded. </description> </method> <method name="get_http_client_status" qualifiers="const"> @@ -195,7 +195,7 @@ <description> Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. - [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). + [b]Note:[/b] When [param method] is [constant HTTPClient.METHOD_GET], the payload sent via [param request_data] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. </description> </method> @@ -217,7 +217,7 @@ <param index="1" name="port" type="int" /> <description> Sets the proxy server for HTTP requests. - The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1. + The proxy server is unset if [param host] is empty or [param port] is -1. </description> </method> <method name="set_https_proxy"> @@ -226,7 +226,7 @@ <param index="1" name="port" type="int" /> <description> Sets the proxy server for HTTPS requests. - The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1. + The proxy server is unset if [param host] is empty or [param port] is -1. </description> </method> </methods> diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index ea973043db..6e3092e618 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -71,14 +71,14 @@ <return type="int" enum="Error" /> <param index="0" name="type" type="int" enum="HashingContext.HashType" /> <description> - Starts a new hash computation of the given [code]type[/code] (e.g. [constant HASH_SHA256] to start computation of a SHA-256). + Starts a new hash computation of the given [param type] (e.g. [constant HASH_SHA256] to start computation of a SHA-256). </description> </method> <method name="update"> <return type="int" enum="Error" /> <param index="0" name="chunk" type="PackedByteArray" /> <description> - Updates the computation with the given [code]chunk[/code] of data. + Updates the computation with the given [param chunk] of data. </description> </method> </methods> diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml index d2547434e7..99524795f9 100644 --- a/doc/classes/HingeJoint3D.xml +++ b/doc/classes/HingeJoint3D.xml @@ -47,7 +47,7 @@ <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </member> - <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit" default="-90.0"> + <member name="angular_limit/lower" type="float" setter="set_param" getter="get_param" default="-1.5708"> The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </member> <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0"> @@ -55,7 +55,7 @@ </member> <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9"> </member> - <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit" default="90.0"> + <member name="angular_limit/upper" type="float" setter="set_param" getter="get_param" default="1.5708"> The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </member> <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" default="false"> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index 63de1f8081..1e5e6da513 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -13,24 +13,24 @@ <return type="void" /> <param index="0" name="hostname" type="String" default="""" /> <description> - Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed. + Removes all of a [param hostname]'s cached references. If no [param hostname] is given, all cached IP addresses are removed. </description> </method> <method name="erase_resolve_item"> <return type="void" /> <param index="0" name="id" type="int" /> <description> - Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen. + Removes a given item [param id] from the queue. This should be used to free a queue after it has completed to enable more queries to happen. </description> </method> <method name="get_local_addresses" qualifiers="const"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Returns all the user's current IPv4 and IPv6 addresses as an array. </description> </method> <method name="get_local_interfaces" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns all network adapters as an array. Each adapter is a dictionary of the form: @@ -48,7 +48,7 @@ <return type="String" /> <param index="0" name="id" type="int" /> <description> - Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). + Returns a queued hostname's IP address, given its queue [param id]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_addresses" qualifiers="const"> @@ -62,7 +62,7 @@ <return type="int" enum="IP.ResolverStatus" /> <param index="0" name="id" type="int" /> <description> - Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code]. + Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [param id]. </description> </method> <method name="resolve_hostname"> @@ -70,15 +70,15 @@ <param index="0" name="host" type="String" /> <param index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [param ip_type]. </description> </method> <method name="resolve_hostname_addresses"> - <return type="Array" /> + <return type="PackedStringArray" /> <param index="0" name="host" type="String" /> <param index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> - Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code]. + Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [param ip_type]. </description> </method> <method name="resolve_hostname_queue_item"> @@ -86,7 +86,7 @@ <param index="0" name="host" type="String" /> <param index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [param ip_type]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. </description> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 94fb8fbb19..b138a55ea3 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -26,7 +26,7 @@ <param index="1" name="src_rect" type="Rect2i" /> <param index="2" name="dst" type="Vector2i" /> <description> - Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty. + Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with not positive size is treated as empty. </description> </method> <method name="blend_rect_mask"> @@ -36,7 +36,7 @@ <param index="2" name="src_rect" type="Rect2i" /> <param index="3" name="dst" type="Vector2i" /> <description> - Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code], clipped accordingly to both image bounds. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty. + Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with not positive size is treated as empty. </description> </method> <method name="blit_rect"> @@ -45,7 +45,7 @@ <param index="1" name="src_rect" type="Rect2i" /> <param index="2" name="dst" type="Vector2i" /> <description> - Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code], clipped accordingly to both image bounds. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src_rect[/code] with not positive size is treated as empty. + Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with not positive size is treated as empty. </description> </method> <method name="blit_rect_mask"> @@ -55,7 +55,7 @@ <param index="2" name="src_rect" type="Rect2i" /> <param index="3" name="dst" type="Vector2i" /> <description> - Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code], clipped accordingly to both image bounds. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. This image and [code]src[/code] image [b]must[/b] have the same format. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. [code]src_rect[/code] with not positive size is treated as empty. + Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with not positive size is treated as empty. </description> </method> <method name="bump_map_to_normal_map"> @@ -108,7 +108,7 @@ <return type="void" /> <param index="0" name="src" type="Image" /> <description> - Copies [code]src[/code] image to this image. + Copies [param src] image to this image. </description> </method> <method name="create"> @@ -118,7 +118,7 @@ <param index="2" name="use_mipmaps" type="bool" /> <param index="3" name="format" type="int" enum="Image.Format" /> <description> - Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> @@ -129,7 +129,7 @@ <param index="3" name="format" type="int" enum="Image.Format" /> <param index="4" name="data" type="PackedByteArray" /> <description> - Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then loads mipmaps for this image from [code]data[/code]. See [method generate_mipmaps]. + Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [param use_mipmaps] is [code]true[/code] then loads mipmaps for this image from [param data]. See [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -137,7 +137,7 @@ <param index="0" name="width" type="int" /> <param index="1" name="height" type="int" /> <description> - Crops the image to the given [code]width[/code] and [code]height[/code]. If the specified size is larger than the current size, the extra area is filled with black pixels. + Crops the image to the given [param width] and [param height]. If the specified size is larger than the current size, the extra area is filled with black pixels. </description> </method> <method name="decompress"> @@ -163,7 +163,7 @@ <return type="void" /> <param index="0" name="color" type="Color" /> <description> - Fills the image with [code]color[/code]. + Fills the image with [param color]. </description> </method> <method name="fill_rect"> @@ -171,7 +171,7 @@ <param index="0" name="rect" type="Rect2i" /> <param index="1" name="color" type="Color" /> <description> - Fills [code]rect[/code] with [code]color[/code]. + Fills [param rect] with [param color]. </description> </method> <method name="fix_alpha_edges"> @@ -222,7 +222,7 @@ <return type="int" /> <param index="0" name="mipmap" type="int" /> <description> - Returns the offset where the image's mipmap with index [code]mipmap[/code] is stored in the [code]data[/code] dictionary. + Returns the offset where the image's mipmap with index [param mipmap] is stored in the [code]data[/code] dictionary. </description> </method> <method name="get_pixel" qualifiers="const"> @@ -238,7 +238,7 @@ <return type="Color" /> <param index="0" name="point" type="Vector2i" /> <description> - Returns the color of the pixel at [code]point[/code]. + Returns the color of the pixel at [param point]. This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments. </description> </method> @@ -246,7 +246,7 @@ <return type="Image" /> <param index="0" name="rect" type="Rect2i" /> <description> - Returns a new image that is a copy of the image's area specified with [code]rect[/code]. + Returns a new image that is a copy of the image's area specified with [param rect]. </description> </method> <method name="get_size" qualifiers="const"> @@ -295,7 +295,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Loads an image from file [code]path[/code]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. + Loads an image from file [param path]. See [url=$DOCS_URL/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects. See also [ImageTexture] description for usage examples. </description> @@ -361,7 +361,7 @@ <param index="1" name="height" type="int" /> <param index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1" /> <description> - Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants. + Resizes the image to the given [param width] and [param height]. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants. </description> </method> <method name="resize_to_po2"> @@ -369,7 +369,7 @@ <param index="0" name="square" type="bool" default="false" /> <param index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1" /> <description> - Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants. + Resizes the image to the nearest power of 2 for the width and height. If [param square] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants. </description> </method> <method name="rgbe_to_srgb"> @@ -388,7 +388,7 @@ <return type="void" /> <param index="0" name="direction" type="int" enum="ClockDirection" /> <description> - Rotates the image in the specified [code]direction[/code] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized. + Rotates the image in the specified [param direction] by [code]90[/code] degrees. The width and height of the image must be greater than [code]1[/code]. If the width and height are not equal, the image will be resized. </description> </method> <method name="save_exr" qualifiers="const"> @@ -396,7 +396,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="grayscale" type="bool" default="false" /> <description> - Saves the image as an EXR file to [code]path[/code]. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. + Saves the image as an EXR file to [param path]. If [param grayscale] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project. </description> </method> @@ -404,7 +404,7 @@ <return type="PackedByteArray" /> <param index="0" name="grayscale" type="bool" default="false" /> <description> - Saves the image as an EXR file to a byte array. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. + Saves the image as an EXR file to a byte array. If [param grayscale] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project. </description> </method> @@ -413,7 +413,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="quality" type="float" default="0.75" /> <description> - Saves the image as a JPEG file to [code]path[/code] with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger file sizes. Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. + Saves the image as a JPEG file to [param path] with the specified [param quality] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [param quality] values result in better-looking output at the cost of larger file sizes. Recommended [param quality] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. </description> </method> @@ -421,7 +421,7 @@ <return type="PackedByteArray" /> <param index="0" name="quality" type="float" default="0.75" /> <description> - Saves the image as a JPEG file to a byte array with the specified [code]quality[/code] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [code]quality[/code] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [code]quality[/code] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. + Saves the image as a JPEG file to a byte array with the specified [param quality] between [code]0.01[/code] and [code]1.0[/code] (inclusive). Higher [param quality] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [param quality] values are between [code]0.75[/code] and [code]0.90[/code]. Even at quality [code]1.00[/code], JPEG compression remains lossy. [b]Note:[/b] JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. </description> </method> @@ -429,7 +429,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Saves the image as a PNG file to the file at [code]path[/code]. + Saves the image as a PNG file to the file at [param path]. </description> </method> <method name="save_png_to_buffer" qualifiers="const"> @@ -444,7 +444,7 @@ <param index="1" name="lossy" type="bool" default="false" /> <param index="2" name="quality" type="float" default="0.75" /> <description> - Saves the image as a WebP (Web Picture) file to the file at [code]path[/code]. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive). + Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). </description> </method> <method name="save_webp_to_buffer" qualifiers="const"> @@ -452,7 +452,7 @@ <param index="0" name="lossy" type="bool" default="false" /> <param index="1" name="quality" type="float" default="0.75" /> <description> - Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [code]lossy[/code] is true, the image will be saved lossy, using the [code]quality[/code] setting between 0.0 and 1.0 (inclusive). + Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). </description> </method> <method name="set_pixel"> @@ -461,7 +461,7 @@ <param index="1" name="y" type="int" /> <param index="2" name="color" type="Color" /> <description> - Sets the [Color] of the pixel at [code](x, y)[/code] to [code]color[/code]. Example: + Sets the [Color] of the pixel at [code](x, y)[/code] to [param color]. Example: [codeblocks] [gdscript] var img_width = 10 @@ -488,7 +488,7 @@ <param index="0" name="point" type="Vector2i" /> <param index="1" name="color" type="Color" /> <description> - Sets the [Color] of the pixel at [code]point[/code] to [code]color[/code]. Example: + Sets the [Color] of the pixel at [param point] to [param color]. Example: [codeblocks] [gdscript] var img_width = 10 diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index c750b540a4..45cbd7ac87 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -6,20 +6,20 @@ <description> A [Texture2D] based on an [Image]. For an image to be displayed, an [ImageTexture] has to be created from it using the [method create_from_image] method: [codeblock] - var image = Image.load_from_file("res://icon.png") + var image = Image.load_from_file("res://icon.svg") var texture = ImageTexture.create_from_image(image) $Sprite2D.texture = texture [/codeblock] This way, textures can be created at run-time by loading images both from within the editor and externally. [b]Warning:[/b] Prefer to load imported textures with [method @GDScript.load] over loading them from within the filesystem dynamically with [method Image.load], as it may not work in exported projects: [codeblock] - var texture = load("res://icon.png") + var texture = load("res://icon.svg") $Sprite2D.texture = texture [/codeblock] This is because images have to be imported as a [CompressedTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method. [b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image: [codeblock] - var texture = load("res://icon.png") + var texture = load("res://icon.svg") var image : Image = texture.get_image() [/codeblock] An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin]. diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml index 8afa35d1b4..e15cfcd2c0 100644 --- a/doc/classes/ImporterMesh.xml +++ b/doc/classes/ImporterMesh.xml @@ -29,8 +29,8 @@ <param index="6" name="flags" type="int" default="0" /> <description> Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays]. - Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. - The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. + Surfaces are created to be rendered using a [param primitive], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. + The [param arrays] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. </description> </method> <method name="clear"> @@ -45,7 +45,7 @@ <param index="1" name="normal_split_angle" type="float" /> <description> Generates all lods for this ImporterMesh. - [code]normal_merge_angle[/code] and [code]normal_split_angle[/code] are in degrees and used in the same way as the importer settings in [code]lods[/code]. As a good default, use 25 and 60 respectively. + [param normal_merge_angle] and [param normal_split_angle] are in degrees and used in the same way as the importer settings in [code]lods[/code]. As a good default, use 25 and 60 respectively. The number of generated lods can be accessed using [method get_surface_lod_count], and each LOD is available in [method get_surface_lod_size] and [method get_surface_lod_indices]. </description> </method> @@ -80,7 +80,7 @@ <description> Returns the mesh data represented by this [ImporterMesh] as a usable [ArrayMesh]. This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called. - If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated. + If not yet cached and [param base_mesh] is provided, [param base_mesh] will be used and mutated. </description> </method> <method name="get_surface_arrays" qualifiers="const"> @@ -101,7 +101,7 @@ <method name="get_surface_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of surfaces that the mesh holds. + Returns the number of surfaces that the mesh holds. </description> </method> <method name="get_surface_format" qualifiers="const"> @@ -115,7 +115,7 @@ <return type="int" /> <param index="0" name="surface_idx" type="int" /> <description> - Returns the amount of lods that the mesh holds on a given surface. + Returns the number of lods that the mesh holds on a given surface. </description> </method> <method name="get_surface_lod_indices" qualifiers="const"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index d4e2923610..90da000586 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -58,7 +58,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_action_strength" qualifiers="const"> @@ -67,7 +67,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_axis" qualifiers="const"> @@ -180,7 +180,7 @@ <description> Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Due to keyboard ghosting, [method is_action_just_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. </description> </method> @@ -190,7 +190,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_pressed" qualifiers="const"> @@ -199,7 +199,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. </description> </method> @@ -293,8 +293,8 @@ <param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" /> <description> Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. - [code]image[/code]'s size must be lower than 256×256. - [code]hotspot[/code] must be within [code]image[/code]'s size. + [param image]'s size must be lower than 256×256. + [param hotspot] must be within [param image]'s size. [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. [b]Note:[/b] Only images imported with the [b]Lossless[/b], [b]Lossy[/b] or [b]Uncompressed[/b] compression modes are supported. The [b]Video RAM[/b] compression mode can't be used for custom cursors. </description> @@ -339,7 +339,7 @@ <param index="2" name="strong_magnitude" type="float" /> <param index="3" name="duration" type="float" default="0" /> <description> - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. </description> </method> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 71e94cf1a2..043ccdca36 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -33,7 +33,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action" qualifiers="const"> @@ -42,7 +42,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if this input event matches a pre-defined action of any type. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_pressed" qualifiers="const"> @@ -51,8 +51,8 @@ <param index="1" name="allow_echo" type="bool" default="false" /> <param index="2" name="exact_match" type="bool" default="false" /> <description> - Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. [b]Note:[/b] Due to keyboard ghosting, [method is_action_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. </description> </method> @@ -62,7 +62,7 @@ <param index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_type" qualifiers="const"> @@ -82,8 +82,8 @@ <param index="0" name="event" type="InputEvent" /> <param index="1" name="exact_match" type="bool" default="true" /> <description> - Returns [code]true[/code] if the specified [code]event[/code] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + Returns [code]true[/code] if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_pressed" qualifiers="const"> @@ -98,7 +98,7 @@ <param index="0" name="xform" type="Transform2D" /> <param index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)" /> <description> - Returns a copy of the given input event which has been offset by [code]local_ofs[/code] and transformed by [code]xform[/code]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. + Returns a copy of the given input event which has been offset by [param local_ofs] and transformed by [param xform]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. </description> </method> </methods> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 8a58519a2b..1d7d54f681 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -41,7 +41,7 @@ </description> </method> <method name="action_get_events"> - <return type="Array" /> + <return type="InputEvent[]" /> <param index="0" name="action" type="StringName" /> <description> Returns an array of [InputEvent]s associated with a given action. @@ -69,7 +69,7 @@ <param index="0" name="action" type="StringName" /> <param index="1" name="deadzone" type="float" default="0.5" /> <description> - Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code]. + Adds an empty action to the [InputMap] with a configurable [param deadzone]. An [InputEvent] can then be added to this action with [method action_add_event]. </description> </method> @@ -87,11 +87,11 @@ <param index="2" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. - If [code]exact_match[/code] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_actions"> - <return type="Array" /> + <return type="StringName[]" /> <description> Returns an array of all actions in the [InputMap]. </description> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index 698ddcb021..c62d786d8f 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -30,7 +30,7 @@ <param index="0" name="with_order" type="bool" default="false" /> <description> Returns the list of properties that will be applied to the node when [method create_instance] is called. - If [code]with_order[/code] is [code]true[/code], a key named [code].order[/code] (note the leading period) is added to the dictionary. This [code].order[/code] key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first). + If [param with_order] is [code]true[/code], a key named [code].order[/code] (note the leading period) is added to the dictionary. This [code].order[/code] key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first). </description> </method> </methods> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 3375e5a758..75a0e1cef7 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -28,7 +28,7 @@ <param index="2" name="selectable" type="bool" default="true" /> <description> Adds an item to the item list with specified text. Returns the index of an added item. - Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. + Specify an [param icon], or use [code]null[/code] as the [param icon] for a list item with no icon. If selectable is [code]true[/code], the list item will be selectable. </description> </method> @@ -62,22 +62,22 @@ <param index="0" name="position" type="Vector2" /> <param index="1" name="exact" type="bool" default="false" /> <description> - Returns the item index at the given [code]position[/code]. - When there is no item at that point, -1 will be returned if [code]exact[/code] is [code]true[/code], and the closest item index will be returned otherwise. + Returns the item index at the given [param position]. + When there is no item at that point, -1 will be returned if [param exact] is [code]true[/code], and the closest item index will be returned otherwise. </description> </method> <method name="get_item_custom_bg_color" qualifiers="const"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the custom background color of the item specified by [code]idx[/code] index. + Returns the custom background color of the item specified by [param idx] index. </description> </method> <method name="get_item_custom_fg_color" qualifiers="const"> <return type="Color" /> <param index="0" name="idx" type="int" /> <description> - Returns the custom foreground color of the item specified by [code]idx[/code] index. + Returns the custom foreground color of the item specified by [param idx] index. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -195,14 +195,14 @@ <param index="0" name="from_idx" type="int" /> <param index="1" name="to_idx" type="int" /> <description> - Moves item from index [code]from_idx[/code] to [code]to_idx[/code]. + Moves item from index [param from_idx] to [param to_idx]. </description> </method> <method name="remove_item"> <return type="void" /> <param index="0" name="idx" type="int" /> <description> - Removes the item specified by [code]idx[/code] index from the list. + Removes the item specified by [param idx] index from the list. </description> </method> <method name="select"> @@ -219,7 +219,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="custom_bg_color" type="Color" /> <description> - Sets the background color of the item specified by [code]idx[/code] index to the specified [Color]. + Sets the background color of the item specified by [param idx] index to the specified [Color]. </description> </method> <method name="set_item_custom_fg_color"> @@ -227,7 +227,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="custom_fg_color" type="Color" /> <description> - Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color]. + Sets the foreground color of the item specified by [param idx] index to the specified [Color]. </description> </method> <method name="set_item_disabled"> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index 5d83c75417..46e46cc164 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -10,8 +10,7 @@ [b]Example[/b] [codeblock] var data_to_send = ["a", "b", "c"] - var json = JSON.new() - var json_string = json.stringify(data_to_send) + var json_string = JSON.stringify(data_to_send) # Save data # ... # Retrieve data @@ -25,6 +24,10 @@ else: print("JSON Parse Error: ", json.get_error_message(), " in ", json_string, " at line ", json.get_error_line()) [/codeblock] + Alternatively, you can parse string using the static [method parse_string] method, but it doesn't allow to handle errors. + [codeblock] + var data = JSON.parse_string(json_string) # Returns null if parsing failed. + [/codeblock] </description> <tutorials> </tutorials> @@ -52,11 +55,19 @@ <return type="int" enum="Error" /> <param index="0" name="json_string" type="String" /> <description> - Attempts to parse the [code]json_string[/code] provided. + Attempts to parse the [param json_string] provided. Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. + Non-static variant of [method parse_string], if you want custom error handling. + </description> + </method> + <method name="parse_string" qualifiers="static"> + <return type="Variant" /> + <param index="0" name="json_string" type="String" /> + <description> + Attempts to parse the [param json_string] provided and returns the parsed data. Returns [code]null[/code] if parse failed. </description> </method> - <method name="stringify"> + <method name="stringify" qualifiers="static"> <return type="String" /> <param index="0" name="data" type="Variant" /> <param index="1" name="indent" type="String" default="""" /> @@ -65,8 +76,8 @@ <description> Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. - [b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. - The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively. + [b]Note:[/b] If [param full_precision] is [code]true[/code], when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. + The [param indent] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively. [b]Example output:[/b] [codeblock] ## JSON.stringify(my_dictionary) diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml index e8fb208fef..8af4ed1f26 100644 --- a/doc/classes/JSONRPC.xml +++ b/doc/classes/JSONRPC.xml @@ -15,8 +15,8 @@ <param index="1" name="params" type="Variant" /> <description> Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. - - [code]method[/code]: Name of the method being called. - - [code]params[/code]: An array or dictionary of parameters being passed to the method. + - [param method]: Name of the method being called. + - [param params]: An array or dictionary of parameters being passed to the method. </description> </method> <method name="make_request"> @@ -26,9 +26,9 @@ <param index="2" name="id" type="Variant" /> <description> Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. - - [code]method[/code]: Name of the method being called. - - [code]params[/code]: An array or dictionary of parameters being passed to the method. - - [code]id[/code]: Uniquely identifies this request. The server is expected to send a response with the same ID. + - [param method]: Name of the method being called. + - [param params]: An array or dictionary of parameters being passed to the method. + - [param id]: Uniquely identifies this request. The server is expected to send a response with the same ID. </description> </method> <method name="make_response"> @@ -37,8 +37,8 @@ <param index="1" name="id" type="Variant" /> <description> When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. - - [code]result[/code]: The return value of the function which was called. - - [code]id[/code]: The ID of the request this response is targeted to. + - [param result]: The return value of the function which was called. + - [param id]: The ID of the request this response is targeted to. </description> </method> <method name="make_response_error" qualifiers="const"> @@ -48,9 +48,9 @@ <param index="2" name="id" type="Variant" default="null" /> <description> Creates a response which indicates a previous reply has failed in some way. - - [code]code[/code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants. - - [code]message[/code]: A custom message about this error. - - [code]id[/code]: The request this error is a response to. + - [param code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants. + - [param message]: A custom message about this error. + - [param id]: The request this error is a response to. </description> </method> <method name="process_action"> @@ -60,7 +60,7 @@ <description> Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass. - [code]action[/code]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. + [param action]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. </description> </method> <method name="process_string"> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index d91e8bd3e5..21eb80155e 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -22,7 +22,7 @@ <return type="Variant" /> <param index="0" name="object" type="String" /> <description> - Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. + Creates a new JavaScript object using the [code]new[/code] constructor. The [param object] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. </description> </method> <method name="download_buffer"> @@ -31,8 +31,8 @@ <param index="1" name="name" type="String" /> <param index="2" name="mime" type="String" default=""application/octet-stream"" /> <description> - Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type. - [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension. + Prompts the user to download a file containing the specified [param buffer]. The file will have the given [param name] and [param mime] type. + [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [param name]'s extension. [b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). [b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. </description> @@ -42,15 +42,15 @@ <param index="0" name="code" type="String" /> <param index="1" name="use_global_execution_context" type="bool" default="false" /> <description> - Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code]. - If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. + Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code]. + If [param use_global_execution_context] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. </description> </method> <method name="get_interface"> <return type="JavaScriptObject" /> <param index="0" name="interface" type="String" /> <description> - Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. + Returns an interface to a JavaScript object that can be used by scripts. The [param interface] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. </description> </method> <method name="pwa_needs_update" qualifiers="const"> diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml index fef8fdf965..a9ca86d269 100644 --- a/doc/classes/Joint3D.xml +++ b/doc/classes/Joint3D.xml @@ -10,16 +10,16 @@ <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link> </tutorials> <members> - <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> + <member name="exclude_nodes_from_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> If [code]true[/code], the two bodies of the nodes are not able to collide with each other. </member> - <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> + <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> The node attached to the first side (A) of the joint. </member> - <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> + <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> The node attached to the second side (B) of the joint. </member> - <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1"> + <member name="solver_priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1"> The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. </member> </members> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 045480f17c..e991856de5 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -14,7 +14,7 @@ <return type="float" /> <param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" /> <description> - Returns the collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive. + Returns the collision angle according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive. </description> </method> <method name="get_collider" qualifiers="const"> diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml index 31fbbc8d0a..6b0a806e5c 100644 --- a/doc/classes/KinematicCollision3D.xml +++ b/doc/classes/KinematicCollision3D.xml @@ -15,7 +15,7 @@ <param index="0" name="collision_index" type="int" default="0" /> <param index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Returns the collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive. + Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive. </description> </method> <method name="get_collider" qualifiers="const"> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index d882405384..52b2e9a729 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -14,16 +14,16 @@ <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of lines of text the Label has. + Returns the number of lines of text the Label has. </description> </method> <method name="get_line_height" qualifiers="const"> <return type="int" /> <param index="0" name="line" type="int" default="-1" /> <description> - Returns the height of the line [code]line[/code]. - If [code]line[/code] is set to [code]-1[/code], returns the biggest line height. - If there're no lines returns font size in pixels. + Returns the height of the line [param line]. + If [param line] is set to [code]-1[/code], returns the biggest line height. + If there are no lines, returns font size in pixels. </description> </method> <method name="get_total_character_count" qualifiers="const"> @@ -62,8 +62,8 @@ </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" /> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> - Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. - [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. + The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to [code]1.0[/code], all characters are displayed. If set to [code]0.5[/code], only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + [b]Note:[/b] Setting this property updates [member visible_characters] accordingly. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" /> <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0"> @@ -88,8 +88,8 @@ Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the [enum VerticalAlignment] constants. </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> - Restricts the number of characters to display. Set to -1 to disable. - [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count]. + The number of characters to display. If set to [code]-1[/code], all characters are displayed. This can be useful when animating the text appearing in a dialog box. + [b]Note:[/b] Setting this property updates [member percent_visible] accordingly. </member> <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0"> Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info. diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index e4dc24d0b5..b741dc6e64 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -54,7 +54,8 @@ Font configuration used to display text. </member> <member name="font_size" type="int" setter="set_font_size" getter="get_font_size" default="32"> - Font size of the [Label3D]'s text. + Font size of the [Label3D]'s text. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time. + Higher font sizes require more time to render new characters, which can cause stuttering during gameplay. </member> <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1"> Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. @@ -86,7 +87,7 @@ Text outline size. </member> <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.005"> - The size of one pixel's width on the label to scale it in 3D. + The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time. </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. @@ -138,7 +139,7 @@ Represents the size of the [enum DrawFlags] enum. </constant> <constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode"> - This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. + This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. [member GeometryInstance3D.cast_shadow] has no effect when this transparency mode is used; the [Label3D] will never cast shadows. </constant> <constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode"> This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i]. diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml index 0881d3de8a..d24b2c6871 100644 --- a/doc/classes/LightmapGIData.xml +++ b/doc/classes/LightmapGIData.xml @@ -35,7 +35,7 @@ <return type="NodePath" /> <param index="0" name="user_idx" type="int" /> <description> - Returns the [NodePath] of the baked object at index [code]user_idx[/code]. + Returns the [NodePath] of the baked object at index [param user_idx]. </description> </method> <method name="is_using_spherical_harmonics" qualifiers="const"> @@ -48,7 +48,7 @@ <return type="void" /> <param index="0" name="uses_spherical_harmonics" type="bool" /> <description> - If [code]uses_spherical_harmonics[/code] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information. + If [param uses_spherical_harmonics] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information. [b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper. </description> </method> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 0bca77749d..4547c3589f 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -14,10 +14,10 @@ <method name="add_point"> <return type="void" /> <param index="0" name="position" type="Vector2" /> - <param index="1" name="at_position" type="int" default="-1" /> + <param index="1" name="index" type="int" default="-1" /> <description> - Adds a point at the [code]position[/code]. Appends the point at the end of the line. - If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position < 0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. + Adds a point with the specified [param position] relative to the line's own position. Appends the new point at the end of the point list. + If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count]. </description> </method> <method name="clear_points"> @@ -29,29 +29,29 @@ <method name="get_point_count" qualifiers="const"> <return type="int" /> <description> - Returns the Line2D's amount of points. + Returns the number of points in the line. </description> </method> <method name="get_point_position" qualifiers="const"> <return type="Vector2" /> - <param index="0" name="i" type="int" /> + <param index="0" name="index" type="int" /> <description> - Returns point [code]i[/code]'s position. + Returns the position of the point at index [param index]. </description> </method> <method name="remove_point"> <return type="void" /> - <param index="0" name="i" type="int" /> + <param index="0" name="index" type="int" /> <description> - Removes the point at index [code]i[/code] from the line. + Removes the point at index [param index] from the line. </description> </method> <method name="set_point_position"> <return type="void" /> - <param index="0" name="i" type="int" /> + <param index="0" name="index" type="int" /> <param index="1" name="position" type="Vector2" /> <description> - Overwrites the position in point [code]i[/code] with the supplied [code]position[/code]. + Overwrites the position of the point at index [param index] with the supplied [param position]. </description> </method> </methods> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 5217014698..20703f680c 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -48,7 +48,7 @@ <param index="0" name="from_column" type="int" /> <param index="1" name="to_column" type="int" /> <description> - Deletes a section of the [member text] going from position [code]from_column[/code] to [code]to_column[/code]. Both parameters should be within the text's length. + Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length. </description> </method> <method name="deselect"> @@ -92,7 +92,7 @@ <return type="void" /> <param index="0" name="text" type="String" /> <description> - Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens. + Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens. </description> </method> <method name="is_menu_visible" qualifiers="const"> @@ -113,7 +113,7 @@ <param index="0" name="from" type="int" default="0" /> <param index="1" name="to" type="int" default="-1" /> <description> - Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. + Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end. [codeblocks] [gdscript] text = "Welcome" @@ -183,7 +183,7 @@ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </member> <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0"> - Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. + Maximum number of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. [b]Example:[/b] [codeblocks] @@ -417,7 +417,7 @@ The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. </theme_item> <theme_item name="minimum_character_width" data_type="constant" type="int" default="4"> - Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). + Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling). </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index acc59a307b..674adb1772 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -76,7 +76,7 @@ <return type="bool" /> <param index="0" name="delta" type="float" /> <description> - Called each physics frame with the time since the last physics frame as argument ([code]delta[/code], in seconds). Equivalent to [method Node._physics_process]. + Called each physics frame with the time since the last physics frame as argument ([param delta], in seconds). Equivalent to [method Node._physics_process]. If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame. </description> </method> diff --git a/doc/classes/Position2D.xml b/doc/classes/Marker2D.xml index 754fd1fdf1..bf90438bf0 100644 --- a/doc/classes/Position2D.xml +++ b/doc/classes/Marker2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Position2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="Marker2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Generic 2D position hint for editing. </brief_description> diff --git a/doc/classes/Position3D.xml b/doc/classes/Marker3D.xml index d91e0fbfdf..5ad1cdf513 100644 --- a/doc/classes/Position3D.xml +++ b/doc/classes/Marker3D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Position3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="Marker3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Generic 3D position hint for editing. </brief_description> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index ac7b4a48b9..102e4b75ed 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -13,14 +13,14 @@ <return type="PackedByteArray" /> <param index="0" name="base64_str" type="String" /> <description> - Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. + Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str]. </description> </method> <method name="base64_to_utf8"> <return type="String" /> <param index="0" name="base64_str" type="String" /> <description> - Returns a decoded string corresponding to the Base64-encoded string [code]base64_str[/code]. + Returns a decoded string corresponding to the Base64-encoded string [param base64_str]. </description> </method> <method name="base64_to_variant"> @@ -28,7 +28,7 @@ <param index="0" name="base64_str" type="String" /> <param index="1" name="allow_objects" type="bool" default="false" /> <description> - Returns a decoded [Variant] corresponding to the Base64-encoded string [code]base64_str[/code]. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> @@ -43,7 +43,7 @@ <return type="String" /> <param index="0" name="utf8_str" type="String" /> <description> - Returns a Base64-encoded string of the UTF-8 string [code]utf8_str[/code]. + Returns a Base64-encoded string of the UTF-8 string [param utf8_str]. </description> </method> <method name="variant_to_base64"> @@ -51,7 +51,7 @@ <param index="0" name="variant" type="Variant" /> <param index="1" name="full_objects" type="bool" default="false" /> <description> - Returns a Base64-encoded string of the [Variant] [code]variant[/code]. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). + Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> </method> </methods> diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml new file mode 100644 index 0000000000..3ef0572e9f --- /dev/null +++ b/doc/classes/MenuBar.xml @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MenuBar" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A horizontal menu bar, which displays [PopupMenu]s or system global menu. + </brief_description> + <description> + New items can be created by adding [PopupMenu] nodes to his node. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_menu_count" qualifiers="const"> + <return type="int" /> + <description> + Returns number of menu items. + </description> + </method> + <method name="get_menu_popup" qualifiers="const"> + <return type="PopupMenu" /> + <param index="0" name="menu" type="int" /> + <description> + Returns [PopupMenu] associated with menu item. + </description> + </method> + <method name="get_menu_title" qualifiers="const"> + <return type="String" /> + <param index="0" name="menu" type="int" /> + <description> + Returns menu item title. + </description> + </method> + <method name="get_menu_tooltip" qualifiers="const"> + <return type="String" /> + <param index="0" name="menu" type="int" /> + <description> + Returns menu item tooltip. + </description> + </method> + <method name="is_menu_disabled" qualifiers="const"> + <return type="bool" /> + <param index="0" name="menu" type="int" /> + <description> + Returns [code]true[/code], if menu item is disabled. + </description> + </method> + <method name="is_menu_hidden" qualifiers="const"> + <return type="bool" /> + <param index="0" name="menu" type="int" /> + <description> + Returns [code]true[/code], if menu item is hidden. + </description> + </method> + <method name="is_native_menu" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code], if system global menu is supported and used by this [MenuBar]. + </description> + </method> + <method name="set_disable_shortcuts"> + <return type="void" /> + <param index="0" name="disabled" type="bool" /> + <description> + If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button. + </description> + </method> + <method name="set_menu_disabled"> + <return type="void" /> + <param index="0" name="menu" type="int" /> + <param index="1" name="disabled" type="bool" /> + <description> + If [code]true[/code], menu item is disabled. + </description> + </method> + <method name="set_menu_hidden"> + <return type="void" /> + <param index="0" name="menu" type="int" /> + <param index="1" name="hidden" type="bool" /> + <description> + If [code]true[/code], menu item is hidden. + </description> + </method> + <method name="set_menu_title"> + <return type="void" /> + <param index="0" name="menu" type="int" /> + <param index="1" name="title" type="String" /> + <description> + Sets menu item title. + </description> + </method> + <method name="set_menu_tooltip"> + <return type="void" /> + <param index="0" name="menu" type="int" /> + <param index="1" name="tooltip" type="String" /> + <description> + Sets menu item tooltip. + </description> + </method> + </methods> + <members> + <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> + Flat [MenuBar] don't display item decoration. + </member> + <member name="language" type="String" setter="set_language" getter="get_language" default=""""> + Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + </member> + <member name="prefer_global_menu" type="bool" setter="set_prefer_global_menu" getter="is_prefer_global_menu" default="true"> + If [code]true[/code], [MenuBar] will use system global menu when supported. + </member> + <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context"> + The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. + </member> + <member name="start_index" type="int" setter="set_start_index" getter="get_start_index" default="-1"> + Position in the global menu to insert first [MenuBar] item at. + </member> + <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="true"> + If [code]true[/code], when the cursor hovers above menu item, it will close the current [PopupMenu] and open the other one. + </member> + <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> + Base text writing direction. + </member> + </members> + <theme_items> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> + Default text [Color] of the menu item. + </theme_item> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)"> + Text [Color] used when the menu item is disabled. + </theme_item> + <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> + Text [Color] used when the menu item is focused. Only replaces the normal text color of the menu item. Disabled, hovered, and pressed states take precedence over this color. + </theme_item> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.95, 0.95, 0.95, 1)"> + Text [Color] used when the menu item is being hovered. + </theme_item> + <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> + Text [Color] used when the menu item is being hovered and pressed. + </theme_item> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> + The tint of text outline of the menu item. + </theme_item> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> + Text [Color] used when the menu item is being pressed. + </theme_item> + <theme_item name="h_separation" data_type="constant" type="int" default="4"> + The horizontal space between menu items. + </theme_item> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> + The size of the text outline. + </theme_item> + <theme_item name="font" data_type="font" type="Font"> + [Font] of the menu item's text. + </theme_item> + <theme_item name="font_size" data_type="font_size" type="int"> + Font size of the menu item's text. + </theme_item> + <theme_item name="disabled" data_type="style" type="StyleBox"> + [StyleBox] used when the menu item is disabled. + </theme_item> + <theme_item name="focus" data_type="style" type="StyleBox"> + [StyleBox] used when the menu item is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + </theme_item> + <theme_item name="hover" data_type="style" type="StyleBox"> + [StyleBox] used when the menu item is being hovered. + </theme_item> + <theme_item name="normal" data_type="style" type="StyleBox"> + Default [StyleBox] for the menu item. + </theme_item> + <theme_item name="pressed" data_type="style" type="StyleBox"> + [StyleBox] used when the menu item is being pressed. + </theme_item> + </theme_items> +</class> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 8baa724292..1f38510e83 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -65,7 +65,7 @@ Text [Color] used when the [MenuButton] is being pressed. </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="3"> - The horizontal space between [MenuButton]'s icon and text. + The horizontal space between [MenuButton]'s icon and text. Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index f708917b4b..d3d5a7bfaa 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -60,7 +60,7 @@ </description> </method> <method name="_surface_get_blend_shape_arrays" qualifiers="virtual const"> - <return type="Array" /> + <return type="Array[]" /> <param index="0" name="index" type="int" /> <description> </description> @@ -102,8 +102,8 @@ <param index="1" name="simplify" type="bool" default="false" /> <description> Calculate a [ConvexPolygonShape3D] from the mesh. - If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. - If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. + If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default. </description> </method> <method name="create_outline" qualifiers="const"> @@ -142,7 +142,7 @@ <method name="get_surface_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of surfaces that the [Mesh] holds. + Returns the number of surfaces that the [Mesh] holds. </description> </method> <method name="surface_get_arrays" qualifiers="const"> @@ -153,7 +153,7 @@ </description> </method> <method name="surface_get_blend_shape_arrays" qualifiers="const"> - <return type="Array" /> + <return type="Array[]" /> <param index="0" name="surf_idx" type="int" /> <description> Returns the blend shape arrays for the requested surface. diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index 1e69af6fd7..618503c8df 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -19,8 +19,8 @@ <param index="1" name="simplify" type="bool" default="false" /> <description> This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. - If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. - If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. + If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default. </description> </method> <method name="create_debug_tangents"> diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml index 9701f49b99..f2509ad2b2 100644 --- a/doc/classes/MovieWriter.xml +++ b/doc/classes/MovieWriter.xml @@ -31,7 +31,7 @@ <return type="bool" /> <param index="0" name="path" type="String" /> <description> - Called when the engine determines whether this [MovieWriter] is able to handle the file at [code]path[/code]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension: + Called when the engine determines whether this [MovieWriter] is able to handle the file at [param path]. Must return [code]true[/code] if this [MovieWriter] is able to handle the given file path, [code]false[/code] otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension: [codeblock] func _handles_file(path): # Allows specifying an output file with a `.mkv` file extension (case-insensitive), @@ -46,7 +46,7 @@ <param index="1" name="fps" type="int" /> <param index="2" name="base_path" type="String" /> <description> - Called once before the engine starts writing video and audio data. [code]movie_size[/code] is the width and height of the video to save. [code]fps[/code] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] command line argument. + Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] command line argument. </description> </method> <method name="_write_end" qualifiers="virtual"> @@ -61,7 +61,7 @@ <param index="0" name="frame_image" type="Image" /> <param index="1" name="audio_frame_block" type="const void*" /> <description> - Called at the end of every rendered frame. The [code]frame_image[/code] and [code]audio_frame_block[/code] function arguments should be written to. + Called at the end of every rendered frame. The [param frame_image] and [param audio_frame_block] function arguments should be written to. </description> </method> <method name="add_writer" qualifiers="static"> diff --git a/doc/classes/MultiMeshInstance3D.xml b/doc/classes/MultiMeshInstance3D.xml index 52cc9cb65f..70fbf235e2 100644 --- a/doc/classes/MultiMeshInstance3D.xml +++ b/doc/classes/MultiMeshInstance3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> [MultiMeshInstance3D] is a specialized node to instance [GeometryInstance3D]s based on a [MultiMesh] resource. - This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). + This is useful to optimize the rendering of a high number of instances of a given mesh (for example trees in a forest or grass strands). </description> <tutorials> <link title="Animating thousands of fish with MultiMeshInstance">$DOCS_URL/tutorials/performance/vertex_animation/animating_thousands_of_fish.html</link> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index e0a3a29147..3ce6ce41b4 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -60,7 +60,7 @@ <param index="0" name="object" type="Object" /> <param index="1" name="configuration" type="Variant" /> <description> - Notifies the MultiplayerAPI of a new [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. + Notifies the MultiplayerAPI of a new [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and a valid [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension]. </description> </method> @@ -69,7 +69,7 @@ <param index="0" name="object" type="Object" /> <param index="1" name="configuration" type="Variant" /> <description> - Notifies the MultiplayerAPI to remove a [code]configuration[/code] for the given [code]object[/code]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [code]configuration[/code]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. + Notifies the MultiplayerAPI to remove a [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing [code]null[/code] and an empty [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. [b]Note:[/b] This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension]. </description> </method> @@ -87,7 +87,7 @@ <param index="2" name="method" type="StringName" /> <param index="3" name="arguments" type="Array" default="[]" /> <description> - Sends an RPC to the target [code]peer[/code]. The given [code]method[/code] will be called on the remote [code]object[/code] with the provided [code]arguments[/code]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config]. + Sends an RPC to the target [param peer]. The given [param method] will be called on the remote [param object] with the provided [param arguments]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config]. [b]Note:[/b] Prefer using [method Node.rpc], [method Node.rpc_id], or [code]my_method.rpc(peer, arg1, arg2, ...)[/code] (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when augmenting or replacing the multiplayer capabilities. </description> </method> diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index 9e747383b6..0f57ff9e55 100644 --- a/doc/classes/MultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -48,7 +48,7 @@ <param index="0" name="id" type="int" /> <description> Sets the peer to which packets will be sent. - The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]. + The [param id] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]. </description> </method> </methods> diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml index 12e281fa76..3a193abd7d 100644 --- a/doc/classes/MultiplayerPeerExtension.xml +++ b/doc/classes/MultiplayerPeerExtension.xml @@ -32,7 +32,7 @@ <param index="0" name="r_buffer" type="const uint8_t **" /> <param index="1" name="r_buffer_size" type="int32_t*" /> <description> - Called when a packet needs to be received by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes. + Called when a packet needs to be received by the [MultiplayerAPI], with [param r_buffer_size] being the size of the binary [param r_buffer] in bytes. </description> </method> <method name="_get_packet_peer" qualifiers="virtual const"> @@ -88,7 +88,7 @@ <param index="0" name="p_buffer" type="const uint8_t*" /> <param index="1" name="p_buffer_size" type="int" /> <description> - Called when a packet needs to be sent by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes. + Called when a packet needs to be sent by the [MultiplayerAPI], with [param p_buffer_size] being the size of the binary [param p_buffer] in bytes. </description> </method> <method name="_put_packet_script" qualifiers="virtual"> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index c2cdf6a605..bf3aff2c58 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -38,7 +38,7 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_navigation_map" qualifiers="const"> @@ -88,7 +88,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. </description> </method> <method name="set_navigation_map"> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 192faf6d5f..7c48f0b52b 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -38,7 +38,7 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_navigation_map" qualifiers="const"> @@ -88,7 +88,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. </description> </method> <method name="set_navigation_map"> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index cef23699c8..c86bc47e04 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -28,14 +28,14 @@ <param index="0" name="mesh" type="Mesh" /> <description> Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. - [b]Note:[/b] The given [code]mesh[/code] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array. + [b]Note:[/b] The given [param mesh] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array. </description> </method> <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_polygon"> @@ -62,7 +62,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member geometry_collision_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member geometry_collision_mask], given a [param layer_number] between 1 and 32. </description> </method> <method name="set_vertices"> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index 30d068b55c..4c337db90f 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -6,7 +6,7 @@ <description> This class is responsible for creating and clearing 3D navigation meshes used as [NavigationMesh] resources inside [NavigationRegion3D]. The [NavigationMeshGenerator] has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. - Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area. + Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total number of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area. The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes. [b]Note:[/b] Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh. </description> @@ -18,14 +18,14 @@ <param index="0" name="nav_mesh" type="NavigationMesh" /> <param index="1" name="root_node" type="Node" /> <description> - Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource. + Bakes navigation data to the provided [param nav_mesh] by parsing child nodes under the provided [param root_node] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry_parsed_geometry_type] and [member NavigationMesh.geometry_source_geometry_mode] properties on the [NavigationMesh] resource. </description> </method> <method name="clear"> <return type="void" /> <param index="0" name="nav_mesh" type="NavigationMesh" /> <description> - Removes all polygons and vertices from the provided [code]nav_mesh[/code] resource. + Removes all polygons and vertices from the provided [param nav_mesh] resource. </description> </method> </methods> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 655d51b25c..89f7dcb4af 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -18,7 +18,7 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_region_rid" qualifiers="const"> @@ -32,7 +32,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 927b2ba5e5..1e096515be 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -18,14 +18,14 @@ <return type="void" /> <param index="0" name="on_thread" type="bool" default="true" /> <description> - Bakes the [NavigationMesh]. If [code]on_thread[/code] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). + Bakes the [NavigationMesh]. If [param on_thread] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). </description> </method> <method name="get_navigation_layer_value" qualifiers="const"> <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="get_region_rid" qualifiers="const"> @@ -39,7 +39,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index cd156b8075..b85c1c6649 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -27,7 +27,7 @@ <return type="RID" /> <param index="0" name="agent" type="RID" /> <description> - Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + Returns the navigation map [RID] the requested [param agent] is currently assigned to. </description> </method> <method name="agent_is_map_changed" qualifiers="const"> @@ -44,8 +44,8 @@ <param index="2" name="method" type="StringName" /> <param index="3" name="userdata" type="Variant" default="null" /> <description> - Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name. - [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code]. + Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [param receiver] object with a signal to the chosen [param method] name. + [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [param receiver]. </description> </method> <method name="agent_set_map" qualifiers="const"> @@ -128,7 +128,7 @@ </description> </method> <method name="get_maps" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <description> Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> @@ -143,17 +143,17 @@ <return type="void" /> <param index="0" name="map" type="RID" /> <description> - This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. </description> </method> <method name="map_get_agents" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <param index="0" name="map" type="RID" /> <description> - Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map]. </description> </method> <method name="map_get_cell_size" qualifiers="const"> @@ -168,7 +168,7 @@ <param index="0" name="map" type="RID" /> <param index="1" name="to_point" type="Vector2" /> <description> - Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. + Returns the point closest to the provided [param to_point] on the navigation mesh surface. </description> </method> <method name="map_get_closest_point_owner" qualifiers="const"> @@ -194,19 +194,19 @@ <param index="3" name="optimize" type="bool" /> <param index="4" name="navigation_layers" type="int" default="1" /> <description> - Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path. + Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path. </description> </method> <method name="map_get_regions" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <param index="0" name="map" type="RID" /> <description> - Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map]. </description> </method> <method name="map_is_active" qualifiers="const"> <return type="bool" /> - <param index="0" name="nap" type="RID" /> + <param index="0" name="map" type="RID" /> <description> Returns true if the map is active. </description> @@ -246,7 +246,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="connection" type="int" /> <description> - Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connection_pathway_start" qualifiers="const"> @@ -254,28 +254,28 @@ <param index="0" name="region" type="RID" /> <param index="1" name="connection" type="int" /> <description> - Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connections_count" qualifiers="const"> <return type="int" /> <param index="0" name="region" type="RID" /> <description> - Returns how many connections this [code]region[/code] has with other regions in the map. + Returns how many connections this [param region] has with other regions in the map. </description> </method> <method name="region_get_enter_cost" qualifiers="const"> <return type="float" /> <param index="0" name="region" type="RID" /> <description> - Returns the [code]enter_cost[/code] of this [code]region[/code]. + Returns the [code]enter_cost[/code] of this [param region]. </description> </method> <method name="region_get_map" qualifiers="const"> <return type="RID" /> <param index="0" name="region" type="RID" /> <description> - Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + Returns the navigation map [RID] the requested [param region] is currently assigned to. </description> </method> <method name="region_get_navigation_layers" qualifiers="const"> @@ -289,7 +289,7 @@ <return type="float" /> <param index="0" name="region" type="RID" /> <description> - Returns the [code]travel_cost[/code] of this [code]region[/code]. + Returns the [code]travel_cost[/code] of this [param region]. </description> </method> <method name="region_owns_point" qualifiers="const"> @@ -297,7 +297,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="point" type="Vector2" /> <description> - Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + Returns [code]true[/code] if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> @@ -307,7 +307,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> <description> - Sets the [code]enter_cost[/code] for this [code]region[/code]. + Sets the [param enter_cost] for this [param region]. </description> </method> <method name="region_set_map" qualifiers="const"> @@ -347,7 +347,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> <description> - Sets the [code]travel_cost[/code] for this [code]region[/code]. + Sets the [param travel_cost] for this [param region]. </description> </method> </methods> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 7870058f65..5b2a8fc08b 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -27,7 +27,7 @@ <return type="RID" /> <param index="0" name="agent" type="RID" /> <description> - Returns the navigation map [RID] the requested [code]agent[/code] is currently assigned to. + Returns the navigation map [RID] the requested [param agent] is currently assigned to. </description> </method> <method name="agent_is_map_changed" qualifiers="const"> @@ -44,8 +44,8 @@ <param index="2" name="method" type="StringName" /> <param index="3" name="userdata" type="Variant" default="null" /> <description> - Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [code]receiver[/code] object with a signal to the chosen [code]method[/code] name. - [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [code]receiver[/code]. + Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated [code]safe_velocity[/code] to the [param receiver] object with a signal to the chosen [param method] name. + [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]null[/code] object as the [param receiver]. </description> </method> <method name="agent_set_map" qualifiers="const"> @@ -128,7 +128,7 @@ </description> </method> <method name="get_maps" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <description> Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> @@ -143,17 +143,17 @@ <return type="void" /> <param index="0" name="map" type="RID" /> <description> - This function immediately forces synchronization of the specified navigation [code]map[/code] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. Avoidance processing and dispatch of the [code]safe_velocity[/code] signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. [b]Note:[/b] With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. </description> </method> <method name="map_get_agents" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <param index="0" name="map" type="RID" /> <description> - Returns all navigation agents [RID]s that are currently assigned to the requested navigation [code]map[/code]. + Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map]. </description> </method> <method name="map_get_cell_size" qualifiers="const"> @@ -168,7 +168,7 @@ <param index="0" name="map" type="RID" /> <param index="1" name="to_point" type="Vector3" /> <description> - Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. + Returns the point closest to the provided [param to_point] on the navigation mesh surface. </description> </method> <method name="map_get_closest_point_normal" qualifiers="const"> @@ -212,14 +212,14 @@ <param index="3" name="optimize" type="bool" /> <param index="4" name="navigation_layers" type="int" default="1" /> <description> - Returns the navigation path to reach the destination from the origin. [code]navigation_layers[/code] is a bitmask of all region navigation layers that are allowed to be in the path. + Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path. </description> </method> <method name="map_get_regions" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <param index="0" name="map" type="RID" /> <description> - Returns all navigation regions [RID]s that are currently assigned to the requested navigation [code]map[/code]. + Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map]. </description> </method> <method name="map_get_up" qualifiers="const"> @@ -231,7 +231,7 @@ </method> <method name="map_is_active" qualifiers="const"> <return type="bool" /> - <param index="0" name="nap" type="RID" /> + <param index="0" name="map" type="RID" /> <description> Returns true if the map is active. </description> @@ -296,7 +296,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="connection" type="int" /> <description> - Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connection_pathway_start" qualifiers="const"> @@ -304,28 +304,28 @@ <param index="0" name="region" type="RID" /> <param index="1" name="connection" type="int" /> <description> - Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. + Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connections_count" qualifiers="const"> <return type="int" /> <param index="0" name="region" type="RID" /> <description> - Returns how many connections this [code]region[/code] has with other regions in the map. + Returns how many connections this [param region] has with other regions in the map. </description> </method> <method name="region_get_enter_cost" qualifiers="const"> <return type="float" /> <param index="0" name="region" type="RID" /> <description> - Returns the [code]enter_cost[/code] of this [code]region[/code]. + Returns the [code]enter_cost[/code] of this [param region]. </description> </method> <method name="region_get_map" qualifiers="const"> <return type="RID" /> <param index="0" name="region" type="RID" /> <description> - Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. + Returns the navigation map [RID] the requested [param region] is currently assigned to. </description> </method> <method name="region_get_navigation_layers" qualifiers="const"> @@ -339,7 +339,7 @@ <return type="float" /> <param index="0" name="region" type="RID" /> <description> - Returns the [code]travel_cost[/code] of this [code]region[/code]. + Returns the [code]travel_cost[/code] of this [param region]. </description> </method> <method name="region_owns_point" qualifiers="const"> @@ -347,7 +347,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="point" type="Vector3" /> <description> - Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + Returns [code]true[/code] if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> @@ -357,7 +357,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> <description> - Sets the [code]enter_cost[/code] for this [code]region[/code]. + Sets the [param enter_cost] for this [param region]. </description> </method> <method name="region_set_map" qualifiers="const"> @@ -397,7 +397,7 @@ <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> <description> - Sets the [code]travel_cost[/code] for this [code]region[/code]. + Sets the [param travel_cost] for this [param region]. </description> </method> <method name="set_active" qualifiers="const"> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index d84509ca8f..1592718c4b 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -21,7 +21,7 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="value" type="int" /> <description> - Sets the size of the margin on the specified [enum Side] to [code]value[/code] pixels. + Sets the size of the margin on the specified [enum Side] to [param value] pixels. </description> </method> </methods> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 1436123e94..b882425960 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -59,7 +59,7 @@ <return type="void" /> <param index="0" name="delta" type="float" /> <description> - Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. [code]delta[/code] is in seconds. + Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [param delta] variable should be constant. [param delta] is in seconds. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process]. Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification]. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -69,7 +69,7 @@ <return type="void" /> <param index="0" name="delta" type="float" /> <description> - Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. [code]delta[/code] is in seconds. + Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds. It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process]. Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification]. [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -125,8 +125,8 @@ <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 [code]legible_unique_name[/code] 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 [code]internal[/code] 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. + 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 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] [gdscript] @@ -153,8 +153,8 @@ <param index="0" name="sibling" type="Node" /> <param index="1" name="legible_unique_name" type="bool" default="false" /> <description> - Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it. - If [code]legible_unique_name[/code] 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 [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. 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> @@ -165,7 +165,7 @@ <param index="1" name="persistent" type="bool" default="false" /> <description> Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree]. - The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored. + The [param persistent] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored. [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. </description> </method> @@ -189,7 +189,7 @@ <param index="0" name="flags" type="int" default="15" /> <description> Duplicates the node, returning a new node. - You can fine-tune the behavior using the [code]flags[/code] (see [enum DuplicateFlags]). + You can fine-tune the behavior using the [param flags] (see [enum DuplicateFlags]). [b]Note:[/b] It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to [method Object._init] method). In that case, the node will be duplicated without a script. </description> </method> @@ -199,10 +199,10 @@ <param index="1" name="recursive" type="bool" default="true" /> <param index="2" name="owned" type="bool" default="true" /> <description> - Finds the first descendant of this node whose name matches [code]pattern[/code] as in [method String.match]. - [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). - If [code]recursive[/code] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [code]recursive[/code] is [code]false[/code], only this node's direct children are matched. - If [code]owned[/code] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. + Finds the first descendant of this node whose name matches [param pattern] as in [method String.match]. + [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). + If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched. + If [param owned] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. Returns [code]null[/code] if no matching [Node] is found. [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [method get_node] with unique names instead (see [member unique_name_in_owner]), or caching the node references into variable. [b]Note:[/b] To find all descendant nodes matching a pattern or a class type, see [method find_children]. @@ -215,11 +215,11 @@ <param index="2" name="recursive" type="bool" default="true" /> <param index="3" name="owned" type="bool" default="true" /> <description> - Finds descendants of this node whose name matches [code]pattern[/code] as in [method String.match], and/or type matches [code]type[/code] as in [method Object.is_class]. - [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). - [code]type[/code] will check equality or inheritance, and is case-sensitive. [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around. - If [code]recursive[/code] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [code]recursive[/code] is [code]false[/code], only this node's direct children are matched. - If [code]owned[/code] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. + Finds descendants of this node whose name matches [param pattern] as in [method String.match], and/or type matches [param type] as in [method Object.is_class]. + [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). + [param type] will check equality or inheritance, and is case-sensitive. [code]"Object"[/code] will match a node whose type is [code]"Node"[/code] but not the other way around. + If [param recursive] is [code]true[/code], all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If [param recursive] is [code]false[/code], only this node's direct children are matched. + If [param owned] is [code]true[/code], this method only finds nodes who have an assigned [member Node.owner]. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. Returns an empty array if no matching nodes are found. [b]Note:[/b] As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. Whenever possible, consider caching the node references into variables. [b]Note:[/b] If you only want to find the first descendant node that matches a pattern, see [method find_child]. @@ -229,8 +229,8 @@ <return type="Node" /> <param index="0" name="pattern" type="String" /> <description> - Finds the first parent of the current node whose name matches [code]pattern[/code] as in [method String.match]. - [code]pattern[/code] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). + Finds the first parent of the current node whose name matches [param pattern] as in [method String.match]. + [param pattern] does not match against the full path, just against individual node names. It is case-sensitive, with [code]"*"[/code] matching zero or more characters and [code]"?"[/code] matching any single character except [code]"."[/code]). [b]Note:[/b] As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using [method get_node] with unique names instead (see [member unique_name_in_owner]), or caching the node references into variable. </description> </method> @@ -241,7 +241,7 @@ <description> Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. Negative indices access the children from the last one. - If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]). + If [param include_internal] is [code]false[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]). To access a child node via its name, use [method get_node]. </description> </method> @@ -250,7 +250,7 @@ <param index="0" name="include_internal" type="bool" default="false" /> <description> Returns the number of child nodes. - If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]). + If [param include_internal] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_children" qualifiers="const"> @@ -258,11 +258,11 @@ <param index="0" name="include_internal" type="bool" default="false" /> <description> Returns an array of references to node's children. - If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]). + If [param include_internal] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_groups" qualifiers="const"> - <return type="Array" /> + <return type="StringName[]" /> <description> Returns an array listing the groups that the node is a member of. [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. @@ -281,7 +281,7 @@ <param index="0" name="include_internal" type="bool" default="false" /> <description> Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code]. - If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]). + If [param include_internal] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_multiplayer_authority" qualifiers="const"> @@ -349,7 +349,7 @@ <return type="Node" /> <param index="0" name="path" type="NodePath" /> <description> - Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node]. + Similar to [method get_node], but does not log an error if [param path] does not point to a valid [Node]. </description> </method> <method name="get_parent" qualifiers="const"> @@ -368,7 +368,7 @@ <return type="NodePath" /> <param index="0" name="node" type="Node" /> <description> - Returns the relative [NodePath] from this node to the specified [code]node[/code]. Both nodes must be in the same scene or the function will fail. + Returns the relative [NodePath] from this node to the specified [param node]. Both nodes must be in the same scene or the function will fail. </description> </method> <method name="get_physics_process_delta_time" qualifiers="const"> @@ -432,7 +432,7 @@ <return type="bool" /> <param index="0" name="node" type="Node" /> <description> - Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling. + Returns [code]true[/code] if [param node] has editable children enabled relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="is_greater_than" qualifiers="const"> @@ -561,7 +561,7 @@ <param index="1" name="args" type="Array" default="[]" /> <param index="2" name="parent_first" type="bool" default="false" /> <description> - Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [code]parent_first[/code] is [code]false[/code], the children will be called first. + Calls the given method (if present) with the arguments given in [param args] on this node and recursively on all its children. If the [param parent_first] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [param parent_first] is [code]false[/code], the children will be called first. </description> </method> <method name="propagate_notification"> @@ -610,7 +610,7 @@ <param index="1" name="keep_groups" type="bool" default="false" /> <description> Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost. - If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in. + If [param keep_groups] is [code]true[/code], the [param node] is added to the same groups that the replaced node is in. [b]Note:[/b] The given node will become the new parent of any child nodes that the replaced node had. [b]Note:[/b] The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free]. </description> @@ -625,7 +625,7 @@ <return type="int" enum="Error" /> <param index="0" name="method" type="StringName" /> <description> - Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code]. + Sends a remote procedure call request for the given [param method] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code]. [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> @@ -634,7 +634,7 @@ <param index="0" name="method" type="StringName" /> <param index="1" name="config" type="Variant" /> <description> - Changes the RPC mode for the given [code]method[/code] with the given [code]config[/code] which should be [code]null[/code] (to disable) or a [Dictionary] in the form: + Changes the RPC mode for the given [param method] with the given [param config] which should be [code]null[/code] (to disable) or a [Dictionary] in the form: [codeblock] { rpc_mode = MultiplayerAPI.RPCMode, @@ -651,7 +651,7 @@ <param index="0" name="peer_id" type="int" /> <param index="1" name="method" type="StringName" /> <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns [code]null[/code]. + Sends a [method rpc] to a specific peer identified by [param peer_id] (see [method MultiplayerPeer.set_target_peer]). Returns [code]null[/code]. </description> </method> <method name="set_display_folded"> @@ -666,7 +666,7 @@ <param index="0" name="node" type="Node" /> <param index="1" name="is_editable" type="bool" /> <description> - Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling. + Sets the editable children state of [param node] relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="set_multiplayer_authority"> @@ -674,7 +674,7 @@ <param index="0" name="id" type="int" /> <param index="1" name="recursive" type="bool" default="true" /> <description> - Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node. + Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [param recursive], the given peer is recursively set as the authority for all children of this node. </description> </method> <method name="set_physics_process"> @@ -791,7 +791,7 @@ <param index="0" name="node" type="Node" /> <description> Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree. - When this signal is received, the child [code]node[/code] is still in the tree and valid. This signal is emitted [i]after[/i] the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE]. + When this signal is received, the child [param node] is still in the tree and valid. This signal is emitted [i]after[/i] the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE]. </description> </signal> <signal name="ready"> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 50392ea59a..a587811260 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -15,14 +15,14 @@ <return type="void" /> <param index="0" name="ratio" type="Vector2" /> <description> - Multiplies the current scale by the [code]ratio[/code] vector. + Multiplies the current scale by the [param ratio] vector. </description> </method> <method name="get_angle_to" qualifiers="const"> <return type="float" /> <param index="0" name="point" type="Vector2" /> <description> - Returns the angle between the node and the [code]point[/code] in radians. + Returns the angle between the node and the [param point] in radians. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url] </description> </method> @@ -37,14 +37,14 @@ <return type="void" /> <param index="0" name="offset" type="Vector2" /> <description> - Adds the [code]offset[/code] vector to the node's global position. + Adds the [param offset] vector to the node's global position. </description> </method> <method name="look_at"> <return type="void" /> <param index="0" name="point" type="Vector2" /> <description> - Rotates the node so it points towards the [code]point[/code], which is expected to use global coordinates. + Rotates the node so it points towards the [param point], which is expected to use global coordinates. </description> </method> <method name="move_local_x"> @@ -52,7 +52,7 @@ <param index="0" name="delta" type="float" /> <param index="1" name="scaled" type="bool" default="false" /> <description> - Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. + Applies a local translation on the node's X axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement. </description> </method> <method name="move_local_y"> @@ -60,7 +60,7 @@ <param index="0" name="delta" type="float" /> <param index="1" name="scaled" type="bool" default="false" /> <description> - Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. + Applies a local translation on the node's Y axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement. </description> </method> <method name="rotate"> @@ -88,7 +88,7 @@ <return type="void" /> <param index="0" name="offset" type="Vector2" /> <description> - Translates the node by the given [code]offset[/code] in local coordinates. + Translates the node by the given [param offset] in local coordinates. </description> </method> </methods> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 6958f4f7d5..53b93beb40 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -39,7 +39,7 @@ </description> </method> <method name="get_gizmos" qualifiers="const"> - <return type="Array" /> + <return type="Node3DGizmo[]" /> <description> Returns all the gizmos attached to this [code]Node3D[/code]. </description> @@ -113,9 +113,9 @@ <param index="0" name="target" type="Vector3" /> <param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Rotates the node so that the local forward axis (-Z) points toward the [code]target[/code] position. - The local up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. - The [code]target[/code] position cannot be the same as the node's position, the [code]up[/code] vector cannot be zero, and the direction from the node's position to the [code]target[/code] vector cannot be parallel to the [code]up[/code] vector. + Rotates the node so that the local forward axis (-Z) points toward the [param target] position. + The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. + The [param target] position cannot be the same as the node's position, the [param up] vector cannot be zero, and the direction from the node's position to the [param target] vector cannot be parallel to the [param up] vector. Operations take place in global space. </description> </method> @@ -125,7 +125,7 @@ <param index="1" name="target" type="Vector3" /> <param index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Moves the node to the specified [code]position[/code], and then rotates the node to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. + Moves the node to the specified [param position], and then rotates the node to point toward the [param target] as per [method look_at]. Operations take place in global space. </description> </method> <method name="orthonormalize"> @@ -134,20 +134,6 @@ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the Node3D property with given [code]name[/code]. - </description> - </method> <method name="rotate"> <return type="void" /> <param index="0" name="axis" type="Vector3" /> @@ -245,14 +231,14 @@ <return type="Vector3" /> <param index="0" name="local_point" type="Vector3" /> <description> - Transforms [code]local_point[/code] from this node's local space to world space. + Transforms [param local_point] from this node's local space to world space. </description> </method> <method name="to_local" qualifiers="const"> <return type="Vector3" /> <param index="0" name="global_point" type="Vector3" /> <description> - Transforms [code]global_point[/code] from world space to this node's local space. + Transforms [param global_point] from world space to this node's local space. </description> </method> <method name="translate"> @@ -260,7 +246,7 @@ <param index="0" name="offset" type="Vector3" /> <description> Changes the node's position by the given offset [Vector3]. - Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. + Note that the translation [param offset] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. </description> </method> <method name="translate_object_local"> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index edea501d6e..9db100c9f8 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -113,7 +113,7 @@ <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count] - 1). + Gets the node name indicated by [param idx] (0 to [method get_name_count] - 1). [codeblocks] [gdscript] var node_path = NodePath("Path2D/PathFollow2D/Sprite2D") @@ -141,7 +141,7 @@ <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). + Gets the resource or property name indicated by [param idx] (0 to [method get_subname_count]). [codeblocks] [gdscript] var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index a1f1e9f0d6..e4b5404c2c 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -42,7 +42,7 @@ <return type="int" /> <param index="0" name="arguments" type="PackedStringArray" /> <description> - Creates a new instance of Godot that runs independently. The [code]arguments[/code] are used in the given order and separated by a space. + Creates a new instance of Godot that runs independently. The [param arguments] are used in the given order and separated by a space. If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code]. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> @@ -53,8 +53,8 @@ <param index="1" name="arguments" type="PackedStringArray" /> <param index="2" name="open_console" type="bool" default="false" /> <description> - Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. - On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. + Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [param path] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [param arguments] are used in the given order and separated by a space. + On Windows, if [param open_console] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code]. For example, running another instance of the project: [codeblocks] @@ -74,7 +74,7 @@ <return type="void" /> <param index="0" name="msec" type="int" /> <description> - Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. + Delays execution of the current thread by [param msec] milliseconds. [param msec] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). [b]Note:[/b] When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). </description> @@ -83,7 +83,7 @@ <return type="void" /> <param index="0" name="usec" type="int" /> <description> - Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. + Delays execution of the current thread by [param usec] microseconds. [param usec] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). [b]Note:[/b] When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). </description> @@ -113,8 +113,8 @@ <param index="3" name="read_stderr" type="bool" default="false" /> <param index="4" name="open_console" type="bool" default="false" /> <description> - Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too. - On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. + Executes a command. The file specified in [param path] must exist and be executable. Platform path resolution will be used. The [param arguments] are used in the given order and separated by a space. If an [param output] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [param output]. If [param read_stderr] is [code]true[/code], the output to the standard error stream will be included too. + On Windows, if [param open_console] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails. [b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process. For example, to retrieve a list of the working directory's contents: @@ -140,9 +140,9 @@ [/csharp] [/codeblocks] [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. - [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [code]path[/code], [code]/c[/code] as the first argument, and the desired command as the second argument. - [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [code]path[/code], [code]-Command[/code] as the first argument, and the desired command as the second argument. - [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [code]path[/code], [code]-c[/code] as the first argument, and the desired command as the second argument. + [b]Note:[/b] To execute a Windows command interpreter built-in command, specify [code]cmd.exe[/code] in [param path], [code]/c[/code] as the first argument, and the desired command as the second argument. + [b]Note:[/b] To execute a PowerShell built-in command, specify [code]powershell.exe[/code] in [param path], [code]-Command[/code] as the first argument, and the desired command as the second argument. + [b]Note:[/b] To execute a Unix shell built-in command, specify shell executable name in [param path], [code]-c[/code] as the first argument, and the desired command as the second argument. [b]Note:[/b] On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export. </description> </method> @@ -238,7 +238,7 @@ <param index="0" name="variable" type="String" /> <description> Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. - [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. + [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="get_executable_path" qualifiers="const"> @@ -408,7 +408,7 @@ <param index="1" name="bold" type="bool" default="false" /> <param index="2" name="italic" type="bool" default="false" /> <description> - Returns path to the system font file with [code]font_name[/code] and style. Return empty string if no matching fonts found. + Returns path to the system font file with [param font_name] and style. Return empty string if no matching fonts found. [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows. </description> </method> @@ -451,8 +451,8 @@ <return type="bool" /> <param index="0" name="variable" type="String" /> <description> - Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists. - [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. + Returns [code]true[/code] if the environment variable with the name [param variable] exists. + [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="has_feature" qualifiers="const"> @@ -482,7 +482,7 @@ <return type="bool" /> <param index="0" name="pid" type="int" /> <description> - Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated. + Returns [code]true[/code] if the child process ID ([param pid]) is still running or [code]false[/code] if it has terminated. Must be a valid ID generated from [method create_process]. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> @@ -509,7 +509,7 @@ <return type="int" enum="Error" /> <param index="0" name="pid" type="int" /> <description> - Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash]. + Kill (terminate) the process identified by the given process ID ([param pid]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash]. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> @@ -538,7 +538,7 @@ <return type="void" /> <param index="0" name="tofile" type="String" default="""" /> <description> - Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [code]tofile[/code]. + Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [param tofile]. </description> </method> <method name="print_all_textures_by_size"> @@ -580,8 +580,8 @@ <param index="0" name="variable" type="String" /> <param index="1" name="value" type="String" /> <description> - Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. - [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. + Sets the value of the environment variable [param variable] to [param value]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. + [b]Note:[/b] Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="set_restart_on_exit"> @@ -589,7 +589,7 @@ <param index="0" name="restart" type="bool" /> <param index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" /> <description> - If [code]restart[/code] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [code]arguments[/code] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [code]arguments[/code]. + If [param restart] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [param arguments] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [param arguments]. [method set_restart_on_exit] can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments]. [b]Note:[/b] This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. [b]Note:[/b] If the project process crashes or is [i]killed[/i] by the user (by sending [code]SIGKILL[/code] instead of the usual [code]SIGTERM[/code]), the project won't restart automatically. @@ -606,7 +606,7 @@ <return type="void" /> <param index="0" name="enabled" type="bool" /> <description> - Enables backup saves if [code]enabled[/code] is [code]true[/code]. + Enables backup saves if [param enabled] is [code]true[/code]. </description> </method> <method name="shell_open"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 824da0591e..3c71a02a21 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -5,7 +5,7 @@ </brief_description> <description> Every class which is not a built-in type inherits from this class. - You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript. + You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, or [code]new Object[/code] in C#. Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++. Some classes that extend Object add memory management. This is the case of [RefCounted], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. @@ -39,11 +39,11 @@ <param index="0" name="property" type="StringName" /> <description> Virtual method which can be overridden to customize the return value of [method get]. - Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist. + Returns the given property. Returns [code]null[/code] if the [param property] does not exist. </description> </method> <method name="_get_property_list" qualifiers="virtual"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Virtual method which can be overridden to customize the return value of [method get_property_list]. Returns the object's property list as an [Array] of dictionaries. @@ -61,7 +61,23 @@ <return type="void" /> <param index="0" name="what" type="int" /> <description> - Called whenever the object receives a notification, which is identified in [code]what[/code] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method. + Called whenever the object receives a notification, which is identified in [param what] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method. + </description> + </method> + <method name="_property_can_revert" qualifiers="virtual"> + <return type="bool" /> + <param index="0" name="property" type="StringName" /> + <description> + Virtual methods that can be overridden to customize the property revert behavior in the editor. + Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. Override [method _property_get_revert] to return the actual value. + </description> + </method> + <method name="_property_get_revert" qualifiers="virtual"> + <return type="Variant" /> + <param index="0" name="property" type="StringName" /> + <description> + Virtual methods that can be overridden to customize the property revert behavior in the editor. + Returns the default value of the property identified by [code]name[/code]. [method _property_can_revert] must be overridden as well for this method to be called. </description> </method> <method name="_set" qualifiers="virtual"> @@ -70,7 +86,7 @@ <param index="1" name="value" type="Variant" /> <description> Virtual method which can be overridden to customize the return value of [method set]. - Sets a property. Returns [code]true[/code] if the [code]property[/code] exists. + Sets a property. Returns [code]true[/code] if the [param property] exists. </description> </method> <method name="_to_string" qualifiers="virtual"> @@ -85,14 +101,14 @@ <param index="0" name="signal" type="String" /> <param index="1" name="arguments" type="Array" default="[]" /> <description> - Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. + Adds a user-defined [param signal]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. </description> </method> <method name="call" qualifiers="vararg"> <return type="Variant" /> <param index="0" name="method" type="StringName" /> <description> - Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] [gdscript] var node = Node3D.new() @@ -110,7 +126,7 @@ <return type="Variant" /> <param index="0" name="method" type="StringName" /> <description> - Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] [gdscript] var node = Node3D.new() @@ -129,7 +145,7 @@ <param index="0" name="method" type="StringName" /> <param index="1" name="arg_array" type="Array" /> <description> - Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array]. + Calls the [param method] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array]. [codeblocks] [gdscript] var node = Node3D.new() @@ -154,7 +170,7 @@ <param index="1" name="callable" type="Callable" /> <param index="2" name="flags" type="int" default="0" /> <description> - Connects a [code]signal[/code] to a [code]callable[/code]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. + Connects a [param signal] to a [param callable]. Use [param flags] to set deferred or one-shot connections. See [enum ConnectFlags] constants. A signal can only be connected once to a [Callable]. It will print an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the callable's target is destroyed in the game's lifecycle, the connection will be lost. [b]Examples with recommended syntax:[/b] @@ -294,7 +310,7 @@ <param index="0" name="signal" type="StringName" /> <param index="1" name="callable" type="Callable" /> <description> - Disconnects a [code]signal[/code] from a given [code]callable[/code]. + Disconnects a [param signal] from a given [param callable]. If you try to disconnect a connection that does not exist, the method will print an error. Use [method is_connected] to ensure that the connection exists. </description> </method> @@ -302,7 +318,7 @@ <return type="int" enum="Error" /> <param index="0" name="signal" type="StringName" /> <description> - Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] [gdscript] emit_signal("hit", "sword", 100) @@ -325,7 +341,7 @@ <return type="Variant" /> <param index="0" name="property" type="StringName" /> <description> - Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code]. + Returns the [Variant] value of the given [param property]. If the [param property] doesn't exist, this will return [code]null[/code]. [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> @@ -337,7 +353,7 @@ </description> </method> <method name="get_incoming_connections" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns an [Array] of dictionaries with information about signals that are connected to the object. Each [Dictionary] contains three String entries: @@ -366,8 +382,9 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="default" type="Variant" default="null" /> <description> - Returns the object's metadata entry for the given [code]name[/code]. - Throws error if the entry does not exist, unless [code]default[/code] is not [code]null[/code] (in which case the default value will be returned). + Returns the object's metadata entry for the given [param name]. + Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_meta]. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. </description> </method> <method name="get_meta_list" qualifiers="const"> @@ -377,13 +394,13 @@ </description> </method> <method name="get_method_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the object's methods and their signatures as an [Array]. </description> </method> <method name="get_property_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the object's property list as an [Array] of dictionaries. Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum PropertyUsageFlags]). @@ -396,14 +413,14 @@ </description> </method> <method name="get_signal_connection_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="signal" type="StringName" /> <description> - Returns an [Array] of connections for the given [code]signal[/code]. + Returns an [Array] of connections for the given [param signal]. </description> </method> <method name="get_signal_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the list of signals as an [Array] of dictionaries. </description> @@ -412,28 +429,29 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if a metadata entry is found with the given [code]name[/code]. + Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. </description> </method> <method name="has_method" qualifiers="const"> <return type="bool" /> <param index="0" name="method" type="StringName" /> <description> - Returns [code]true[/code] if the object contains the given [code]method[/code]. + Returns [code]true[/code] if the object contains the given [param method]. </description> </method> <method name="has_signal" qualifiers="const"> <return type="bool" /> <param index="0" name="signal" type="StringName" /> <description> - Returns [code]true[/code] if the given [code]signal[/code] exists. + Returns [code]true[/code] if the given [param signal] exists. </description> </method> <method name="has_user_signal" qualifiers="const"> <return type="bool" /> <param index="0" name="signal" type="StringName" /> <description> - Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. Only signals added using [method add_user_signal] are taken into account. + Returns [code]true[/code] if the given user-defined [param signal] exists. Only signals added using [method add_user_signal] are taken into account. </description> </method> <method name="is_blocking_signals" qualifiers="const"> @@ -446,7 +464,7 @@ <return type="bool" /> <param index="0" name="class" type="String" /> <description> - Returns [code]true[/code] if the object inherits from the given [code]class[/code]. See also [method get_class]. + Returns [code]true[/code] if the object inherits from the given [param class]. See also [method get_class]. [b]Note:[/b] [method is_class] does not take [code]class_name[/code] declarations into account. If the object has a [code]class_name[/code] defined, [method is_class] will return [code]false[/code] for that name. </description> </method> @@ -455,7 +473,7 @@ <param index="0" name="signal" type="StringName" /> <param index="1" name="callable" type="Callable" /> <description> - Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code]. + Returns [code]true[/code] if a connection exists for a given [param signal] and [param callable]. </description> </method> <method name="is_queued_for_deletion" qualifiers="const"> @@ -470,7 +488,7 @@ <param index="1" name="reversed" type="bool" default="false" /> <description> Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from. - If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes. + If [param reversed] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [param reversed] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes. </description> </method> <method name="notify_property_list_changed"> @@ -483,7 +501,8 @@ <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a given entry from the object's metadata. See also [method set_meta]. + Removes a given entry from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. </description> </method> <method name="set"> @@ -491,7 +510,7 @@ <param index="0" name="property" type="StringName" /> <param index="1" name="value" type="Variant" /> <description> - Assigns a new value to the given property. If the [code]property[/code] does not exist or the given value's type doesn't match, nothing will happen. + Assigns a new value to the given property. If the [param property] does not exist or the given value's type doesn't match, nothing will happen. [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> @@ -546,7 +565,8 @@ <param index="1" name="value" type="Variant" /> <description> Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. - To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. + To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. See also [method has_meta] and [method get_meta]. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. </description> </method> <method name="set_script"> @@ -570,7 +590,7 @@ <param index="1" name="context" type="StringName" default="""" /> <description> Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. - Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation]. + Only works if message translation is enabled (which it is by default), otherwise it returns the [param message] unchanged. See [method set_message_translation]. See [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url] for examples of the usage of this method. </description> </method> @@ -582,8 +602,8 @@ <param index="3" name="context" type="StringName" default="""" /> <description> Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. - Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation]. - The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. + Only works if message translation is enabled (which it is by default), otherwise it returns the [param message] or [param plural_message] unchanged. See [method set_message_translation]. + The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. [b]Note:[/b] Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, use [method tr]. See [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url] for examples of the usage of this method. </description> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 556ff07267..0bebc7ea43 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -17,7 +17,7 @@ <return type="bool" /> <param index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32. </description> </method> <method name="set_bake_mask_value"> @@ -25,7 +25,7 @@ <param index="0" name="layer_number" type="int" /> <param index="1" name="value" type="bool" /> <description> - Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 32. + Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 8f2660ad61..f10c096c1b 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -17,7 +17,7 @@ <param index="1" name="label" type="String" /> <param index="2" name="id" type="int" default="-1" /> <description> - Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. + Adds an item, with a [param texture] icon, text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_item"> @@ -25,14 +25,14 @@ <param index="0" name="label" type="String" /> <param index="1" name="id" type="int" default="-1" /> <description> - Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. + Adds an item, with text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_separator"> <return type="void" /> <param index="0" name="text" type="String" default="""" /> <description> - Adds a separator to the list of items. Separators help to group items, and can optionally be given a [code]text[/code] header. A separator also gets an index assigned, and is appended at the end of the item list. + Adds a separator to the list of items. Separators help to group items, and can optionally be given a [param text] header. A separator also gets an index assigned, and is appended at the end of the item list. </description> </method> <method name="clear"> @@ -45,21 +45,21 @@ <return type="Texture2D" /> <param index="0" name="idx" type="int" /> <description> - Returns the icon of the item at index [code]idx[/code]. + Returns the icon of the item at index [param idx]. </description> </method> <method name="get_item_id" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the ID of the item at index [code]idx[/code]. + Returns the ID of the item at index [param idx]. </description> </method> <method name="get_item_index" qualifiers="const"> <return type="int" /> <param index="0" name="id" type="int" /> <description> - Returns the index of the item with the given [code]id[/code]. + Returns the index of the item with the given [param id]. </description> </method> <method name="get_item_metadata" qualifiers="const"> @@ -73,14 +73,14 @@ <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the text of the item at index [code]idx[/code]. + Returns the text of the item at index [param idx]. </description> </method> <method name="get_item_tooltip" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the tooltip of the item at index [code]idx[/code]. + Returns the tooltip of the item at index [param idx]. </description> </method> <method name="get_popup" qualifiers="const"> @@ -117,7 +117,7 @@ <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. + Returns [code]true[/code] if the item at index [param idx] is disabled. </description> </method> <method name="is_item_separator" qualifiers="const"> @@ -130,7 +130,7 @@ <return type="void" /> <param index="0" name="idx" type="int" /> <description> - Removes the item at index [code]idx[/code]. + Removes the item at index [param idx]. </description> </method> <method name="select"> @@ -146,7 +146,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="disabled" type="bool" /> <description> - Sets whether the item at index [code]idx[/code] is disabled. + Sets whether the item at index [param idx] is disabled. Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. </description> </method> @@ -155,7 +155,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="texture" type="Texture2D" /> <description> - Sets the icon of the item at index [code]idx[/code]. + Sets the icon of the item at index [param idx]. </description> </method> <method name="set_item_id"> @@ -163,7 +163,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="id" type="int" /> <description> - Sets the ID of the item at index [code]idx[/code]. + Sets the ID of the item at index [param idx]. </description> </method> <method name="set_item_metadata"> @@ -179,7 +179,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="text" type="String" /> <description> - Sets the text of the item at index [code]idx[/code]. + Sets the text of the item at index [param idx]. </description> </method> <method name="set_item_tooltip"> @@ -187,7 +187,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="tooltip" type="String" /> <description> - Sets the tooltip of the item at index [code]idx[/code]. + Sets the tooltip of the item at index [param idx]. </description> </method> </methods> @@ -246,7 +246,7 @@ The horizontal space between the arrow icon and the right edge of the button. </theme_item> <theme_item name="h_separation" data_type="constant" type="int" default="2"> - The horizontal space between [OptionButton]'s icon and text. + The horizontal space between [OptionButton]'s icon and text. Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="modulate_arrow" data_type="constant" type="int" default="0"> If different than [code]0[/code], the arrow icon will be modulated to the font color. diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index b02333667d..efb559522a 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -5,6 +5,7 @@ </brief_description> <description> An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. + [PackedByteArray] also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps. </description> <tutorials> </tutorials> @@ -78,66 +79,77 @@ <return type="float" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 64-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_float" qualifiers="const"> <return type="float" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 32-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_half" qualifiers="const"> <return type="float" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 16-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_s16" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 16-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_s32" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 32-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_s64" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 64-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_s8" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 8-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_u16" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 16-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_u32" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 32-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_u64" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 64-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_u8" qualifiers="const"> <return type="int" /> <param index="0" name="byte_offset" type="int" /> <description> + Decodes a 8-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded. </description> </method> <method name="decode_var" qualifiers="const"> @@ -145,6 +157,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="allow_objects" type="bool" default="false" /> <description> + Decodes a [Variant] from the bytes starting at [param byte_offset]. Returns [code]null[/code] if a valid variant can't be decoded or the value is [Object]-derived and [param allow_objects] is [code]false[/code]. </description> </method> <method name="decode_var_size" qualifiers="const"> @@ -152,6 +165,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="allow_objects" type="bool" default="false" /> <description> + Decodes a size of a [Variant] from the bytes starting at [param byte_offset]. Requires at least 4 bytes of data starting at the offset, otherwise fails. </description> </method> <method name="decompress" qualifiers="const"> @@ -183,6 +197,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="float" /> <description> + Encodes a 64-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of allocated space, starting at the offset. </description> </method> <method name="encode_float"> @@ -190,6 +205,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="float" /> <description> + Encodes a 32-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset. </description> </method> <method name="encode_half"> @@ -197,6 +213,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="float" /> <description> + Encodes a 16-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset. </description> </method> <method name="encode_s16"> @@ -204,6 +221,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 16-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset. </description> </method> <method name="encode_s32"> @@ -211,6 +229,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 32-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset. </description> </method> <method name="encode_s64"> @@ -218,6 +237,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 64-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset. </description> </method> <method name="encode_s8"> @@ -225,6 +245,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 8-bit signed integer number (signed byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset. </description> </method> <method name="encode_u16"> @@ -232,6 +253,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 16-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset. </description> </method> <method name="encode_u32"> @@ -239,6 +261,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 32-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset. </description> </method> <method name="encode_u64"> @@ -246,6 +269,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 64-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset. </description> </method> <method name="encode_u8"> @@ -253,6 +277,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="value" type="int" /> <description> + Encodes a 8-bit unsigned integer number (byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset. </description> </method> <method name="encode_var"> @@ -261,6 +286,7 @@ <param index="1" name="value" type="Variant" /> <param index="2" name="allow_objects" type="bool" default="false" /> <description> + Encodes a [Variant] at the index of [param byte_offset] bytes. A sufficient space must be allocated, depending on the encoded variant's size. If [param allow_objects] is [code]false[/code], [Object]-derived values are not permitted and will instead be serialized as ID-only. </description> </method> <method name="fill"> @@ -314,6 +340,7 @@ <param index="0" name="byte_offset" type="int" /> <param index="1" name="allow_objects" type="bool" default="false" /> <description> + Returns [code]true[/code] if a valid [Variant] value can be decoded at the [param byte_offset]. Returns [code]false[/code] othewrise or when the value is [Object]-derived and [param allow_objects] is [code]false[/code]. </description> </method> <method name="hex_encode" qualifiers="const"> @@ -449,24 +476,29 @@ <return type="bool" /> <param index="0" name="right" type="PackedByteArray" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedByteArray" /> <param index="0" name="right" type="PackedByteArray" /> <description> + Returns a new [PackedByteArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedByteArray" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="int" /> <param index="0" name="index" type="int" /> <description> + Returns the byte at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + Note that the byte is returned as a 64-bit [int]. </description> </operator> </operators> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index c694927175..a2dc8e8f1d 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -177,6 +177,7 @@ <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray" /> <description> + Returns a [PackedByteArray] with each color encoded as bytes. </description> </method> </methods> @@ -185,24 +186,28 @@ <return type="bool" /> <param index="0" name="right" type="PackedColorArray" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedColorArray" /> <param index="0" name="right" type="PackedColorArray" /> <description> + Returns a new [PackedColorArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedColorArray" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="Color" /> <param index="0" name="index" type="int" /> <description> + Returns the [Color] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 41d0679099..d350d64f38 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -4,7 +4,7 @@ A packed array of 32-bit floating-point values. </brief_description> <description> - An array specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. + An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes. If you need to pack 64-bit floats tightly, see [PackedFloat64Array]. </description> <tutorials> @@ -188,24 +188,29 @@ <return type="bool" /> <param index="0" name="right" type="PackedFloat32Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedFloat32Array" /> <param index="0" name="right" type="PackedFloat32Array" /> <description> + Returns a new [PackedFloat32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedFloat32Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="float" /> <param index="0" name="index" type="int" /> <description> + Returns the [float] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + Note that [float] type is 64-bit, unlike the values stored in the array. </description> </operator> </operators> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index bedbe3603c..690cb15fa7 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -4,7 +4,7 @@ A packed array of 64-bit floating-point values. </brief_description> <description> - An array specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. + An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes. If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative. </description> <tutorials> @@ -188,24 +188,28 @@ <return type="bool" /> <param index="0" name="right" type="PackedFloat64Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedFloat64Array" /> <param index="0" name="right" type="PackedFloat64Array" /> <description> + Returns a new [PackedFloat64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedFloat64Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="float" /> <param index="0" name="index" type="int" /> <description> + Returns the [float] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index db4c8c0937..2f9032e214 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -188,24 +188,29 @@ <return type="bool" /> <param index="0" name="right" type="PackedInt32Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedInt32Array" /> <param index="0" name="right" type="PackedInt32Array" /> <description> + Returns a new [PackedInt32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedInt32Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="int" /> <param index="0" name="index" type="int" /> <description> + Returns the [int] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + Note that [int] type is 64-bit, unlike the values stored in the array. </description> </operator> </operators> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 56d72692a2..5f762cde3e 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -188,24 +188,28 @@ <return type="bool" /> <param index="0" name="right" type="PackedInt64Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedInt64Array" /> <param index="0" name="right" type="PackedInt64Array" /> <description> + Returns a new [PackedInt64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedInt64Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="int" /> <param index="0" name="index" type="int" /> <description> + Returns the [int] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index b58a3b2553..2c3376d659 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -184,6 +184,7 @@ <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray" /> <description> + Returns a [PackedByteArray] with each string encoded as bytes. </description> </method> </methods> @@ -192,24 +193,28 @@ <return type="bool" /> <param index="0" name="right" type="PackedStringArray" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator +"> <return type="PackedStringArray" /> <param index="0" name="right" type="PackedStringArray" /> <description> + Returns a new [PackedStringArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedStringArray" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="String" /> <param index="0" name="index" type="int" /> <description> + Returns the [String] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 7cf63d3d5e..25650ef40a 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -178,6 +178,7 @@ <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray" /> <description> + Returns a [PackedByteArray] with each vector encoded as bytes. </description> </method> </methods> @@ -186,30 +187,35 @@ <return type="bool" /> <param index="0" name="right" type="PackedVector2Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator *"> <return type="PackedVector2Array" /> <param index="0" name="right" type="Transform2D" /> <description> + Transforms (multiplies) all vectors in the array by the [Transform2D] matrix. </description> </operator> <operator name="operator +"> <return type="PackedVector2Array" /> <param index="0" name="right" type="PackedVector2Array" /> <description> + Returns a new [PackedVector2Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedVector2Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="Vector2" /> <param index="0" name="index" type="int" /> <description> + Returns the [Vector2] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 5ab42474f0..22979a5a37 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -177,6 +177,7 @@ <method name="to_byte_array" qualifiers="const"> <return type="PackedByteArray" /> <description> + Returns a [PackedByteArray] with each vector encoded as bytes. </description> </method> </methods> @@ -185,30 +186,35 @@ <return type="bool" /> <param index="0" name="right" type="PackedVector3Array" /> <description> + Returns [code]true[/code] if contents of the arrays differ. </description> </operator> <operator name="operator *"> <return type="PackedVector3Array" /> <param index="0" name="right" type="Transform3D" /> <description> + Transforms (multiplies) all vectors in the array by the [Transform3D] matrix. </description> </operator> <operator name="operator +"> <return type="PackedVector3Array" /> <param index="0" name="right" type="PackedVector3Array" /> <description> + Returns a new [PackedVector3Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. </description> </operator> <operator name="operator =="> <return type="bool" /> <param index="0" name="right" type="PackedVector3Array" /> <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices. </description> </operator> <operator name="operator []"> <return type="Vector3" /> <param index="0" name="index" type="int" /> <description> + Returns the [Vector3] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. </description> </operator> </operators> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index fe4caaa10c..55f4c4dcdd 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -115,14 +115,15 @@ <member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true"> True if the interaction with particle attractors is enabled. </member> - <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> - Collision bounciness. + <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce"> + The particles' bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). Only effective if [member collision_mode] is [constant COLLISION_RIGID]. </member> - <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false"> - True if collisions are enabled for this particle system. + <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction"> + The particles' friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Only effective if [member collision_mode] is [constant COLLISION_RIGID]. </member> - <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0"> - Collision friction. + <member name="collision_mode" type="int" setter="set_collision_mode" getter="get_collision_mode" enum="ParticlesMaterial.CollisionMode" default="0"> + The particles' collision mode. + [b]Note:[/b] Particles can only collide with [GPUParticlesCollision3D] nodes, not [PhysicsBody3D] nodes. To make particles collide with various objects, you can add [GPUParticlesCollision3D] nodes as children of [PhysicsBody3D] nodes. </member> <member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false"> Should collision take scale into account. @@ -404,5 +405,17 @@ <constant name="SUB_EMITTER_MAX" value="4" enum="SubEmitterMode"> Represents the size of the [enum SubEmitterMode] enum. </constant> + <constant name="COLLISION_DISABLED" value="0" enum="CollisionMode"> + No collision for particles. Particles will go through [GPUParticlesCollision3D] nodes. + </constant> + <constant name="COLLISION_RIGID" value="1" enum="CollisionMode"> + [RigidDynamicBody3D]-style collision for particles using [GPUParticlesCollision3D] nodes. + </constant> + <constant name="COLLISION_HIDE_ON_CONTACT" value="2" enum="CollisionMode"> + Hide particles instantly when colliding with a [GPUParticlesCollision3D] node. This can be combined with a subemitter that uses the [constant COLLISION_RIGID] collision mode to "replace" the parent particle with the subemitter on impact. + </constant> + <constant name="COLLISION_MAX" value="3" enum="CollisionMode"> + Represents the size of the [enum CollisionMode] enum. + </constant> </constants> </class> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index ddb290f007..92fa1040af 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -79,7 +79,7 @@ </description> </method> <method name="get_custom_monitor_names"> - <return type="Array" /> + <return type="StringName[]" /> <description> Returns the names of active custom monitors in an [Array]. </description> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 2350fd4458..e8d7ac9920 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -32,7 +32,7 @@ Moves the body along the vector [param distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given. - [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). + [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). </description> </method> <method name="remove_collision_exception_with"> @@ -52,7 +52,7 @@ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param distance]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion. - [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). + [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). </description> </method> </methods> diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index 3ef7fc9030..310671274f 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -40,7 +40,7 @@ Moves the body along the vector [param distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given. - [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). + [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). [param max_collisions] allows to retrieve more than one collision result. </description> </method> @@ -70,7 +70,7 @@ Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param distance]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion. - [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). + [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). [param max_collisions] allows to retrieve more than one collision result. </description> </method> diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index 6290ea315f..d4cb073d15 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -12,7 +12,7 @@ </tutorials> <methods> <method name="cast_motion"> - <return type="Array" /> + <return type="PackedFloat32Array" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" /> <description> Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object. @@ -21,7 +21,7 @@ </description> </method> <method name="collide_shape"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" /> <param index="1" name="max_results" type="int" default="32" /> <description> @@ -44,7 +44,7 @@ </description> </method> <method name="intersect_point"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="parameters" type="PhysicsPointQueryParameters2D" /> <param index="1" name="max_results" type="int" default="32" /> <description> @@ -72,7 +72,7 @@ </description> </method> <method name="intersect_shape"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters2D" /> <param index="1" name="max_results" type="int" default="32" /> <description> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index 619891df90..cc1cf8a323 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -12,7 +12,7 @@ </tutorials> <methods> <method name="cast_motion"> - <return type="Array" /> + <return type="PackedFloat32Array" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" /> <description> Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object. @@ -21,7 +21,7 @@ </description> </method> <method name="collide_shape"> - <return type="Array" /> + <return type="PackedVector2Array[]" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" /> <param index="1" name="max_results" type="int" default="32" /> <description> @@ -46,7 +46,7 @@ </description> </method> <method name="intersect_point"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="parameters" type="PhysicsPointQueryParameters3D" /> <param index="1" name="max_results" type="int" default="32" /> <description> @@ -73,7 +73,7 @@ </description> </method> <method name="intersect_shape"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="parameters" type="PhysicsShapeQueryParameters3D" /> <param index="1" name="max_results" type="int" default="32" /> <description> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index d7b5f24f4a..7ba52c40c6 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -358,6 +358,13 @@ Returns the physics layer or layers a body can collide with. </description> </method> + <method name="body_get_collision_priority" qualifiers="const"> + <return type="float" /> + <param index="0" name="body" type="RID" /> + <description> + Returns the body's collision priority. + </description> + </method> <method name="body_get_constant_force" qualifiers="const"> <return type="Vector2" /> <param index="0" name="body" type="RID" /> @@ -509,6 +516,14 @@ Sets the physics layer or layers a body can collide with. </description> </method> + <method name="body_set_collision_priority"> + <return type="void" /> + <param index="0" name="body" type="RID" /> + <param index="1" name="priority" type="float" /> + <description> + Sets the body's collision priority. + </description> + </method> <method name="body_set_constant_force"> <return type="void" /> <param index="0" name="body" type="RID" /> @@ -553,7 +568,7 @@ <param index="0" name="body" type="RID" /> <param index="1" name="amount" type="int" /> <description> - Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. </description> </method> <method name="body_set_mode"> @@ -882,7 +897,7 @@ Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. </constant> <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="8" enum="SpaceParameter"> - Constant to set/get the number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. + Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. </constant> <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType"> This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index c5456f7536..d4796fe2cf 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -338,6 +338,13 @@ Returns the physics layer or layers a body can collide with. </description> </method> + <method name="body_get_collision_priority" qualifiers="const"> + <return type="float" /> + <param index="0" name="body" type="RID" /> + <description> + Returns the body's collision priority. + </description> + </method> <method name="body_get_constant_force" qualifiers="const"> <return type="Vector3" /> <param index="0" name="body" type="RID" /> @@ -505,6 +512,14 @@ Sets the physics layer or layers a body can collide with. </description> </method> + <method name="body_set_collision_priority"> + <return type="void" /> + <param index="0" name="body" type="RID" /> + <param index="1" name="priority" type="float" /> + <description> + Sets the body's collision priority. + </description> + </method> <method name="body_set_constant_force"> <return type="void" /> <param index="0" name="body" type="RID" /> @@ -549,7 +564,7 @@ <param index="0" name="body" type="RID" /> <param index="1" name="amount" type="int" /> <description> - Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. </description> </method> <method name="body_set_mode"> @@ -1422,7 +1437,7 @@ Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. </constant> <constant name="SPACE_PARAM_SOLVER_ITERATIONS" value="7" enum="SpaceParameter"> - Constant to set/get the number of solver iterations for contacts and constraints. The greater the amount of iterations, the more accurate the collisions and constraints will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. + Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. </constant> <constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis"> </constant> diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml index 4188b04e4a..200065de54 100644 --- a/doc/classes/PhysicsServer3DExtension.xml +++ b/doc/classes/PhysicsServer3DExtension.xml @@ -286,6 +286,12 @@ <description> </description> </method> + <method name="_body_get_collision_priority" qualifiers="virtual const"> + <return type="float" /> + <param index="0" name="body" type="RID" /> + <description> + </description> + </method> <method name="_body_get_constant_force" qualifiers="virtual const"> <return type="Vector3" /> <param index="0" name="body" type="RID" /> @@ -430,6 +436,13 @@ <description> </description> </method> + <method name="_body_set_collision_priority" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="body" type="RID" /> + <param index="1" name="priority" type="float" /> + <description> + </description> + </method> <method name="_body_set_constant_force" qualifiers="virtual"> <return type="void" /> <param index="0" name="body" type="RID" /> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index 6b3a7ed548..564b6fe743 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -4,7 +4,7 @@ Class representing a planar [PrimitiveMesh]. </brief_description> <description> - Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use [QuadMesh] instead. + Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change [member orientation] to [constant FACE_Z]. [b]Note:[/b] When using a large textured [PlaneMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth] and [member subdivide_width] until you no longer notice UV jittering. </description> <tutorials> @@ -13,6 +13,9 @@ <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> Offset of the generated plane. Useful for particles. </member> + <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="PlaneMesh.Orientation" default="1"> + Direction that the [PlaneMesh] is facing. See [enum Orientation] for options. + </member> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)"> Size of the generated plane. </member> @@ -23,4 +26,15 @@ Number of subdivision along the X axis. </member> </members> + <constants> + <constant name="FACE_X" value="0" enum="Orientation"> + [PlaneMesh] will face the positive X-axis. + </constant> + <constant name="FACE_Y" value="1" enum="Orientation"> + [PlaneMesh] will face the positive Y-axis. This matches the behaviour of the [PlaneMesh] in Godot 3.x. + </constant> + <constant name="FACE_Z" value="2" enum="Orientation"> + [PlaneMesh] will face the positive Z-axis. This matches the behvaiour of the QuadMesh in Godot 3.x. + </constant> + </constants> </class> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 5d5c69aadd..12f8055180 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -79,10 +79,10 @@ <member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0"> </member> <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border" default="100.0"> - Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. + Added padding applied to the bounding box when [member invert_enabled] is set to [code]true[/code]. Setting this value too small may result in a "Bad Polygon" error. </member> - <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false"> - If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. + <member name="invert_enabled" type="bool" setter="set_invert_enabled" getter="get_invert_enabled" default="false"> + If [code]true[/code], the polygon will be inverted, containing the area outside the defined points and extending to the [member invert_border]. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> The offset applied to each vertex. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 26bc765ef4..0f47bea5df 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -195,13 +195,6 @@ Returns the accelerator of the item at the given [param index]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> </method> - <method name="get_item_horizontal_offset" qualifiers="const"> - <return type="int" /> - <param index="0" name="index" type="int" /> - <description> - Returns the horizontal offset of the item at the given [param index]. - </description> - </method> <method name="get_item_icon" qualifiers="const"> <return type="Texture2D" /> <param index="0" name="index" type="int" /> @@ -216,6 +209,13 @@ Returns the id of the item at the given [param index]. [code]id[/code] can be manually assigned, while index can not. </description> </method> + <method name="get_item_indent" qualifiers="const"> + <return type="int" /> + <param index="0" name="index" type="int" /> + <description> + Returns the horizontal offset of the item at the given [param index]. + </description> + </method> <method name="get_item_index" qualifiers="const"> <return type="int" /> <param index="0" name="id" type="int" /> @@ -388,14 +388,6 @@ Enables/disables the item at the given [param index]. When it is disabled, it can't be selected and its action can't be invoked. </description> </method> - <method name="set_item_horizontal_offset"> - <return type="void" /> - <param index="0" name="index" type="int" /> - <param index="1" name="offset" type="int" /> - <description> - Sets the horizontal offset of the item at the given [param index]. - </description> - </method> <method name="set_item_icon"> <return type="void" /> <param index="0" name="index" type="int" /> @@ -413,6 +405,14 @@ The [param id] is used in [signal id_pressed] and [signal id_focused] signals. </description> </method> + <method name="set_item_indent"> + <return type="void" /> + <param index="0" name="index" type="int" /> + <param index="1" name="indent" type="int" /> + <description> + Sets the horizontal offset of the item at the given [param index]. + </description> + </method> <method name="set_item_language"> <return type="void" /> <param index="0" name="index" type="int" /> @@ -540,6 +540,10 @@ Emitted when an item of some [param index] is pressed or its accelerator is activated. </description> </signal> + <signal name="menu_changed"> + <description> + </description> + </signal> </signals> <theme_items> <theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)"> @@ -566,6 +570,9 @@ <theme_item name="h_separation" data_type="constant" type="int" default="4"> The horizontal space between the item's elements. </theme_item> + <theme_item name="indent" data_type="constant" type="int" default="10"> + Width of the single indentation level. + </theme_item> <theme_item name="item_end_padding" data_type="constant" type="int" default="2"> </theme_item> <theme_item name="item_start_padding" data_type="constant" type="int" default="2"> diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index d850cf20b8..0c6c342f5b 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -5,6 +5,7 @@ </brief_description> <description> Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [Window]. + If any [Control] node is added as a child of this [PopupPanel], it will be stretched to fit the panel's size (similar to how [PanelContainer] works). </description> <tutorials> </tutorials> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 7046a21f68..1b9ecdbfa0 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -4,7 +4,7 @@ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. </brief_description> <description> - Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh]. + Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], and [SphereMesh]. </description> <tutorials> </tutorials> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 9dd41d270e..a2e202b218 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -129,20 +129,6 @@ Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [param path]. See also [method globalize_path]. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the specified property exists and its initial value differs from the current value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the specified property's initial value. Returns [code]null[/code] if the property does not exist. - </description> - </method> <method name="save"> <return type="int" enum="Error" /> <description> @@ -292,6 +278,8 @@ </member> <member name="audio/driver/driver" type="String" setter="" getter=""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. + The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] command line argument. </member> <member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false"> If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. @@ -344,7 +332,7 @@ Path to logs within the project. Using an [code]user://[/code] path is recommended. </member> <member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5"> - Specifies the maximum amount of log files allowed (used for rotation). + Specifies the maximum number of log files allowed (used for rotation). </member> <member name="debug/gdscript/warnings/assert_always_false" type="int" setter="" getter="" default="1"> If [code]enabled[/code], prints a warning or an error when an [code]assert[/code] call always returns false. @@ -466,7 +454,7 @@ Maximum call stack allowed for debugging GDScript. </member> <member name="debug/settings/profiler/max_functions" type="int" setter="" getter="" default="16384"> - Maximum amount of functions per frame allowed when profiling. + Maximum number of functions per frame allowed when profiling. </member> <member name="debug/settings/stdout/print_fps" type="bool" setter="" getter="" default="false"> Print frames per second to standard output every second. @@ -476,9 +464,6 @@ <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. </member> - <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024"> - Maximum call stack in visual scripting, to avoid infinite recursion. - </member> <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)"> Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. </member> @@ -576,19 +561,19 @@ Allows the window to be resizable by default. [b]Note:[/b] This setting is ignored on iOS. </member> - <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="600"> - Sets the game's main viewport height. On desktop platforms, this is also the initial window height. + <member name="display/window/size/viewport_height" type="int" setter="" getter="" default="648"> + Sets the game's main viewport height. On desktop platforms, this is also the initial window height, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the [code]canvas_items[/code] or [code]viewport[/code] stretch modes. See also [member display/window/size/viewport_width], [member display/window/size/window_width_override] and [member display/window/size/window_height_override]. </member> - <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1024"> - Sets the game's main viewport width. On desktop platforms, this is also the initial window width. + <member name="display/window/size/viewport_width" type="int" setter="" getter="" default="1152"> + Sets the game's main viewport width. On desktop platforms, this is also the initial window width, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the [code]canvas_items[/code] or [code]viewport[/code] stretch modes. See also [member display/window/size/viewport_height], [member display/window/size/window_width_override] and [member display/window/size/window_height_override]. </member> <member name="display/window/size/window_height_override" type="int" setter="" getter="" default="0"> - On desktop platforms, sets the game's initial window height. - [b]Note:[/b] By default, or when set to 0, the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and HTML5. + On desktop platforms, overrides the game's initial window height. See also [member display/window/size/window_width_override], [member display/window/size/viewport_width] and [member display/window/size/viewport_height]. + [b]Note:[/b] By default, or when set to [code]0[/code], the initial window height is the [member display/window/size/viewport_height]. This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/size/window_width_override" type="int" setter="" getter="" default="0"> - On desktop platforms, sets the game's initial window width. - [b]Note:[/b] By default, or when set to 0, the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5. + On desktop platforms, overrides the game's initial window width. See also [member display/window/size/window_height_override], [member display/window/size/viewport_width] and [member display/window/size/viewport_height]. + [b]Note:[/b] By default, or when set to [code]0[/code], the initial window width is the viewport [member display/window/size/viewport_width]. This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> Sets the V-Sync mode for the main game window. @@ -867,6 +852,7 @@ </member> <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] command line argument. </member> <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. @@ -930,6 +916,9 @@ </member> <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> Specifies the [TextServer] to use. If left empty, the default will be used. + "ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] command line argument. + [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] command line argument. </member> <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -1441,20 +1430,6 @@ <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60"> This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. </member> - <member name="mono/debugger_agent/port" type="int" setter="" getter="" default="23685"> - </member> - <member name="mono/debugger_agent/wait_for_debugger" type="bool" setter="" getter="" default="false"> - </member> - <member name="mono/debugger_agent/wait_timeout" type="int" setter="" getter="" default="3000"> - </member> - <member name="mono/profiler/args" type="String" setter="" getter="" default=""log:calls,alloc,sample,output=output.mlpd""> - </member> - <member name="mono/profiler/enabled" type="bool" setter="" getter="" default="false"> - </member> - <member name="mono/runtime/unhandled_exception_policy" type="int" setter="" getter="" default="0"> - The policy to use for unhandled Mono (C#) exceptions. The default "Terminate Application" exits the project as soon as an unhandled exception is thrown. "Log Error" logs an error message to the console instead, and will not interrupt the project execution when an unhandled exception is thrown. - [b]Note:[/b] The unhandled exception policy is always set to "Log Error" in the editor, which also includes C# [code]tool[/code] scripts running within the editor as well as editor plugin code. - </member> <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="1"> Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size]. </member> @@ -1468,13 +1443,13 @@ Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin]. </member> <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> - Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. + Maximum number of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> <member name="network/limits/debugger/max_errors_per_second" type="int" setter="" getter="" default="400"> Maximum number of errors allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> <member name="network/limits/debugger/max_queued_messages" type="int" setter="" getter="" default="2048"> - Maximum amount of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. + Maximum number of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. </member> <member name="network/limits/debugger/max_warnings_per_second" type="int" setter="" getter="" default="400"> Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. @@ -1565,7 +1540,7 @@ Individual shapes can have a specific bias value (see [member Shape2D.custom_solver_bias]). </member> <member name="physics/2d/solver/solver_iterations" type="int" setter="" getter="" default="16"> - Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS]. + Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS]. </member> <member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5"> Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP]. @@ -1633,7 +1608,7 @@ Individual shapes can have a specific bias value (see [member Shape3D.custom_solver_bias]). </member> <member name="physics/3d/solver/solver_iterations" type="int" setter="" getter="" default="16"> - Number of solver iterations for all contacts and constraints. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS]. + Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See [constant PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS]. </member> <member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5"> Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See [constant PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP]. @@ -1836,7 +1811,7 @@ Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and [member rendering/limits/opengl/max_renderable_lights]. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. </member> <member name="rendering/limits/opengl/max_renderable_elements" type="int" setter="" getter="" default="65536"> - Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + Max number of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. </member> <member name="rendering/limits/opengl/max_renderable_lights" type="int" setter="" getter="" default="32"> Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. @@ -1970,6 +1945,7 @@ <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. The anisotropic filtering level also affects decals and light projectors if they are configured to use anisotropic filtering. See [member rendering/textures/decals/filter] and [member rendering/textures/light_projectors/filter]. + [b]Note:[/b] For performance reasons, anisotropic filtering [i]is not enabled by default[/i] on 2D and 3D materials. For this setting to have an effect in 3D, set [member BaseMaterial3D.texture_filter] to [constant BaseMaterial3D.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant BaseMaterial3D.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on materials. For this setting to have an effect in 2D, set [member CanvasItem.texture_filter] to [constant CanvasItem.TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC] or [constant CanvasItem.TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC] on the [CanvasItem] node displaying the texture (or in [CanvasTexture]). However, anisotropic filtering is rarely useful in 2D, so only enable it for textures in 2D if it makes a meaningful visual difference. [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <member name="rendering/textures/default_filters/texture_mipmap_bias" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml index b8f6e54d87..5690ea5e95 100644 --- a/doc/classes/Projection.xml +++ b/doc/classes/Projection.xml @@ -24,6 +24,16 @@ <description> </description> </constructor> + <constructor name="Projection"> + <return type="Projection" /> + <param index="0" name="x_axis" type="Vector4" /> + <param index="1" name="y_axis" type="Vector4" /> + <param index="2" name="z_axis" type="Vector4" /> + <param index="3" name="w_axis" type="Vector4" /> + <description> + Constructs a Projection from four [Vector4] values (matrix columns). + </description> + </constructor> </constructors> <methods> <method name="create_depth_correction" qualifiers="static"> diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml deleted file mode 100644 index 778e3f3f69..0000000000 --- a/doc/classes/ProxyTexture.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ProxyTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <members> - <member name="base" type="Texture2D" setter="set_base" getter="get_base"> - </member> - </members> -</class> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml deleted file mode 100644 index d641ebaa1f..0000000000 --- a/doc/classes/QuadMesh.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="QuadMesh" inherits="PrimitiveMesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - Class representing a square mesh. - </brief_description> - <description> - Class representing a square [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike [PlaneMesh], this mesh doesn't provide subdivision options. - </description> - <tutorials> - <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link> - <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link> - </tutorials> - <members> - <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> - Offset of the generated Quad. Useful for particles. - </member> - <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> - Size on the X and Y axes. - </member> - </members> -</class> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 6fb5b6d181..a521af5709 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -71,7 +71,7 @@ <param index="0" name="to" type="Quaternion" /> <description> Returns the angle between this quaternion and [param to]. This is the magnitude of the angle you would need to rotate by to get from one to the other. - [b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably. + [b]Note:[/b] This method has an abnormally high number of floating-point errors, so methods such as [code]is_zero_approx[/code] will not work reliably. </description> </method> <method name="dot" qualifiers="const"> @@ -171,6 +171,20 @@ Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight]. </description> </method> + <method name="spherical_cubic_interpolate_in_time" qualifiers="const"> + <return type="Quaternion" /> + <param index="0" name="b" type="Quaternion" /> + <param index="1" name="pre_a" type="Quaternion" /> + <param index="2" name="post_b" type="Quaternion" /> + <param index="3" name="weight" type="float" /> + <param index="4" name="b_t" type="float" /> + <param index="5" name="pre_a_t" type="float" /> + <param index="6" name="post_b_t" type="float" /> + <description> + Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight]. + It can perform smoother interpolation than [code]spherical_cubic_interpolate()[/code] by the time values. + </description> + </method> </methods> <members> <member name="w" type="float" setter="" getter="" default="1.0"> diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml index d144024000..e4b7883f02 100644 --- a/doc/classes/RDUniform.xml +++ b/doc/classes/RDUniform.xml @@ -19,7 +19,7 @@ </description> </method> <method name="get_ids" qualifiers="const"> - <return type="Array" /> + <return type="RID[]" /> <description> </description> </method> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index 4f4395a433..08627b0bd5 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -47,6 +47,12 @@ Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + </description> + </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 7cc6fc55cd..1bcd6f1f31 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -48,6 +48,12 @@ Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <description> + Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). + </description> + </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index ff66a89cb7..fee48dd246 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -50,7 +50,7 @@ [b]Note:[/b] [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD). </member> <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3(0, 0, 0)"> - Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that "get in the way" of the reflection. + Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection. </member> <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0"> Sets how frequently the [ReflectionProbe] is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS]. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index bd930bf93f..a12bd71454 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1406,7 +1406,7 @@ </description> </method> <method name="instance_geometry_get_shader_uniform_list" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="instance" type="RID" /> <description> </description> @@ -1581,7 +1581,7 @@ </description> </method> <method name="instances_cull_aabb" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt64Array" /> <param index="0" name="aabb" type="AABB" /> <param index="1" name="scenario" type="RID" /> <description> @@ -1590,7 +1590,7 @@ </description> </method> <method name="instances_cull_convex" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt64Array" /> <param index="0" name="convex" type="Array" /> <param index="1" name="scenario" type="RID" /> <description> @@ -1599,7 +1599,7 @@ </description> </method> <method name="instances_cull_ray" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt64Array" /> <param index="0" name="from" type="Vector3" /> <param index="1" name="to" type="Vector3" /> <param index="2" name="scenario" type="RID" /> @@ -1801,7 +1801,7 @@ <param index="1" name="longitudes" type="int" /> <param index="2" name="radius" type="float" /> <description> - Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. + Returns a mesh of a sphere with the given number of horizontal and vertical subdivisions. </description> </method> <method name="material_create"> @@ -1959,7 +1959,7 @@ </description> </method> <method name="mesh_surface_get_blend_shape_arrays" qualifiers="const"> - <return type="Array" /> + <return type="Array[]" /> <param index="0" name="mesh" type="RID" /> <param index="1" name="surface" type="int" /> <description> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index a84c2165f5..05bfcf3446 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -26,8 +26,8 @@ </method> <method name="_save" qualifiers="virtual"> <return type="int" /> - <param index="0" name="path" type="Resource" /> - <param index="1" name="resource" type="String" /> + <param index="0" name="resource" type="Resource" /> + <param index="1" name="path" type="String" /> <param index="2" name="flags" type="int" /> <description> Saves the given resource object to a file at the target [param path]. [param flags] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 62142fce8b..f96e136a57 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -481,8 +481,8 @@ If [code]true[/code], the label uses the custom font color. </member> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> - The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. - [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. + The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to [code]1.0[/code], all characters are displayed. If set to [code]0.5[/code], only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + [b]Note:[/b] Setting this property updates [member visible_characters] accordingly. </member> <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000"> The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely. @@ -520,8 +520,8 @@ If [code]true[/code], text processing is done in a background thread. </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> - The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. - [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count]. + The number of characters to display. If set to [code]-1[/code], all characters are displayed. This can be useful when animating the text appearing in a dialog box. + [b]Note:[/b] Setting this property updates [member percent_visible] accordingly. </member> <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0"> Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info. diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml index 445e6d94ea..1434affee1 100644 --- a/doc/classes/RigidDynamicBody2D.xml +++ b/doc/classes/RigidDynamicBody2D.xml @@ -100,10 +100,17 @@ <method name="get_colliding_bodies" qualifiers="const"> <return type="Node2D[]" /> <description> - Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> + <method name="get_contact_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). + [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies]. + </description> + </method> <method name="set_axis_velocity"> <return type="void" /> <param index="0" name="axis_velocity" type="Vector2" /> @@ -142,11 +149,8 @@ See [method add_constant_torque]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> - If [code]true[/code], the body will emit signals when it collides with another RigidDynamicBody2D. See also [member contacts_reported]. - </member> - <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> - The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. - [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end). + If [code]true[/code], the RigidDynamicBody2D will emit signals when it collides with another RigidDynamicBody2D. + [b]Note:[/b] By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. </member> <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidDynamicBody2D.CCDMode" default="0"> Continuous collision detection mode. @@ -187,6 +191,10 @@ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> + <member name="max_contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> + The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to [code]true[/code] to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. @@ -199,14 +207,14 @@ <signal name="body_entered"> <param index="0" name="body" type="Node" /> <description> - Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node" /> <description> - Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> @@ -216,7 +224,7 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when one of this RigidDynamicBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. @@ -229,7 +237,7 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + Emitted when the collision between one of this RigidDynamicBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml index 83f24be418..fb747177ae 100644 --- a/doc/classes/RigidDynamicBody3D.xml +++ b/doc/classes/RigidDynamicBody3D.xml @@ -98,12 +98,19 @@ </description> </method> <method name="get_colliding_bodies" qualifiers="const"> - <return type="Array" /> + <return type="Node3D[]" /> <description> - Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> + <method name="get_contact_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). + [b]Note:[/b] To retrieve the colliding bodies, use [method get_colliding_bodies]. + </description> + </method> <method name="get_inverse_inertia_tensor" qualifiers="const"> <return type="Basis" /> <description> @@ -148,11 +155,8 @@ See [method add_constant_torque]. </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> - If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. See also [member contacts_reported]. - </member> - <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> - The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code]. - [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + If [code]true[/code], the RigidDynamicBody3D will emit signals when it collides with another RigidDynamicBody3D. + [b]Note:[/b] By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. </member> <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" default="false"> If [code]true[/code], continuous collision detection is used. @@ -193,6 +197,10 @@ <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> + <member name="max_contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> + The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to [code]true[/code] to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. + [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. @@ -205,14 +213,14 @@ <signal name="body_entered"> <param index="0" name="body" type="Node" /> <description> - Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node" /> <description> - Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> @@ -222,7 +230,7 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when one of this RigidDynamicBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. @@ -235,7 +243,7 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + Emitted when the collision between one of this RigidDynamicBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 0496b8f34b..417703ff01 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -113,14 +113,14 @@ </description> </method> <method name="get_nodes_in_group"> - <return type="Array" /> + <return type="Node[]" /> <param index="0" name="group" type="StringName" /> <description> Returns a list of all nodes assigned to the given group. </description> </method> <method name="get_processed_tweens"> - <return type="Array" /> + <return type="Tween[]" /> <description> Returns an array of currently existing [Tween]s in the [SceneTree] (both running and paused). </description> @@ -215,12 +215,15 @@ </member> <member name="debug_collisions_hint" type="bool" setter="set_debug_collisions_hint" getter="is_debugging_collisions_hint" default="false"> If [code]true[/code], collision shapes will be visible when running the game from the editor for debugging purposes. + [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_collisions_hint] while the project is running will not have the desired effect. </member> <member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint" default="false"> If [code]true[/code], navigation polygons will be visible when running the game from the editor for debugging purposes. + [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_navigation_hint] while the project is running will not have the desired effect. </member> <member name="debug_paths_hint" type="bool" setter="set_debug_paths_hint" getter="is_debugging_paths_hint" default="false"> If [code]true[/code], curves from [Path2D] and [Path3D] nodes will be visible when running the game from the editor for debugging purposes. + [b]Note:[/b] This property is not designed to be changed at run-time. Changing the value of [member debug_paths_hint] while the project is running will not have the desired effect. </member> <member name="edited_scene_root" type="Node" setter="set_edited_scene_root" getter="get_edited_scene_root"> The root of the edited scene. diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 8202f9f536..40ec8ed429 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -44,19 +44,19 @@ </description> </method> <method name="get_script_method_list"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the list of methods in this [Script]. </description> </method> <method name="get_script_property_list"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the list of properties in this [Script]. </description> </method> <method name="get_script_signal_list"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns the list of user signals defined in this [Script]. </description> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 9118f38a3e..becaff975e 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -22,13 +22,13 @@ </description> </method> <method name="get_open_script_editors" qualifiers="const"> - <return type="Array" /> + <return type="ScriptEditorBase[]" /> <description> Returns an array with all [ScriptEditorBase] objects which are currently open in editor. </description> </method> <method name="get_open_scripts" qualifiers="const"> - <return type="Array" /> + <return type="Script[]" /> <description> Returns an array with all [Script] objects which are currently open in editor. </description> diff --git a/doc/classes/ScriptExtension.xml b/doc/classes/ScriptExtension.xml index b59c49d785..045eadda41 100644 --- a/doc/classes/ScriptExtension.xml +++ b/doc/classes/ScriptExtension.xml @@ -96,6 +96,12 @@ <description> </description> </method> + <method name="_has_property_default_value" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="property" type="StringName" /> + <description> + </description> + </method> <method name="_has_script_signal" qualifiers="virtual const"> <return type="bool" /> <param index="0" name="signal" type="StringName" /> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 92df3255b1..8d4df87b39 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -17,20 +17,6 @@ Returns the current value set for this material of a uniform in the shader. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [param name] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the material property with given [param name]. - </description> - </method> <method name="set_shader_uniform"> <return type="void" /> <param index="0" name="param" type="StringName" /> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 4d7031ab86..34ca228795 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -21,7 +21,7 @@ </description> </method> <method name="collide_and_get_contacts"> - <return type="Array" /> + <return type="PackedVector2Array" /> <param index="0" name="local_xform" type="Transform2D" /> <param index="1" name="with_shape" type="Shape2D" /> <param index="2" name="shape_xform" type="Transform2D" /> @@ -45,7 +45,7 @@ </description> </method> <method name="collide_with_motion_and_get_contacts"> - <return type="Array" /> + <return type="PackedVector2Array" /> <param index="0" name="local_xform" type="Transform2D" /> <param index="1" name="local_motion" type="Vector2" /> <param index="2" name="with_shape" type="Shape2D" /> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 7f2a41e00c..75f7a37752 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -20,15 +20,6 @@ Adds a bone, with name [param name]. [method get_bone_count] will become the bone index. </description> </method> - <method name="add_bone_child"> - <return type="void" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="child_bone_idx" type="int" /> - <description> - Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. - This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes. - </description> - </method> <method name="clear_bones"> <return type="void" /> <description> @@ -90,7 +81,7 @@ <method name="get_bone_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of bones in the skeleton. + Returns the number of bones in the skeleton. </description> </method> <method name="get_bone_global_pose" qualifiers="const"> @@ -272,21 +263,17 @@ Binds the given Skin to the Skeleton. </description> </method> - <method name="remove_bone_child"> + <method name="reset_bone_pose"> <return type="void" /> <param index="0" name="bone_idx" type="int" /> - <param index="1" name="child_bone_idx" type="int" /> <description> - Removes the passed in child bone index, [param child_bone_idx], from the passed-in bone, [param bone_idx], if it exists. - [b]Note:[/b] This does not remove the child bone, but instead it removes the connection it has to the parent bone. + Sets the bone pose to rest for [param bone_idx]. </description> </method> - <method name="set_bone_children"> + <method name="reset_bone_poses"> <return type="void" /> - <param index="0" name="bone_idx" type="int" /> - <param index="1" name="bone_children" type="PackedInt32Array" /> <description> - Sets the children for the passed in bone, [param bone_idx], to the passed-in array of bone indexes, [param bone_children]. + Sets all bone poses to rests. </description> </method> <method name="set_bone_enabled"> diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml index e37dc62131..c8fee3f94d 100644 --- a/doc/classes/SkeletonModification2DCCDIK.xml +++ b/doc/classes/SkeletonModification2DCCDIK.xml @@ -121,7 +121,7 @@ </methods> <members> <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0"> - The amount of CCDIK joints in the CCDIK modification. + The number of CCDIK joints in the CCDIK modification. </member> <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to. diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml index 1240174946..ff3a65fe1a 100644 --- a/doc/classes/SkeletonModification2DFABRIK.xml +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -77,7 +77,7 @@ </methods> <members> <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0"> - The amount of FABRIK joints in the FABRIK modification. + The number of FABRIK joints in the FABRIK modification. </member> <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to. diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index 66ff160ab1..d5f46b2ea0 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -50,7 +50,7 @@ </methods> <members> <member name="physical_bone_chain_length" type="int" setter="set_physical_bone_chain_length" getter="get_physical_bone_chain_length" default="0"> - The amount of [PhysicalBone2D] nodes linked in this modification. + The number of [PhysicalBone2D] nodes linked in this modification. </member> </members> </class> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml index 207896776f..dec0fbe99f 100644 --- a/doc/classes/SkeletonModification3DCCDIK.xml +++ b/doc/classes/SkeletonModification3DCCDIK.xml @@ -121,7 +121,7 @@ </methods> <members> <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0"> - The amount of CCDIK joints in the CCDIK modification. + The number of CCDIK joints in the CCDIK modification. </member> <member name="high_quality_solve" type="bool" setter="set_use_high_quality_solve" getter="get_use_high_quality_solve" default="true"> When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance. diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml index fd4a8d462a..34c7099bca 100644 --- a/doc/classes/SkeletonModificationStack3D.xml +++ b/doc/classes/SkeletonModificationStack3D.xml @@ -79,7 +79,7 @@ When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node. </member> <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0"> - The amount of modifications in the stack. + The number of modifications in the stack. </member> <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses. diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml index 7470f89979..a67c38b12d 100644 --- a/doc/classes/SliderJoint3D.xml +++ b/doc/classes/SliderJoint3D.xml @@ -28,7 +28,7 @@ The amount of damping of the rotation when the limit is surpassed. A lower damping value allows a rotation initiated by body A to travel to body B slower. </member> - <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular" default="0.0"> + <member name="angular_limit/lower_angle" type="float" setter="set_param" getter="get_param" default="0.0"> The lower limit of rotation in the slider. </member> <member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> @@ -39,7 +39,7 @@ A factor applied to the all rotation once the limit is surpassed. Makes all rotation slower when between 0 and 1. </member> - <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular" default="0.0"> + <member name="angular_limit/upper_angle" type="float" setter="set_param" getter="get_param" default="0.0"> The upper limit of rotation in the slider. </member> <member name="angular_motion/damping" type="float" setter="set_param" getter="get_param" default="1.0"> diff --git a/doc/classes/SoftDynamicBody3D.xml b/doc/classes/SoftDynamicBody3D.xml index 87492704d7..7f0a1d94d0 100644 --- a/doc/classes/SoftDynamicBody3D.xml +++ b/doc/classes/SoftDynamicBody3D.xml @@ -19,7 +19,7 @@ </description> </method> <method name="get_collision_exceptions"> - <return type="Array" /> + <return type="PhysicsBody3D[]" /> <description> Returns an array of nodes that were added as collision exceptions for this body. </description> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 5bad9796b4..4188563695 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -37,14 +37,14 @@ <method name="get_available_bytes" qualifiers="const"> <return type="int" /> <description> - Returns the amount of bytes this [StreamPeer] has available. + Returns the number of bytes this [StreamPeer] has available. </description> </method> <method name="get_data"> <return type="Array" /> <param index="0" name="bytes" type="int" /> <description> - Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array. + Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array. </description> </method> <method name="get_double"> @@ -63,7 +63,7 @@ <return type="Array" /> <param index="0" name="bytes" type="int" /> <description> - Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array. + Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array. </description> </method> <method name="get_string"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index ee508cf70a..f1cd4d72f7 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -440,7 +440,7 @@ <method name="length" qualifiers="const"> <return type="int" /> <description> - Returns the string's amount of characters. + Returns the number of characters in the string. </description> </method> <method name="lpad" qualifiers="const"> @@ -522,7 +522,7 @@ # Last digit will be rounded up here, which reduces total digit count since # trailing zeros are removed: String.num(42.129999, 5) # "42.13" - # If `decimals` is not specified, the total amount of significant digits is 14: + # If `decimals` is not specified, the total number of significant digits is 14: String.num(-0.0000012345432123454321) # "-0.00000123454321" String.num(-10000.0000012345432123454321) # "-10000.0000012345" [/codeblock] diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml index b1b78f1705..b7454cc7d2 100644 --- a/doc/classes/SystemFont.xml +++ b/doc/classes/SystemFont.xml @@ -34,6 +34,9 @@ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="1"> Font hinting mode. </member> + <member name="multichannel_signed_distance_field" type="bool" setter="set_multichannel_signed_distance_field" getter="is_multichannel_signed_distance_field" default="false"> + If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + </member> <member name="oversampling" type="float" setter="set_oversampling" getter="get_oversampling" default="0.0"> Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. </member> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 40d6d67f4c..aa7ce85f3a 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -161,7 +161,7 @@ <method name="get_gutter_count" qualifiers="const"> <return type="int" /> <description> - Returns the total amount of gutters registered. + Returns the number of gutters registered. </description> </method> <method name="get_gutter_name" qualifiers="const"> @@ -189,7 +189,7 @@ <return type="int" /> <param index="0" name="line" type="int" /> <description> - Returns the amount of spaces and [code]tab * tab_size[/code] before the first char. + Returns the number of spaces and [code]tab * tab_size[/code] before the first char. </description> </method> <method name="get_last_full_visible_line" qualifiers="const"> @@ -235,7 +235,7 @@ <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of total lines in the text. + Returns the number of lines in the text. </description> </method> <method name="get_line_gutter_icon" qualifiers="const"> @@ -329,7 +329,7 @@ <method name="get_minimap_visible_lines" qualifiers="const"> <return type="int" /> <description> - Returns the total amount of lines that can be draw on the minimap. + Returns the number of lines that may be drawn on the minimap. </description> </method> <method name="get_next_visible_line_index_offset_from" qualifiers="const"> @@ -444,7 +444,7 @@ <method name="get_total_visible_line_count" qualifiers="const"> <return type="int" /> <description> - Returns the total amount of lines that could be draw. + Returns the number of lines that may be drawn. </description> </method> <method name="get_version" qualifiers="const"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index c18291914f..9c4f7857c7 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -188,7 +188,7 @@ </description> </method> <method name="font_get_glyph_list" qualifiers="const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <param index="0" name="font_rid" type="RID" /> <param index="1" name="size" type="Vector2i" /> <description> @@ -268,7 +268,7 @@ </description> </method> <method name="font_get_kerning_list" qualifiers="const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="font_rid" type="RID" /> <param index="1" name="size" type="int" /> <description> @@ -349,7 +349,7 @@ </description> </method> <method name="font_get_size_cache_list" qualifiers="const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="font_rid" type="RID" /> <description> Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. @@ -942,7 +942,7 @@ <param index="0" name="string" type="String" /> <param index="1" name="dict" type="PackedStringArray" /> <description> - Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found. + Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found. [b]Note:[/b] This method doesn't detect invisible characters, for spoof detection use it in combination with [method spoof_check]. [b]Note:[/b] Always returns [code]-1[/code] if the server does not support the [constant FEATURE_UNICODE_SECURITY] feature. </description> @@ -993,7 +993,7 @@ </description> </method> <method name="parse_structured_text" qualifiers="const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" /> <param index="1" name="args" type="Array" /> <param index="2" name="text" type="String" /> @@ -1162,7 +1162,7 @@ </description> </method> <method name="shaped_text_get_ellipsis_glyphs" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="shaped" type="RID" /> <description> Returns array of the glyphs in the ellipsis. @@ -1183,7 +1183,7 @@ </description> </method> <method name="shaped_text_get_glyphs" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="shaped" type="RID" /> <description> Returns an array of glyphs in the visual order. @@ -1463,7 +1463,7 @@ </description> </method> <method name="shaped_text_sort_logical"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="shaped" type="RID" /> <description> Returns text glyphs in the logical order. @@ -1707,10 +1707,10 @@ Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times. </constant> <constant name="SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE" value="20" enum="SubpixelPositioning"> - Maximum font size which will use one half of the pixel subpixel positioning in [constants SUBPIXEL_POSITIONING_AUTO] mode. + Maximum font size which will use one half of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode. </constant> <constant name="SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE" value="16" enum="SubpixelPositioning"> - Maximum font size which will use one quarter of the pixel subpixel positioning in [constants SUBPIXEL_POSITIONING_AUTO] mode. + Maximum font size which will use one quarter of the pixel subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode. </constant> <constant name="FEATURE_SIMPLE_LAYOUT" value="1" enum="Feature"> TextServer supports simple text layouts. diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index b288dc5416..9eb7188846 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -180,7 +180,7 @@ </description> </method> <method name="font_get_glyph_list" qualifiers="virtual const"> - <return type="Array" /> + <return type="PackedInt32Array" /> <param index="0" name="font_rid" type="RID" /> <param index="1" name="size" type="Vector2i" /> <description> @@ -258,7 +258,7 @@ </description> </method> <method name="font_get_kerning_list" qualifiers="virtual const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="font_rid" type="RID" /> <param index="1" name="size" type="int" /> <description> @@ -339,7 +339,7 @@ </description> </method> <method name="font_get_size_cache_list" qualifiers="virtual const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="font_rid" type="RID" /> <description> Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. @@ -939,7 +939,7 @@ <param index="0" name="string" type="String" /> <param index="1" name="dict" type="PackedStringArray" /> <description> - Returns index of the first string in [code]dict[/dict] which is visually confusable with the [code]string[/string], or [code]-1[/code] if none is found. + Returns index of the first string in [param dict] which is visually confusable with the [param string], or [code]-1[/code] if none is found. </description> </method> <method name="is_locale_right_to_left" qualifiers="virtual const"> @@ -979,7 +979,7 @@ </description> </method> <method name="parse_structured_text" qualifiers="virtual const"> - <return type="Array" /> + <return type="Vector2i[]" /> <param index="0" name="parser_type" type="int" enum="TextServer.StructuredTextParser" /> <param index="1" name="args" type="Array" /> <param index="2" name="text" type="String" /> diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml index 19b0e9e6f2..9477e5ec54 100644 --- a/doc/classes/TextServerManager.xml +++ b/doc/classes/TextServerManager.xml @@ -38,7 +38,7 @@ </description> </method> <method name="get_interfaces" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns a list of available interfaces the index and name of each interface. </description> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 4266a414ce..5530759628 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -77,14 +77,14 @@ <description> Triggers an update of the TileMap. If [param layer] is provided, only updates the given layer. [b]Note:[/b] The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in [method _tile_data_runtime_update]) need to be applied. - [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example). + [b]Warning:[/b] Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and the tiles they impact (by placing frequently updated tiles in a dedicated layer for example). </description> </method> <method name="get_cell_alternative_tile" qualifiers="const"> <return type="int" /> <param index="0" name="layer" type="int" /> <param index="1" name="coords" type="Vector2i" /> - <param index="2" name="use_proxies" type="bool" /> + <param index="2" name="use_proxies" type="bool" default="false" /> <description> Returns the tile alternative ID of the cell on layer [param layer] at [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> @@ -93,7 +93,7 @@ <return type="Vector2i" /> <param index="0" name="layer" type="int" /> <param index="1" name="coords" type="Vector2i" /> - <param index="2" name="use_proxies" type="bool" /> + <param index="2" name="use_proxies" type="bool" default="false" /> <description> Returns the tile atlas coordinates ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> @@ -102,11 +102,21 @@ <return type="int" /> <param index="0" name="layer" type="int" /> <param index="1" name="coords" type="Vector2i" /> - <param index="2" name="use_proxies" type="bool" /> + <param index="2" name="use_proxies" type="bool" default="false" /> <description> Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> </method> + <method name="get_cell_tile_data" qualifiers="const"> + <return type="TileData" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="coords" type="Vector2i" /> + <param index="2" name="use_proxies" type="bool" default="false" /> + <description> + Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell is not a [TileSetAtlasSource]. + If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. + </description> + </method> <method name="get_coords_for_body_rid"> <return type="Vector2i" /> <param index="0" name="body" type="RID" /> @@ -253,7 +263,6 @@ <description> Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. - If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. [b]Note:[/b] To work correctly, [code]set_cells_terrain_connect[/code] requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. </description> </method> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 3da9096555..7b18d8ddb6 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -65,7 +65,7 @@ </description> </method> <method name="get_loaded_locales" qualifiers="const"> - <return type="Array" /> + <return type="PackedStringArray" /> <description> Returns an array of all loaded locales of the project. </description> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index efa0e4e393..bf66d9f12a 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -351,10 +351,11 @@ Emitted when [method TreeItem.propagate_check] is called. Connect to this signal to process the items that are affected when [method TreeItem.propagate_check] is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item. </description> </signal> - <signal name="column_title_pressed"> + <signal name="column_title_clicked"> <param index="0" name="column" type="int" /> + <param index="1" name="mouse_button_index" type="int" /> <description> - Emitted when a column's title is pressed. + Emitted when a column's title is clicked with either [constant MOUSE_BUTTON_LEFT] or [constant MOUSE_BUTTON_RIGHT]. </description> </signal> <signal name="custom_item_clicked"> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 6207477441..6d4408cf61 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -126,7 +126,7 @@ </description> </method> <method name="get_children"> - <return type="Array" /> + <return type="TreeItem[]" /> <description> Returns an array of references to the item's children. </description> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 0d6fcd0ef5..6b384d6a77 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -23,7 +23,6 @@ [/codeblocks] Godot tracks all scripting API variables within Variants. Without even realizing it, you use Variants all the time. When a particular language enforces its own rules for keeping data typed, then that language is applying its own custom logic over the base Variant scripting API. - GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types. - - VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. - C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept. The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]). [codeblocks] diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 904fc6d9e9..19fe2e2bfc 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -135,6 +135,20 @@ Cubically interpolates between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> + <method name="cubic_interpolate_in_time" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="b" type="Vector2" /> + <param index="1" name="pre_a" type="Vector2" /> + <param index="2" name="post_b" type="Vector2" /> + <param index="3" name="weight" type="float" /> + <param index="4" name="b_t" type="float" /> + <param index="5" name="pre_a_t" type="float" /> + <param index="6" name="post_b_t" type="float" /> + <description> + Cubically interpolates between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. + It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values. + </description> + </method> <method name="direction_to" qualifiers="const"> <return type="Vector2" /> <param index="0" name="to" type="Vector2" /> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 208e9935e3..150d53845c 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -109,6 +109,20 @@ Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> + <method name="cubic_interpolate_in_time" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="b" type="Vector3" /> + <param index="1" name="pre_a" type="Vector3" /> + <param index="2" name="post_b" type="Vector3" /> + <param index="3" name="weight" type="float" /> + <param index="4" name="b_t" type="float" /> + <param index="5" name="pre_a_t" type="float" /> + <param index="6" name="post_b_t" type="float" /> + <description> + Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. + It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values. + </description> + </method> <method name="direction_to" qualifiers="const"> <return type="Vector3" /> <param index="0" name="to" type="Vector3" /> diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 538cdd4138..b9f509cfe7 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -73,6 +73,20 @@ Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> + <method name="cubic_interpolate_in_time" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="b" type="Vector4" /> + <param index="1" name="pre_a" type="Vector4" /> + <param index="2" name="post_b" type="Vector4" /> + <param index="3" name="weight" type="float" /> + <param index="4" name="b_t" type="float" /> + <param index="5" name="pre_a_t" type="float" /> + <param index="6" name="post_b_t" type="float" /> + <description> + Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation. + It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values. + </description> + </method> <method name="direction_to" qualifiers="const"> <return type="Vector4" /> <param index="0" name="to" type="Vector4" /> diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml deleted file mode 100644 index 56b60ba13c..0000000000 --- a/doc/classes/VelocityTracker3D.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VelocityTracker3D" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> - <brief_description> - </brief_description> - <description> - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_tracked_linear_velocity" qualifiers="const"> - <return type="Vector3" /> - <description> - </description> - </method> - <method name="reset"> - <return type="void" /> - <param index="0" name="position" type="Vector3" /> - <description> - </description> - </method> - <method name="update_position"> - <return type="void" /> - <param index="0" name="position" type="Vector3" /> - <description> - </description> - </method> - </methods> - <members> - <member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step" default="false"> - </member> - </members> -</class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 558b1086b7..a2089ae2b8 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -81,7 +81,7 @@ </description> </method> <method name="get_node_connections" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <param index="0" name="type" type="int" enum="VisualShader.Type" /> <description> Returns the list of connected nodes with the specified type. @@ -206,17 +206,19 @@ </constant> <constant name="VARYING_TYPE_FLOAT" value="0" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_2D" value="1" enum="VaryingType"> + <constant name="VARYING_TYPE_INT" value="1" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_3D" value="2" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_2D" value="2" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_4D" value="3" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_3D" value="3" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_COLOR" value="4" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_4D" value="4" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_TRANSFORM" value="5" enum="VaryingType"> + <constant name="VARYING_TYPE_BOOLEAN" value="5" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_MAX" value="6" enum="VaryingType"> + <constant name="VARYING_TYPE_TRANSFORM" value="6" enum="VaryingType"> + </constant> + <constant name="VARYING_TYPE_MAX" value="7" enum="VaryingType"> </constant> <constant name="NODE_ID_INVALID" value="-1"> </constant> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 9813b4778d..d96969b383 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -68,7 +68,7 @@ <method name="_get_input_port_count" qualifiers="virtual const"> <return type="int" /> <description> - Override this method to define the amount of input ports of the associated custom node. + Override this method to define the number of input ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no input ports. </description> </method> @@ -98,7 +98,7 @@ <method name="_get_output_port_count" qualifiers="virtual const"> <return type="int" /> <description> - Override this method to define the amount of output ports of the associated custom node. + Override this method to define the number of output ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no output ports. </description> </method> diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml index c4f010f3c0..6b2dc2f2cb 100644 --- a/doc/classes/VisualShaderNodeExpression.xml +++ b/doc/classes/VisualShaderNodeExpression.xml @@ -4,7 +4,7 @@ A custom visual shader graph expression written in Godot Shading Language. </brief_description> <description> - Custom Godot Shading Language expression, with a custom amount of input and output ports. + Custom Godot Shading Language expression, with a custom number of input and output ports. The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions. </description> <tutorials> diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml index 450629a73f..dcc94f0b24 100644 --- a/doc/classes/VisualShaderNodeGroupBase.xml +++ b/doc/classes/VisualShaderNodeGroupBase.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeGroupBase" inherits="VisualShaderNodeResizableBase" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Base class for a family of nodes with variable amount of input and output ports within the visual shader graph. + Base class for a family of nodes with variable number of input and output ports within the visual shader graph. </brief_description> <description> Currently, has no direct usage, use the derived classes instead. diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml index 37a9769a10..541991b790 100644 --- a/doc/classes/VisualShaderNodeUVFunc.xml +++ b/doc/classes/VisualShaderNodeUVFunc.xml @@ -17,7 +17,7 @@ Translates [code]uv[/code] by using [code]scale[/code] and [code]offset[/code] values using the following formula: [code]uv = uv + offset * scale[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default. </constant> <constant name="FUNC_SCALING" value="1" enum="Function"> - Scales [code]uv[/uv] by using [code]scale[/code] and [code]pivot[/code] values using the following formula: [code]uv = (uv - pivot) * scale + pivot[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default. + Scales [code]uv[/code] by using [code]scale[/code] and [code]pivot[/code] values using the following formula: [code]uv = (uv - pivot) * scale + pivot[/code]. [code]uv[/code] port is connected to [code]UV[/code] built-in by default. </constant> <constant name="FUNC_MAX" value="2" enum="Function"> Represents the size of the [enum Function] enum. diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 69544f4895..26480f0c18 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -12,7 +12,7 @@ <method name="get_attribute_count" qualifiers="const"> <return type="int" /> <description> - Gets the amount of attributes in the current element. + Gets the number of attributes in the current element. </description> </method> <method name="get_attribute_name" qualifiers="const"> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 7e96b33edd..48b00323d3 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -64,7 +64,7 @@ </description> </method> <method name="get_interfaces" qualifiers="const"> - <return type="Array" /> + <return type="Dictionary[]" /> <description> Returns a list of available interfaces the ID and name of each interface. </description> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 98c200c114..78e2e7d18f 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -63,7 +63,7 @@ <return type="int" /> <param index="0" name="from" type="float" /> <description> - Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation. + Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [param from] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation. </description> </constructor> </constructors> diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index cc0733cab2..376addcff0 100755 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import fnmatch import os @@ -7,6 +7,7 @@ import re import math import platform import xml.etree.ElementTree as ET +from typing import Dict, List, Set ################################################################################ # Config # @@ -103,13 +104,13 @@ overall_progress_description_weight = 10 ################################################################################ -def validate_tag(elem, tag): +def validate_tag(elem: ET.Element, tag: str) -> None: if elem.tag != tag: print('Tag mismatch, expected "' + tag + '", got ' + elem.tag) sys.exit(255) -def color(color, string): +def color(color: str, string: str) -> str: if flags["c"] and terminal_supports_color(): color_format = "" for code in colors[color]: @@ -122,7 +123,7 @@ def color(color, string): ansi_escape = re.compile(r"\x1b[^m]*m") -def nonescape_len(s): +def nonescape_len(s: str) -> int: return len(ansi_escape.sub("", s)) @@ -142,14 +143,14 @@ def terminal_supports_color(): class ClassStatusProgress: - def __init__(self, described=0, total=0): - self.described = described - self.total = total + def __init__(self, described: int = 0, total: int = 0): + self.described: int = described + self.total: int = total - def __add__(self, other): + def __add__(self, other: "ClassStatusProgress"): return ClassStatusProgress(self.described + other.described, self.total + other.total) - def increment(self, described): + def increment(self, described: bool): if described: self.described += 1 self.total += 1 @@ -163,7 +164,7 @@ class ClassStatusProgress: else: return self.to_colored_string() - def to_colored_string(self, format="{has}/{total}", pad_format="{pad_described}{s}{pad_total}"): + def to_colored_string(self, format: str = "{has}/{total}", pad_format: str = "{pad_described}{s}{pad_total}"): ratio = float(self.described) / float(self.total) if self.total != 0 else 1 percent = int(round(100 * ratio)) s = format.format(has=str(self.described), total=str(self.total), percent=str(percent)) @@ -183,11 +184,11 @@ class ClassStatusProgress: class ClassStatus: - def __init__(self, name=""): - self.name = name - self.has_brief_description = True - self.has_description = True - self.progresses = { + def __init__(self, name: str = ""): + self.name: str = name + self.has_brief_description: bool = True + self.has_description: bool = True + self.progresses: Dict[str, ClassStatusProgress] = { "methods": ClassStatusProgress(), "constants": ClassStatusProgress(), "members": ClassStatusProgress(), @@ -197,7 +198,7 @@ class ClassStatus: "constructors": ClassStatusProgress(), } - def __add__(self, other): + def __add__(self, other: "ClassStatus"): new_status = ClassStatus() new_status.name = self.name new_status.has_brief_description = self.has_brief_description and other.has_brief_description @@ -222,8 +223,8 @@ class ClassStatus: sum += self.progresses[k].total return sum < 1 - def make_output(self): - output = {} + def make_output(self) -> Dict[str, str]: + output: Dict[str, str] = {} output["name"] = color("name", self.name) ok_string = color("part_good", "OK") @@ -263,22 +264,24 @@ class ClassStatus: return output @staticmethod - def generate_for_class(c): + def generate_for_class(c: ET.Element): status = ClassStatus() status.name = c.attrib["name"] for tag in list(c): + len_tag_text = 0 if (tag.text is None) else len(tag.text.strip()) if tag.tag == "brief_description": - status.has_brief_description = len(tag.text.strip()) > 0 + status.has_brief_description = len_tag_text > 0 elif tag.tag == "description": - status.has_description = len(tag.text.strip()) > 0 + status.has_description = len_tag_text > 0 elif tag.tag in ["methods", "signals", "operators", "constructors"]: for sub_tag in list(tag): descr = sub_tag.find("description") - status.progresses[tag.tag].increment(len(descr.text.strip()) > 0) + increment = (descr is not None) and (descr.text is not None) and len(descr.text.strip()) > 0 + status.progresses[tag.tag].increment(increment) elif tag.tag in ["constants", "members", "theme_items"]: for sub_tag in list(tag): if not sub_tag.text is None: @@ -297,9 +300,9 @@ class ClassStatus: # Arguments # ################################################################################ -input_file_list = [] -input_class_list = [] -merged_file = "" +input_file_list: List[str] = [] +input_class_list: List[str] = [] +merged_file: str = "" for arg in sys.argv[1:]: try: @@ -373,8 +376,8 @@ if len(input_file_list) < 1 or flags["h"]: # Parse class list # ################################################################################ -class_names = [] -classes = {} +class_names: List[str] = [] +classes: Dict[str, ET.Element] = {} for file in input_file_list: tree = ET.parse(file) @@ -396,10 +399,10 @@ class_names.sort() if len(input_class_list) < 1: input_class_list = ["*"] -filtered_classes = set() +filtered_classes_set: Set[str] = set() for pattern in input_class_list: - filtered_classes |= set(fnmatch.filter(class_names, pattern)) -filtered_classes = list(filtered_classes) + filtered_classes_set |= set(fnmatch.filter(class_names, pattern)) +filtered_classes = list(filtered_classes_set) filtered_classes.sort() ################################################################################ @@ -413,7 +416,6 @@ table_column_chars = "|" total_status = ClassStatus("Total") for cn in filtered_classes: - c = classes[cn] validate_tag(c, "class") status = ClassStatus.generate_for_class(c) @@ -427,7 +429,7 @@ for cn in filtered_classes: continue out = status.make_output() - row = [] + row: List[str] = [] for column in table_columns: if column in out: row.append(out[column]) @@ -464,7 +466,7 @@ if flags["a"]: # without having to scroll back to the top. table.append(table_column_names) -table_column_sizes = [] +table_column_sizes: List[int] = [] for row in table: for cell_i, cell in enumerate(row): if cell_i >= len(table_column_sizes): @@ -477,7 +479,6 @@ for cell_i in range(len(table[0])): divider_string += ( table_row_chars[1] + table_row_chars[2] * (table_column_sizes[cell_i]) + table_row_chars[1] + table_row_chars[0] ) -print(divider_string) for row_i, row in enumerate(table): row_string = table_column_chars diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 207eb7fabd..519554e026 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -67,6 +67,7 @@ STYLES: Dict[str, str] = {} class State: def __init__(self) -> None: self.num_errors = 0 + self.num_warnings = 0 self.classes: OrderedDict[str, ClassDef] = OrderedDict() self.current_class: str = "" @@ -353,7 +354,17 @@ class TypeName: return cls(element.attrib["type"], element.get("enum")) -class PropertyDef: +class DefinitionBase: + def __init__( + self, + definition_name: str, + name: str, + ) -> None: + self.definition_name = definition_name + self.name = name + + +class PropertyDef(DefinitionBase): def __init__( self, name: str, @@ -364,9 +375,8 @@ class PropertyDef: default_value: Optional[str], overrides: Optional[str], ) -> None: - self.definition_name = "property" + super().__init__("property", name) - self.name = name self.type_name = type_name self.setter = setter self.getter = getter @@ -375,25 +385,23 @@ class PropertyDef: self.overrides = overrides -class ParameterDef: +class ParameterDef(DefinitionBase): def __init__(self, name: str, type_name: TypeName, default_value: Optional[str]) -> None: - self.definition_name = "parameter" + super().__init__("parameter", name) - self.name = name self.type_name = type_name self.default_value = default_value -class SignalDef: +class SignalDef(DefinitionBase): def __init__(self, name: str, parameters: List[ParameterDef], description: Optional[str]) -> None: - self.definition_name = "signal" + super().__init__("signal", name) - self.name = name self.parameters = parameters self.description = description -class AnnotationDef: +class AnnotationDef(DefinitionBase): def __init__( self, name: str, @@ -401,15 +409,14 @@ class AnnotationDef: description: Optional[str], qualifiers: Optional[str], ) -> None: - self.definition_name = "annotation" + super().__init__("annotation", name) - self.name = name self.parameters = parameters self.description = description self.qualifiers = qualifiers -class MethodDef: +class MethodDef(DefinitionBase): def __init__( self, name: str, @@ -418,52 +425,47 @@ class MethodDef: description: Optional[str], qualifiers: Optional[str], ) -> None: - self.definition_name = "method" + super().__init__("method", name) - self.name = name self.return_type = return_type self.parameters = parameters self.description = description self.qualifiers = qualifiers -class ConstantDef: +class ConstantDef(DefinitionBase): def __init__(self, name: str, value: str, text: Optional[str], bitfield: bool) -> None: - self.definition_name = "constant" + super().__init__("constant", name) - self.name = name self.value = value self.text = text self.is_bitfield = bitfield -class EnumDef: +class EnumDef(DefinitionBase): def __init__(self, name: str, bitfield: bool) -> None: - self.definition_name = "enum" + super().__init__("enum", name) - self.name = name self.values: OrderedDict[str, ConstantDef] = OrderedDict() self.is_bitfield = bitfield -class ThemeItemDef: +class ThemeItemDef(DefinitionBase): def __init__( self, name: str, type_name: TypeName, data_name: str, text: Optional[str], default_value: Optional[str] ) -> None: - self.definition_name = "theme item" + super().__init__("theme item", name) - self.name = name self.type_name = type_name self.data_name = data_name self.text = text self.default_value = default_value -class ClassDef: +class ClassDef(DefinitionBase): def __init__(self, name: str) -> None: - self.definition_name = "class" + super().__init__("class", name) - self.name = name self.constants: OrderedDict[str, ConstantDef] = OrderedDict() self.enums: OrderedDict[str, EnumDef] = OrderedDict() self.properties: OrderedDict[str, PropertyDef] = OrderedDict() @@ -482,11 +484,7 @@ class ClassDef: self.filepath: str = "" -def print_error(error: str, state: State) -> None: - print("{}{}ERROR:{} {}{}".format(STYLES["red"], STYLES["bold"], STYLES["regular"], error, STYLES["reset"])) - state.num_errors += 1 - - +# Entry point for the RST generator. def main() -> None: # Enable ANSI escape code support on Windows 10 and later (for colored console output). # <https://bugs.python.org/issue29059> @@ -520,6 +518,7 @@ def main() -> None: should_color = args.color or (hasattr(sys.stdout, "isatty") and sys.stdout.isatty()) STYLES["red"] = "\x1b[91m" if should_color else "" STYLES["green"] = "\x1b[92m" if should_color else "" + STYLES["yellow"] = "\x1b[93m" if should_color else "" STYLES["bold"] = "\x1b[1m" if should_color else "" STYLES["regular"] = "\x1b[22m" if should_color else "" STYLES["reset"] = "\x1b[0m" if should_color else "" @@ -604,12 +603,29 @@ def main() -> None: # Create the output folder recursively if it doesn't already exist. os.makedirs(args.output, exist_ok=True) + print("Generating the RST class reference...") + for class_name, class_def in state.classes.items(): if args.filter and not pattern.search(class_def.filepath): continue state.current_class = class_name make_rst_class(class_def, state, args.dry_run, args.output) + print("") + + if state.num_warnings >= 2: + print( + "{}{} warnings were found in the class reference XML. Please check the messages above.{}".format( + STYLES["yellow"], state.num_warnings, STYLES["reset"] + ) + ) + elif state.num_warnings == 1: + print( + "{}1 warning was found in the class reference XML. Please check the messages above.{}".format( + STYLES["yellow"], STYLES["reset"] + ) + ) + if state.num_errors == 0: print("{}No errors found in the class reference XML.{}".format(STYLES["green"], STYLES["reset"])) if not args.dry_run: @@ -630,6 +646,19 @@ def main() -> None: exit(1) +# Common helpers. + + +def print_error(error: str, state: State) -> None: + print("{}{}ERROR:{} {}{}".format(STYLES["red"], STYLES["bold"], STYLES["regular"], error, STYLES["reset"])) + state.num_errors += 1 + + +def print_warning(error: str, state: State) -> None: + print("{}{}WARNING:{} {}{}".format(STYLES["yellow"], STYLES["bold"], STYLES["regular"], error, STYLES["reset"])) + state.num_warnings += 1 + + def translate(string: str) -> str: """Translate a string based on translations sourced from `doc/translations/*.po` for a language if defined via the --lang command line argument. @@ -638,6 +667,9 @@ def translate(string: str) -> str: return strings_l10n.get(string, string) +# Generator methods. + + def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: str) -> None: class_name = class_def.name @@ -705,12 +737,12 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: # Brief description if class_def.brief_description is not None: - f.write(rstize_text(class_def.brief_description.strip(), class_def, state) + "\n\n") + f.write(format_text_block(class_def.brief_description.strip(), class_def, state) + "\n\n") # Class description if class_def.description is not None and class_def.description.strip() != "": f.write(make_heading("Description", "-")) - f.write(rstize_text(class_def.description.strip(), class_def, state) + "\n\n") + f.write(format_text_block(class_def.description.strip(), class_def, state) + "\n\n") # Online tutorials if len(class_def.tutorials) > 0: @@ -784,7 +816,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- {}\n\n".format(signature)) if signal.description is not None and signal.description.strip() != "": - f.write(rstize_text(signal.description.strip(), signal, state) + "\n\n") + f.write(format_text_block(signal.description.strip(), signal, state) + "\n\n") index += 1 @@ -814,7 +846,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- **{}** = **{}**".format(value.name, value.value)) if value.text is not None and value.text.strip() != "": # If value.text contains a bullet point list, each entry needs additional indentation - f.write(" --- " + indent_bullets(rstize_text(value.text.strip(), value, state))) + f.write(" --- " + indent_bullets(format_text_block(value.text.strip(), value, state))) f.write("\n\n") @@ -831,7 +863,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: for constant in class_def.constants.values(): f.write("- **{}** = **{}**".format(constant.name, constant.value)) if constant.text is not None and constant.text.strip() != "": - f.write(" --- " + rstize_text(constant.text.strip(), constant, state)) + f.write(" --- " + format_text_block(constant.text.strip(), constant, state)) f.write("\n\n") @@ -852,7 +884,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- {}\n\n".format(signature)) if m.description is not None and m.description.strip() != "": - f.write(rstize_text(m.description.strip(), m, state) + "\n\n") + f.write(format_text_block(m.description.strip(), m, state) + "\n\n") index += 1 @@ -884,7 +916,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: format_table(f, info) if property_def.text is not None and property_def.text.strip() != "": - f.write(rstize_text(property_def.text.strip(), property_def, state) + "\n\n") + f.write(format_text_block(property_def.text.strip(), property_def, state) + "\n\n") index += 1 @@ -905,7 +937,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- {} {}\n\n".format(ret_type, signature)) if m.description is not None and m.description.strip() != "": - f.write(rstize_text(m.description.strip(), m, state) + "\n\n") + f.write(format_text_block(m.description.strip(), m, state) + "\n\n") index += 1 @@ -925,7 +957,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- {} {}\n\n".format(ret_type, signature)) if m.description is not None and m.description.strip() != "": - f.write(rstize_text(m.description.strip(), m, state) + "\n\n") + f.write(format_text_block(m.description.strip(), m, state) + "\n\n") index += 1 @@ -949,7 +981,7 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: f.write("- {} {}\n\n".format(ret_type, signature)) if m.description is not None and m.description.strip() != "": - f.write(rstize_text(m.description.strip(), m, state) + "\n\n") + f.write(format_text_block(m.description.strip(), m, state) + "\n\n") index += 1 @@ -974,87 +1006,183 @@ def make_rst_class(class_def: ClassDef, state: State, dry_run: bool, output_dir: format_table(f, info) if theme_item_def.text is not None and theme_item_def.text.strip() != "": - f.write(rstize_text(theme_item_def.text.strip(), theme_item_def, state) + "\n\n") + f.write(format_text_block(theme_item_def.text.strip(), theme_item_def, state) + "\n\n") index += 1 f.write(make_footer()) -def escape_rst(text: str, until_pos: int = -1) -> str: - # Escape \ character, otherwise it ends up as an escape character in rst - pos = 0 - while True: - pos = text.find("\\", pos, until_pos) - if pos == -1: - break - text = text[:pos] + "\\\\" + text[pos + 1 :] - pos += 2 +def make_type(klass: str, state: State) -> str: + if klass.find("*") != -1: # Pointer, ignore + return klass + link_type = klass + if link_type.endswith("[]"): # Typed array, strip [] to link to contained type. + link_type = link_type[:-2] + if link_type in state.classes: + return ":ref:`{}<class_{}>`".format(klass, link_type) + print_error('{}.xml: Unresolved type "{}".'.format(state.current_class, klass), state) + return klass - # Escape * character to avoid interpreting it as emphasis - pos = 0 - while True: - pos = text.find("*", pos, until_pos) - if pos == -1: - break - text = text[:pos] + "\*" + text[pos + 1 :] - pos += 2 - # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink - pos = 0 - while True: - pos = text.find("_", pos, until_pos) - if pos == -1: - break - if not text[pos + 1].isalnum(): # don't escape within a snake_case word - text = text[:pos] + "\_" + text[pos + 1 :] - pos += 2 - else: - pos += 1 +def make_enum(t: str, state: State) -> str: + p = t.find(".") + if p >= 0: + c = t[0:p] + e = t[p + 1 :] + # Variant enums live in GlobalScope but still use periods. + if c == "Variant": + c = "@GlobalScope" + e = "Variant." + e + else: + c = state.current_class + e = t + if c in state.classes and e not in state.classes[c].enums: + c = "@GlobalScope" - return text + if c in state.classes and e in state.classes[c].enums: + return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) + # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved. + if "{}.{}".format(c, e) != "Vector3.Axis": + print_error('{}.xml: Unresolved enum "{}".'.format(state.current_class, t), state) -def format_codeblock(code_type: str, post_text: str, indent_level: int, state: State) -> Union[Tuple[str, int], None]: - end_pos = post_text.find("[/" + code_type + "]") - if end_pos == -1: - print_error("{}.xml: [" + code_type + "] without a closing tag.".format(state.current_class), state) - return None + return t - code_text = post_text[len("[" + code_type + "]") : end_pos] - post_text = post_text[end_pos:] - # Remove extraneous tabs - code_pos = 0 - while True: - code_pos = code_text.find("\n", code_pos) - if code_pos == -1: - break +def make_method_signature( + class_def: ClassDef, definition: Union[AnnotationDef, MethodDef, SignalDef], ref_type: str, state: State +) -> Tuple[str, str]: + ret_type = "" - to_skip = 0 - while code_pos + to_skip + 1 < len(code_text) and code_text[code_pos + to_skip + 1] == "\t": - to_skip += 1 + is_method_def = isinstance(definition, MethodDef) + if is_method_def: + ret_type = definition.return_type.to_rst(state) - if to_skip > indent_level: - print_error( - "{}.xml: Four spaces should be used for indentation within [{}].".format( - state.current_class, code_type - ), - state, + qualifiers = None + if is_method_def or isinstance(definition, AnnotationDef): + qualifiers = definition.qualifiers + + out = "" + + if is_method_def and ref_type != "": + if ref_type == "operator": + out += ":ref:`{0}<class_{1}_{2}_{3}_{4}>` ".format( + definition.name.replace("<", "\\<"), # So operator "<" gets correctly displayed. + class_def.name, + ref_type, + sanitize_operator_name(definition.name, state), + definition.return_type.type_name, ) + else: + out += ":ref:`{0}<class_{1}_{2}_{0}>` ".format(definition.name, class_def.name, ref_type) + else: + out += "**{}** ".format(definition.name) - if len(code_text[code_pos + to_skip + 1 :]) == 0: - code_text = code_text[:code_pos] + "\n" - code_pos += 1 + out += "**(**" + for i, arg in enumerate(definition.parameters): + if i > 0: + out += ", " else: - code_text = code_text[:code_pos] + "\n " + code_text[code_pos + to_skip + 1 :] - code_pos += 5 - to_skip - return ("\n[" + code_type + "]" + code_text + post_text, len("\n[" + code_type + "]" + code_text)) + out += " " + + out += "{} {}".format(arg.type_name.to_rst(state), arg.name) + + if arg.default_value is not None: + out += "=" + arg.default_value + + if qualifiers is not None and "vararg" in qualifiers: + if len(definition.parameters) > 0: + out += ", ..." + else: + out += " ..." + + out += " **)**" + + if qualifiers is not None: + # Use substitutions for abbreviations. This is used to display tooltips on hover. + # See `make_footer()` for descriptions. + for qualifier in qualifiers.split(): + out += " |" + qualifier + "|" + + return ret_type, out + + +def make_heading(title: str, underline: str, l10n: bool = True) -> str: + if l10n: + new_title = translate(title) + if new_title != title: + title = new_title + underline *= 2 # Double length to handle wide chars. + return title + "\n" + (underline * len(title)) + "\n\n" + + +def make_footer() -> str: + # Generate reusable abbreviation substitutions. + # This way, we avoid bloating the generated rST with duplicate abbreviations. + # fmt: off + return ( + ".. |virtual| replace:: :abbr:`virtual (" + translate("This method should typically be overridden by the user to have any effect.") + ")`\n" + ".. |const| replace:: :abbr:`const (" + translate("This method has no side effects. It doesn't modify any of the instance's member variables.") + ")`\n" + ".. |vararg| replace:: :abbr:`vararg (" + translate("This method accepts any number of arguments after the ones described here.") + ")`\n" + ".. |constructor| replace:: :abbr:`constructor (" + translate("This method is used to construct a type.") + ")`\n" + ".. |static| replace:: :abbr:`static (" + translate("This method doesn't need an instance to be called, so it can be called directly using the class name.") + ")`\n" + ".. |operator| replace:: :abbr:`operator (" + translate("This method describes a valid operator to use with this type as left-hand operand.") + ")`\n" + ) + # fmt: on + + +def make_link(url: str, title: str) -> str: + match = GODOT_DOCS_PATTERN.search(url) + if match: + groups = match.groups() + if match.lastindex == 2: + # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: + # `#calling-javascript-from-script in Exporting For Web` + # Or use the title if provided. + if title != "": + return "`" + title + " <../" + groups[0] + ".html" + groups[1] + ">`__" + return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" + elif match.lastindex == 1: + # Doc reference, for example: + # `Math` + if title != "": + return ":doc:`" + title + " <../" + groups[0] + ">`" + return ":doc:`../" + groups[0] + "`" + + # External link, for example: + # `http://enet.bespin.org/usergroup0.html` + if title != "": + return "`" + title + " <" + url + ">`__" + return "`" + url + " <" + url + ">`__" + + +# Formatting helpers. + + +RESERVED_FORMATTING_TAGS = ["i", "b", "u", "code", "kbd", "center", "url", "br"] +RESERVED_CODEBLOCK_TAGS = ["codeblocks", "codeblock", "gdscript", "csharp"] +RESERVED_CROSSLINK_TAGS = ["method", "member", "signal", "constant", "enum", "annotation", "theme_item", "param"] -def rstize_text( +def is_in_tagset(tag_text: str, tagset: List[str]) -> bool: + for tag in tagset: + # Complete match. + if tag_text == tag: + return True + # Tag with arguments. + if tag_text.startswith(tag + " "): + return True + # Tag with arguments, special case for [url]. + if tag_text.startswith(tag + "="): + return True + + return False + + +def format_text_block( text: str, - context: Union[ClassDef, SignalDef, ConstantDef, AnnotationDef, PropertyDef, MethodDef, ThemeItemDef, None], + context: Union[DefinitionBase, None], state: State, ) -> str: # Linebreak + tabs in the XML should become two line breaks unless in a "codeblock" @@ -1092,8 +1220,12 @@ def rstize_text( next_brac_pos = text.find("[") text = escape_rst(text, next_brac_pos) + context_name = format_context_name(context) + # Handle [tags] inside_code = False + inside_code_tag = "" + inside_code_tabs = False pos = 0 tag_depth = 0 while True: @@ -1112,240 +1244,337 @@ def rstize_text( escape_pre = False escape_post = False + # Tag is a reference to a class. if tag_text in state.classes: if tag_text == state.current_class: - # We don't want references to the same class + # Don't create a link to the same class, format it as inline code. tag_text = "``{}``".format(tag_text) else: tag_text = make_type(tag_text, state) escape_pre = True escape_post = True - else: # command + + # Tag is a cross-reference or a formating directive. + else: cmd = tag_text space_pos = tag_text.find(" ") - if cmd == "/codeblock" or cmd == "/gdscript" or cmd == "/csharp": - tag_text = "" - tag_depth -= 1 - inside_code = False - # Strip newline if the tag was alone on one - if pre_text[-1] == "\n": - pre_text = pre_text[:-1] - elif cmd == "/code": - tag_text = "``" - tag_depth -= 1 - inside_code = False - escape_post = True - elif inside_code: - tag_text = "[" + tag_text + "]" - elif cmd.find("html") == 0: - param = tag_text[space_pos + 1 :] - tag_text = param - elif ( - cmd.startswith("method") - or cmd.startswith("member") - or cmd.startswith("signal") - or cmd.startswith("constant") - or cmd.startswith("theme_item") - ): - param = tag_text[space_pos + 1 :] - - if param.find(".") != -1: - ss = param.split(".") - if len(ss) > 2: - print_error('{}.xml: Bad reference: "{}".'.format(state.current_class, param), state) - class_param, method_param = ss + # Anything identified as a tag inside of a code block is valid, + # unless it's a matching closing tag. + if inside_code: + # Exiting codeblocks and inline code tags. + + if inside_code_tag == cmd[1:]: + if cmd == "/codeblock" or cmd == "/gdscript" or cmd == "/csharp": + tag_text = "" + tag_depth -= 1 + inside_code = False + # Strip newline if the tag was alone on one + if pre_text[-1] == "\n": + pre_text = pre_text[:-1] + + elif cmd == "/code": + tag_text = "``" + tag_depth -= 1 + inside_code = False + escape_post = True else: - class_param = state.current_class - method_param = param - - ref_type = "" - if class_param in state.classes: - class_def = state.classes[class_param] - if cmd.startswith("constructor"): - if method_param not in class_def.constructors: - print_error( - '{}.xml: Unresolved constructor "{}".'.format(state.current_class, param), state - ) - ref_type = "_constructor" - - elif cmd.startswith("method"): - if method_param not in class_def.methods: - print_error('{}.xml: Unresolved method "{}".'.format(state.current_class, param), state) - ref_type = "_method" - - elif cmd.startswith("operator"): - if method_param not in class_def.operators: - print_error('{}.xml: Unresolved operator "{}".'.format(state.current_class, param), state) - ref_type = "_operator" - - elif cmd.startswith("member"): - if method_param not in class_def.properties: - print_error('{}.xml: Unresolved member "{}".'.format(state.current_class, param), state) - ref_type = "_property" - - elif cmd.startswith("theme_item"): - if method_param not in class_def.theme_items: - print_error('{}.xml: Unresolved theme item "{}".'.format(state.current_class, param), state) - ref_type = "_theme_{}".format(class_def.theme_items[method_param].data_name) - - elif cmd.startswith("signal"): - if method_param not in class_def.signals: - print_error('{}.xml: Unresolved signal "{}".'.format(state.current_class, param), state) - ref_type = "_signal" - - elif cmd.startswith("annotation"): - if method_param not in class_def.annotations: - print_error('{}.xml: Unresolved annotation "{}".'.format(state.current_class, param), state) - ref_type = "_annotation" - - elif cmd.startswith("constant"): - found = False - - # Search in the current class - search_class_defs = [class_def] - - if param.find(".") == -1: - # Also search in @GlobalScope as a last resort if no class was specified - search_class_defs.append(state.classes["@GlobalScope"]) - - for search_class_def in search_class_defs: - if method_param in search_class_def.constants: - class_param = search_class_def.name - found = True - - else: - for enum in search_class_def.enums.values(): - if method_param in enum.values: - class_param = search_class_def.name - found = True - break + if cmd.startswith("/"): + print_warning( + '{}.xml: Potential error inside of a code tag, found a string that looks like a closing tag "[{}]" in {}.'.format( + state.current_class, cmd, context_name + ), + state, + ) + + tag_text = "[" + tag_text + "]" + + # Entering codeblocks and inline code tags. + + elif cmd == "codeblocks": + tag_depth += 1 + tag_text = "\n.. tabs::" + inside_code_tabs = True + elif cmd == "/codeblocks": + tag_depth -= 1 + tag_text = "" + inside_code_tabs = False - if not found: - print_error('{}.xml: Unresolved constant "{}".'.format(state.current_class, param), state) - ref_type = "_constant" + elif cmd == "codeblock" or cmd == "gdscript" or cmd == "csharp": + tag_depth += 1 + if cmd == "gdscript": + if not inside_code_tabs: + print_error( + "{}.xml: GDScript code block is used outside of [codeblocks] in {}.".format( + state.current_class, cmd, context_name + ), + state, + ) + tag_text = "\n .. code-tab:: gdscript\n" + elif cmd == "csharp": + if not inside_code_tabs: + print_error( + "{}.xml: C# code block is used outside of [codeblocks] in {}.".format( + state.current_class, cmd, context_name + ), + state, + ) + tag_text = "\n .. code-tab:: csharp\n" else: - print_error( - '{}.xml: Unresolved type reference "{}" in method reference "{}".'.format( - state.current_class, class_param, param - ), - state, - ) + tag_text = "\n::\n" + + inside_code = True + inside_code_tag = cmd - repl_text = method_param - if class_param != state.current_class: - repl_text = "{}.{}".format(class_param, method_param) - tag_text = ":ref:`{}<class_{}{}_{}>`".format(repl_text, class_param, ref_type, method_param) + elif cmd == "code": + tag_text = "``" + tag_depth += 1 + inside_code = True + inside_code_tag = cmd escape_pre = True - escape_post = True - elif cmd.startswith("param"): - param_name: str = "" - if space_pos >= 0: - param_name = tag_text[space_pos + 1 :].strip() - if param_name == "": - context_name: str = "unknown context" - if context is not None: - context_name = '{} "{}" description'.format(context.definition_name, context.name) + # Cross-references to items in this or other class documentation pages. + elif is_in_tagset(cmd, RESERVED_CROSSLINK_TAGS): + link_target: str = "" + if space_pos >= 0: + link_target = tag_text[space_pos + 1 :].strip() + if link_target == "": print_error( - "{}.xml: Empty argument reference in {}.".format(state.current_class, context_name), + '{}.xml: Empty cross-reference link "{}" in {}.'.format(state.current_class, cmd, context_name), state, ) + tag_text = "" else: - valid_context = ( - isinstance(context, MethodDef) - or isinstance(context, SignalDef) - or isinstance(context, AnnotationDef) - ) - if not valid_context: - context_name: str = "unknown context" - if context is not None: - context_name = '{} "{}" description'.format(context.definition_name, context.name) + if ( + cmd.startswith("method") + or cmd.startswith("member") + or cmd.startswith("signal") + or cmd.startswith("constant") + or cmd.startswith("annotation") + or cmd.startswith("theme_item") + ): + if link_target.find(".") != -1: + ss = link_target.split(".") + if len(ss) > 2: + print_error( + '{}.xml: Bad reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + class_param, method_param = ss + + else: + class_param = state.current_class + method_param = link_target + + ref_type = "" + if class_param in state.classes: + class_def = state.classes[class_param] + if cmd.startswith("constructor"): + if method_param not in class_def.constructors: + print_error( + '{}.xml: Unresolved constructor reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_constructor" + + elif cmd.startswith("method"): + if method_param not in class_def.methods: + print_error( + '{}.xml: Unresolved method reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_method" + + elif cmd.startswith("operator"): + if method_param not in class_def.operators: + print_error( + '{}.xml: Unresolved operator reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_operator" + + elif cmd.startswith("member"): + if method_param not in class_def.properties: + print_error( + '{}.xml: Unresolved member reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_property" + + elif cmd.startswith("theme_item"): + if method_param not in class_def.theme_items: + print_error( + '{}.xml: Unresolved theme item reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_theme_{}".format(class_def.theme_items[method_param].data_name) + + elif cmd.startswith("signal"): + if method_param not in class_def.signals: + print_error( + '{}.xml: Unresolved signal reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_signal" + + elif cmd.startswith("annotation"): + if method_param not in class_def.annotations: + print_error( + '{}.xml: Unresolved annotation reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_annotation" + + elif cmd.startswith("constant"): + found = False + + # Search in the current class + search_class_defs = [class_def] + + if link_target.find(".") == -1: + # Also search in @GlobalScope as a last resort if no class was specified + search_class_defs.append(state.classes["@GlobalScope"]) + + for search_class_def in search_class_defs: + if method_param in search_class_def.constants: + class_param = search_class_def.name + found = True - print_error( - '{}.xml: Argument reference "{}" used outside of method, signal, or annotation context in {}.'.format( - state.current_class, param_name, context_name - ), - state, + else: + for enum in search_class_def.enums.values(): + if method_param in enum.values: + class_param = search_class_def.name + found = True + break + + if not found: + print_error( + '{}.xml: Unresolved constant reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + ref_type = "_constant" + + else: + print_error( + '{}.xml: Unresolved type reference "{}" in method reference "{}" in {}.'.format( + state.current_class, class_param, link_target, context_name + ), + state, + ) + + repl_text = method_param + if class_param != state.current_class: + repl_text = "{}.{}".format(class_param, method_param) + tag_text = ":ref:`{}<class_{}{}_{}>`".format(repl_text, class_param, ref_type, method_param) + escape_pre = True + escape_post = True + + elif cmd.startswith("enum"): + tag_text = make_enum(link_target, state) + escape_pre = True + escape_post = True + + elif cmd.startswith("param"): + valid_context = ( + isinstance(context, MethodDef) + or isinstance(context, SignalDef) + or isinstance(context, AnnotationDef) ) - else: - context_params: List[ParameterDef] = context.parameters - found = False - for param_def in context_params: - if param_def.name == param_name: - found = True - break - if not found: + if not valid_context: print_error( - '{}.xml: Unresolved argument reference "{}" in {} "{}" description.'.format( - state.current_class, param_name, context.definition_name, context.name + '{}.xml: Argument reference "{}" used outside of method, signal, or annotation context in {}.'.format( + state.current_class, link_target, context_name ), state, ) + else: + context_params: List[ParameterDef] = context.parameters + found = False + for param_def in context_params: + if param_def.name == link_target: + found = True + break + if not found: + print_error( + '{}.xml: Unresolved argument reference "{}" in {}.'.format( + state.current_class, link_target, context_name + ), + state, + ) + + tag_text = "``{}``".format(link_target) + + # Formatting directives. + + elif is_in_tagset(cmd, ["url"]): + if cmd.startswith("url="): + # URLs are handled in full here as we need to extract the optional link + # title to use `make_link`. + link_url = cmd[4:] + endurl_pos = text.find("[/url]", endq_pos + 1) + if endurl_pos == -1: + print_error( + "{}.xml: Tag depth mismatch for [url]: no closing [/url] in {}.".format( + state.current_class, context_name + ), + state, + ) + break + link_title = text[endq_pos + 1 : endurl_pos] + tag_text = make_link(link_url, link_title) - if param_name == "": - tag_text = "" + pre_text = text[:pos] + post_text = text[endurl_pos + 6 :] + + if pre_text and pre_text[-1] not in MARKUP_ALLOWED_PRECEDENT: + pre_text += "\ " + if post_text and post_text[0] not in MARKUP_ALLOWED_SUBSEQUENT: + post_text = "\ " + post_text + + text = pre_text + tag_text + post_text + pos = len(pre_text) + len(tag_text) + continue else: - tag_text = "``{}``".format(param_name) - elif cmd.find("image=") == 0: - tag_text = "" # '![](' + cmd[6:] + ')' - elif cmd.find("url=") == 0: - # URLs are handled in full here as we need to extract the optional link - # title to use `make_link`. - link_url = cmd[4:] - endurl_pos = text.find("[/url]", endq_pos + 1) - if endurl_pos == -1: print_error( - "{}.xml: Tag depth mismatch for [url]: no closing [/url]".format(state.current_class), state + '{}.xml: Misformatted [url] tag "{}" in {}.'.format(state.current_class, cmd, context_name), + state, ) - break - link_title = text[endq_pos + 1 : endurl_pos] - tag_text = make_link(link_url, link_title) - pre_text = text[:pos] - post_text = text[endurl_pos + 6 :] - - if pre_text and pre_text[-1] not in MARKUP_ALLOWED_PRECEDENT: - pre_text += "\ " - if post_text and post_text[0] not in MARKUP_ALLOWED_SUBSEQUENT: - post_text = "\ " + post_text - - text = pre_text + tag_text + post_text - pos = len(pre_text) + len(tag_text) - continue - elif cmd == "center": - tag_depth += 1 - tag_text = "" - elif cmd == "/center": - tag_depth -= 1 - tag_text = "" - elif cmd == "codeblock": - tag_depth += 1 - tag_text = "\n::\n" - inside_code = True - elif cmd == "gdscript": - tag_depth += 1 - tag_text = "\n .. code-tab:: gdscript\n" - inside_code = True - elif cmd == "csharp": - tag_depth += 1 - tag_text = "\n .. code-tab:: csharp\n" - inside_code = True - elif cmd == "codeblocks": - tag_depth += 1 - tag_text = "\n.. tabs::" - elif cmd == "/codeblocks": - tag_depth -= 1 - tag_text = "" elif cmd == "br": # Make a new paragraph instead of a linebreak, rst is not so linebreak friendly tag_text = "\n\n" # Strip potential leading spaces while post_text[0] == " ": post_text = post_text[1:] + + elif cmd == "center" or cmd == "/center": + if cmd == "/center": + tag_depth -= 1 + else: + tag_depth += 1 + tag_text = "" + elif cmd == "i" or cmd == "/i": if cmd == "/i": tag_depth -= 1 @@ -1354,6 +1583,7 @@ def rstize_text( tag_depth += 1 escape_pre = True tag_text = "*" + elif cmd == "b" or cmd == "/b": if cmd == "/b": tag_depth -= 1 @@ -1362,6 +1592,7 @@ def rstize_text( tag_depth += 1 escape_pre = True tag_text = "**" + elif cmd == "u" or cmd == "/u": if cmd == "/u": tag_depth -= 1 @@ -1370,25 +1601,31 @@ def rstize_text( tag_depth += 1 escape_pre = True tag_text = "" - elif cmd == "code": - tag_text = "``" - tag_depth += 1 - inside_code = True - escape_pre = True - elif cmd == "kbd": - tag_text = ":kbd:`" - tag_depth += 1 - escape_pre = True - elif cmd == "/kbd": + + elif cmd == "kbd" or cmd == "/kbd": tag_text = "`" - tag_depth -= 1 - escape_post = True - elif cmd.startswith("enum "): - tag_text = make_enum(cmd[5:], state) - escape_pre = True - escape_post = True + if cmd == "/kbd": + tag_depth -= 1 + escape_post = True + else: + tag_text = ":kbd:" + tag_text + tag_depth += 1 + escape_pre = True + + # Invalid syntax checks. + elif cmd.startswith("/"): + print_error( + '{}.xml: Unrecognized closing tag "{}" in {}.'.format(state.current_class, cmd, context_name), state + ) + + tag_text = "[" + tag_text + "]" + else: - tag_text = make_type(tag_text, state) + print_error( + '{}.xml: Unrecognized opening tag "{}" in {}.'.format(state.current_class, cmd, context_name), state + ) + + tag_text = "``{}``".format(tag_text) escape_pre = True escape_post = True @@ -1423,12 +1660,94 @@ def rstize_text( if tag_depth > 0: print_error( - "{}.xml: Tag depth mismatch: too many (or too little) open/close tags.".format(state.current_class), state + "{}.xml: Tag depth mismatch: too many (or too little) open/close tags in {}.".format( + state.current_class, context_name + ), + state, ) return text +def format_context_name(context: Union[DefinitionBase, None]) -> str: + context_name: str = "unknown context" + if context is not None: + context_name = '{} "{}" description'.format(context.definition_name, context.name) + + return context_name + + +def escape_rst(text: str, until_pos: int = -1) -> str: + # Escape \ character, otherwise it ends up as an escape character in rst + pos = 0 + while True: + pos = text.find("\\", pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\\\\" + text[pos + 1 :] + pos += 2 + + # Escape * character to avoid interpreting it as emphasis + pos = 0 + while True: + pos = text.find("*", pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\*" + text[pos + 1 :] + pos += 2 + + # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink + pos = 0 + while True: + pos = text.find("_", pos, until_pos) + if pos == -1: + break + if not text[pos + 1].isalnum(): # don't escape within a snake_case word + text = text[:pos] + "\_" + text[pos + 1 :] + pos += 2 + else: + pos += 1 + + return text + + +def format_codeblock(code_type: str, post_text: str, indent_level: int, state: State) -> Union[Tuple[str, int], None]: + end_pos = post_text.find("[/" + code_type + "]") + if end_pos == -1: + print_error("{}.xml: [" + code_type + "] without a closing tag.".format(state.current_class), state) + return None + + code_text = post_text[len("[" + code_type + "]") : end_pos] + post_text = post_text[end_pos:] + + # Remove extraneous tabs + code_pos = 0 + while True: + code_pos = code_text.find("\n", code_pos) + if code_pos == -1: + break + + to_skip = 0 + while code_pos + to_skip + 1 < len(code_text) and code_text[code_pos + to_skip + 1] == "\t": + to_skip += 1 + + if to_skip > indent_level: + print_error( + "{}.xml: Four spaces should be used for indentation within [{}].".format( + state.current_class, code_type + ), + state, + ) + + if len(code_text[code_pos + to_skip + 1 :]) == 0: + code_text = code_text[:code_pos] + "\n" + code_pos += 1 + else: + code_text = code_text[:code_pos] + "\n " + code_text[code_pos + to_skip + 1 :] + code_pos += 5 - to_skip + return ("\n[" + code_type + "]" + code_text + post_text, len("\n[" + code_type + "]" + code_text)) + + def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_columns: bool = False) -> None: if len(data) == 0: return @@ -1460,150 +1779,6 @@ def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_ f.write("\n") -def make_type(klass: str, state: State) -> str: - if klass.find("*") != -1: # Pointer, ignore - return klass - link_type = klass - if link_type.endswith("[]"): # Typed array, strip [] to link to contained type. - link_type = link_type[:-2] - if link_type in state.classes: - return ":ref:`{}<class_{}>`".format(klass, link_type) - print_error('{}.xml: Unresolved type "{}".'.format(state.current_class, klass), state) - return klass - - -def make_enum(t: str, state: State) -> str: - p = t.find(".") - if p >= 0: - c = t[0:p] - e = t[p + 1 :] - # Variant enums live in GlobalScope but still use periods. - if c == "Variant": - c = "@GlobalScope" - e = "Variant." + e - else: - c = state.current_class - e = t - if c in state.classes and e not in state.classes[c].enums: - c = "@GlobalScope" - - if c in state.classes and e in state.classes[c].enums: - return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) - - # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved. - if "{}.{}".format(c, e) != "Vector3.Axis": - print_error('{}.xml: Unresolved enum "{}".'.format(state.current_class, t), state) - - return t - - -def make_method_signature( - class_def: ClassDef, definition: Union[AnnotationDef, MethodDef, SignalDef], ref_type: str, state: State -) -> Tuple[str, str]: - ret_type = "" - - is_method_def = isinstance(definition, MethodDef) - if is_method_def: - ret_type = definition.return_type.to_rst(state) - - qualifiers = None - if is_method_def or isinstance(definition, AnnotationDef): - qualifiers = definition.qualifiers - - out = "" - - if is_method_def and ref_type != "": - if ref_type == "operator": - out += ":ref:`{0}<class_{1}_{2}_{3}_{4}>` ".format( - definition.name.replace("<", "\\<"), # So operator "<" gets correctly displayed. - class_def.name, - ref_type, - sanitize_operator_name(definition.name, state), - definition.return_type.type_name, - ) - else: - out += ":ref:`{0}<class_{1}_{2}_{0}>` ".format(definition.name, class_def.name, ref_type) - else: - out += "**{}** ".format(definition.name) - - out += "**(**" - for i, arg in enumerate(definition.parameters): - if i > 0: - out += ", " - else: - out += " " - - out += "{} {}".format(arg.type_name.to_rst(state), arg.name) - - if arg.default_value is not None: - out += "=" + arg.default_value - - if qualifiers is not None and "vararg" in qualifiers: - if len(definition.parameters) > 0: - out += ", ..." - else: - out += " ..." - - out += " **)**" - - if qualifiers is not None: - # Use substitutions for abbreviations. This is used to display tooltips on hover. - # See `make_footer()` for descriptions. - for qualifier in qualifiers.split(): - out += " |" + qualifier + "|" - - return ret_type, out - - -def make_heading(title: str, underline: str, l10n: bool = True) -> str: - if l10n: - new_title = translate(title) - if new_title != title: - title = new_title - underline *= 2 # Double length to handle wide chars. - return title + "\n" + (underline * len(title)) + "\n\n" - - -def make_footer() -> str: - # Generate reusable abbreviation substitutions. - # This way, we avoid bloating the generated rST with duplicate abbreviations. - # fmt: off - return ( - ".. |virtual| replace:: :abbr:`virtual (" + translate("This method should typically be overridden by the user to have any effect.") + ")`\n" - ".. |const| replace:: :abbr:`const (" + translate("This method has no side effects. It doesn't modify any of the instance's member variables.") + ")`\n" - ".. |vararg| replace:: :abbr:`vararg (" + translate("This method accepts any number of arguments after the ones described here.") + ")`\n" - ".. |constructor| replace:: :abbr:`constructor (" + translate("This method is used to construct a type.") + ")`\n" - ".. |static| replace:: :abbr:`static (" + translate("This method doesn't need an instance to be called, so it can be called directly using the class name.") + ")`\n" - ".. |operator| replace:: :abbr:`operator (" + translate("This method describes a valid operator to use with this type as left-hand operand.") + ")`\n" - ) - # fmt: on - - -def make_link(url: str, title: str) -> str: - match = GODOT_DOCS_PATTERN.search(url) - if match: - groups = match.groups() - if match.lastindex == 2: - # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: - # `#calling-javascript-from-script in Exporting For Web` - # Or use the title if provided. - if title != "": - return "`" + title + " <../" + groups[0] + ".html" + groups[1] + ">`__" - return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" - elif match.lastindex == 1: - # Doc reference, for example: - # `Math` - if title != "": - return ":doc:`" + title + " <../" + groups[0] + ">`" - return ":doc:`../" + groups[0] + "`" - - # External link, for example: - # `http://enet.bespin.org/usergroup0.html` - if title != "": - return "`" + title + " <" + url + ">`__" - return "`" + url + " <" + url + ">`__" - - def sanitize_operator_name(dirty_name: str, state: State) -> str: clear_name = dirty_name.replace("operator ", "") |