diff options
299 files changed, 3091 insertions, 2409 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 5c4bcc687a..ec74d7ea28 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1183,10 +1183,14 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("application/config/custom_user_dir_name", ""); GLOBAL_DEF("application/config/project_settings_override", ""); - GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1024); + // The default window size is tuned to: + // - Have a 16:9 aspect ratio, + // - Have both dimensions divisible by 8 to better play along with video recording, + // - Be displayable correctly in windowed mode on a 1366×768 display (tested on Windows 10 with default settings). + GLOBAL_DEF_BASIC("display/window/size/viewport_width", 1152); custom_prop_info["display/window/size/viewport_width"] = PropertyInfo(Variant::INT, "display/window/size/viewport_width", PROPERTY_HINT_RANGE, "0,7680,1,or_greater"); // 8K resolution - GLOBAL_DEF_BASIC("display/window/size/viewport_height", 600); + GLOBAL_DEF_BASIC("display/window/size/viewport_height", 648); custom_prop_info["display/window/size/viewport_height"] = PropertyInfo(Variant::INT, "display/window/size/viewport_height", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"); // 8K resolution GLOBAL_DEF_BASIC("display/window/size/resizable", true); diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 05e4e209d1..e6901bbe27 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,7 @@ <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="db2linear"> @@ -283,7 +283,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 +308,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 +320,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 +335,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 +343,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 +352,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 +397,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 +413,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 +430,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 +439,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 +477,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 +503,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 +512,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 +616,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 +629,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 +639,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 +647,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 +689,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 +786,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 +803,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 +814,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 +834,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 +855,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 +879,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 +893,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 +901,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 +919,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 +933,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 +945,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 +957,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 +968,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 +981,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 +999,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 +1011,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 +1055,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 +1065,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 +1107,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 +1135,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 +1156,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 +1170,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 +1180,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 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..977e73e7ca 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() @@ -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..efce94e25d 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() @@ -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..859b4a8a5f 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,7 +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. + 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_handle_mode" qualifiers="const"> @@ -135,7 +135,7 @@ <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. + Returns the handle mode of the key identified by [param key_idx]. See [enum HandleMode] for possible values. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_in_handle" qualifiers="const"> @@ -143,7 +143,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 +151,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 +159,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"> @@ -171,8 +171,8 @@ <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,7 +180,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. + 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_handle_mode"> @@ -190,7 +190,7 @@ <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. + Changes the handle mode of the keyframe at the given [param key_idx]. See [enum HandleMode] for possible values. The [param track_idx] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_in_handle"> @@ -200,7 +200,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 +210,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 +219,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 +249,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 +335,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 +349,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 +410,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 +432,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 +455,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 +479,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 +531,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 +555,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"> 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/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..c61705505e 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -41,7 +41,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 +99,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 +116,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 +129,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 +156,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 +169,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..3c50a1ac05 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -39,7 +39,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 +118,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 +135,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 +148,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 +175,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 +188,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..35656dbd70 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 less 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 less or the same number of elements, 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/AudioServer.xml b/doc/classes/AudioServer.xml index 98b28ae504..5bd1c82641 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,7 +26,7 @@ <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"> @@ -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,21 +99,21 @@ <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"> @@ -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..d2425313f7 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> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 36242a4402..8aa6278296 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"> @@ -115,7 +115,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 +123,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 +138,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..53fd9a7b67 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,7 +54,7 @@ <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"> @@ -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/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..6b379e0509 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,7 +33,7 @@ <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"> @@ -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..d7a9888fac 100644 --- a/doc/classes/CameraServer.xml +++ b/doc/classes/CameraServer.xml @@ -15,7 +15,7 @@ <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"> @@ -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..a230806c08 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. diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 4a95e18575..95612de284 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"> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 73f4e1c82e..deb93253ea 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"> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 151b34c430..90ce52fdb0 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,7 +62,7 @@ <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"> @@ -70,7 +70,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 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,7 +79,7 @@ <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"> @@ -87,7 +87,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 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,7 +95,7 @@ <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"> @@ -103,7 +103,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 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..6513b1ee13 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" /> <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,7 +155,7 @@ <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"> @@ -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,7 +222,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 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"> @@ -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..4353d97597 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,7 +51,7 @@ <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"> @@ -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"> @@ -237,13 +237,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..f9e28824df 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"> @@ -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"> @@ -195,7 +195,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/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/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..30d34e4f4d 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. @@ -201,7 +201,7 @@ <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..cb2474384a 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -152,7 +152,7 @@ <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]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -171,7 +171,7 @@ <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]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -190,7 +190,7 @@ <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]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -209,7 +209,7 @@ <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]. [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] @@ -228,7 +228,7 @@ <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]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -248,8 +248,8 @@ <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]. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -267,7 +267,7 @@ <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]. [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] @@ -282,7 +282,7 @@ <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. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -298,7 +298,7 @@ <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. [b]Note:[/b] This method is implemented on macOS. [b]Supported system menu IDs:[/b] [codeblock] @@ -311,7 +311,7 @@ <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] @@ -325,7 +325,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 +334,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 +343,7 @@ <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> @@ -352,7 +352,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 +361,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 +388,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 +406,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 +415,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 +424,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 +433,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 +442,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 +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] 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 +462,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 +473,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 +483,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 +493,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 +503,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 +513,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,7 +523,7 @@ <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> @@ -544,7 +544,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 +565,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 +585,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 +595,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 +626,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 +641,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 +649,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 +692,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 +730,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] @@ -842,7 +842,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 +896,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 +936,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 +949,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 +988,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 +1094,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 +1137,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 +1146,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 +1196,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 +1211,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 +1219,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..3555d2fd48 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -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..1dd53e1394 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -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,7 +162,7 @@ <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"> @@ -217,21 +217,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..74870f34db 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 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. 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..5a1037aebe 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"> @@ -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..c88a7b75b0 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> @@ -64,7 +64,7 @@ <param index="0" name="resource" type="Resource" /> <param index="1" name="edit" 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 edit] is [code]true[/code], the signal was caused by the context menu "Edit" 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/EditorSettings.xml b/doc/classes/EditorSettings.xml index 2362213109..6079cc48c8 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -74,14 +74,14 @@ <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"> @@ -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"> @@ -136,14 +136,14 @@ <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. + Returns [code]true[/code] if the setting specified by [param name] 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. + Returns the default value of the setting specified by [param name]. 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"> @@ -151,7 +151,7 @@ <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 +167,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 +176,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 +191,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> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index a982d69b07..2350a1f51b 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -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..0f229ea19a 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -142,7 +142,7 @@ <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"> @@ -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"> @@ -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/GPUParticlesCollisionSDF3D.xml b/doc/classes/GPUParticlesCollisionSDF3D.xml index 1a530b2561..29adf4fbc1 100644 --- a/doc/classes/GPUParticlesCollisionSDF3D.xml +++ b/doc/classes/GPUParticlesCollisionSDF3D.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 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/Geometry2D.xml b/doc/classes/Geometry2D.xml index 0926f0acfe..80d19e22c5 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -14,8 +14,8 @@ <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"> @@ -23,7 +23,7 @@ <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"> @@ -38,7 +38,7 @@ <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,7 +67,7 @@ <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"> @@ -75,7 +75,7 @@ <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> @@ -84,7 +84,7 @@ <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> @@ -134,7 +134,7 @@ <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> @@ -144,8 +144,8 @@ <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] @@ -172,9 +172,9 @@ <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..c841842d14 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -13,7 +13,7 @@ <return type="Array" /> <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"> @@ -24,7 +24,7 @@ <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"> @@ -34,7 +34,7 @@ <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 6473ea9815..9f9d1a7ed6 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,7 +145,7 @@ <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"> @@ -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> @@ -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/IP.xml b/doc/classes/IP.xml index 63de1f8081..e476a86a49 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -13,14 +13,14 @@ <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"> @@ -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,7 +70,7 @@ <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"> @@ -78,7 +78,7 @@ <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/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..d60abd7975 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -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,7 +87,7 @@ <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"> 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..49ebb55a52 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -52,7 +52,7 @@ <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. </description> </method> @@ -65,8 +65,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/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..239eea099b 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,7 +62,7 @@ </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. + Limits the number 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]. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" /> 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/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/Mesh.xml b/doc/classes/Mesh.xml index f708917b4b..8e98efa6fc 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -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"> 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 c2b57404dc..30ad13ec93 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 d4221240ba..22c468cb6b 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 8469099b80..e4e9a7fea9 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"> @@ -143,7 +143,7 @@ <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. @@ -153,7 +153,7 @@ <return type="Array" /> <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" /> <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 f9dfd01c41..7c6b828aa9 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"> @@ -143,7 +143,7 @@ <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. @@ -153,7 +153,7 @@ <return type="Array" /> <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" /> <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..d38a724d39 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]true[/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,7 +258,7 @@ <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"> @@ -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..8a8a68ec35 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -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"> @@ -138,14 +138,14 @@ <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. + 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 Node3D property with given [code]name[/code]. + Returns the default value of the Node3D property with given [param name]. </description> </method> <method name="rotate"> @@ -245,14 +245,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 +260,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..ba219d8603 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -39,7 +39,7 @@ <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"> @@ -61,7 +61,7 @@ <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="_set" qualifiers="virtual"> @@ -70,7 +70,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 +85,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 +110,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 +129,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 +154,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 +294,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 +302,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 +325,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> @@ -366,8 +366,8 @@ <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). </description> </method> <method name="get_meta_list" qualifiers="const"> @@ -399,7 +399,7 @@ <return type="Array" /> <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"> @@ -412,28 +412,28 @@ <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]. </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 +446,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 +455,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 +470,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"> @@ -491,7 +491,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> @@ -570,7 +570,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 +582,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..a552a2c16c 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> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index 3083ea849b..cb00b45fed 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -30,14 +30,14 @@ <param index="1" name="source_path" type="String" /> <param index="2" name="encrypt" type="bool" default="false" /> <description> - Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]). + Adds the [param source_path] file to the current PCK package at the [param pck_path] internal path (should start with [code]res://[/code]). </description> </method> <method name="flush"> <return type="int" enum="Error" /> <param index="0" name="verbose" type="bool" default="false" /> <description> - Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging. + Writes the files specified using all [method add_file] calls since the last flush. If [param verbose] is [code]true[/code], a list of files added will be printed to the console for easier debugging. </description> </method> <method name="pck_start"> @@ -47,7 +47,7 @@ <param index="2" name="key" type="String" default=""0000000000000000000000000000000000000000000000000000000000000000"" /> <param index="3" name="encrypt_directory" type="bool" default="false" /> <description> - Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required). + Creates a new PCK file with the name [param pck_name]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_name] (even though it's not required). </description> </method> </methods> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 36372fbe54..b02333667d 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -50,7 +50,7 @@ <param index="0" name="value" type="int" /> <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> @@ -159,7 +159,7 @@ <param index="0" name="buffer_size" type="int" /> <param index="1" name="compression_mode" type="int" default="0" /> <description> - Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. + Returns a new [PackedByteArray] with the data decompressed. Set [param buffer_size] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decompress_dynamic" qualifiers="const"> @@ -169,7 +169,7 @@ <description> Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b] This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning. - GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. + GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [param max_output_size]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. </description> </method> <method name="duplicate"> @@ -306,7 +306,7 @@ <return type="bool" /> <param index="0" name="value" type="int" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="has_encoded_var" qualifiers="const"> @@ -400,9 +400,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray]. - 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]). + Returns the slice of the [PackedByteArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedByteArray]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 390adfa5a6..c694927175 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -50,7 +50,7 @@ <param index="0" name="value" type="Color" /> <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> @@ -92,7 +92,7 @@ <return type="bool" /> <param index="0" name="value" type="Color" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -163,9 +163,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedColorArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedColorArray]. - 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]). + Returns the slice of the [PackedColorArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedColorArray]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index f5d5b4566b..41d0679099 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -51,7 +51,7 @@ <param index="0" name="value" type="float" /> <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> @@ -93,7 +93,7 @@ <return type="bool" /> <param index="0" name="value" type="float" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -164,9 +164,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedFloat32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat32Array]. - 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]). + Returns the slice of the [PackedFloat32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat32Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index dfac2c80e8..bedbe3603c 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -51,7 +51,7 @@ <param index="0" name="value" type="float" /> <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> @@ -93,7 +93,7 @@ <return type="bool" /> <param index="0" name="value" type="float" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -164,9 +164,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedFloat64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedFloat64Array]. - 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]). + Returns the slice of the [PackedFloat64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat64Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index b29b1b1bd0..db4c8c0937 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -51,7 +51,7 @@ <param index="0" name="value" type="int" /> <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> @@ -93,7 +93,7 @@ <return type="bool" /> <param index="0" name="value" type="int" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -164,9 +164,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedInt32Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt32Array]. - 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]). + Returns the slice of the [PackedInt32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt32Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 2a33238677..56d72692a2 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -51,7 +51,7 @@ <param index="0" name="value" type="int" /> <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> @@ -93,7 +93,7 @@ <return type="bool" /> <param index="0" name="value" type="int" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -164,9 +164,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedInt64Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedInt64Array]. - 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]). + Returns the slice of the [PackedInt64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt64Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 364142f0b6..b58a3b2553 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -57,7 +57,7 @@ <param index="0" name="value" type="String" /> <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> @@ -99,7 +99,7 @@ <return type="bool" /> <param index="0" name="value" type="String" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -170,9 +170,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedStringArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedStringArray]. - 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]). + Returns the slice of the [PackedStringArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedStringArray]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 632680e739..7cf63d3d5e 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -51,7 +51,7 @@ <param index="0" name="value" type="Vector2" /> <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> @@ -93,7 +93,7 @@ <return type="bool" /> <param index="0" name="value" type="Vector2" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -164,9 +164,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedVector2Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector2Array]. - 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]). + Returns the slice of the [PackedVector2Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector2Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 014e7d5aa5..5ab42474f0 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -50,7 +50,7 @@ <param index="0" name="value" type="Vector3" /> <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> @@ -92,7 +92,7 @@ <return type="bool" /> <param index="0" name="value" type="Vector3" /> <description> - Returns [code]true[/code] if the array contains [code]value[/code]. + Returns [code]true[/code] if the array contains [param value]. </description> </method> <method name="insert"> @@ -163,9 +163,9 @@ <param index="0" name="begin" type="int" /> <param index="1" name="end" type="int" default="2147483647" /> <description> - Returns the slice of the [PackedVector3Array], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedVector3Array]. - 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]). + Returns the slice of the [PackedVector3Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector3Array]. + 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]). </description> </method> <method name="sort"> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 6bfaa71838..ab2bc34672 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -32,7 +32,7 @@ <return type="Variant" /> <param index="0" name="allow_objects" type="bool" default="false" /> <description> - Gets a Variant. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + Gets a Variant. 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> @@ -48,7 +48,7 @@ <param index="0" name="var" type="Variant" /> <param index="1" name="full_objects" type="bool" default="false" /> <description> - Sends a [Variant] as a packet. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). + Sends a [Variant] as a packet. 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/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml index 319740e76b..e9918bdd3a 100644 --- a/doc/classes/PacketPeerDTLS.xml +++ b/doc/classes/PacketPeerDTLS.xml @@ -18,7 +18,7 @@ <param index="2" name="for_hostname" type="String" default="""" /> <param index="3" name="valid_certificate" type="X509Certificate" default="null" /> <description> - Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument. + Connects a [param packet_peer] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [param validate_certs] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [param for_hostname] argument. You can specify a custom [X509Certificate] to use for validation via the [param valid_certificate] argument. </description> </method> <method name="disconnect_from_peer"> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index bcd9f3fb46..b635757b2b 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -16,10 +16,10 @@ <param index="1" name="bind_address" type="String" default=""*"" /> <param index="2" name="recv_buf_size" type="int" default="65536" /> <description> - Binds this [PacketPeerUDP] to the specified [code]port[/code] and [code]address[/code] with a buffer size [code]recv_buf_size[/code], allowing it to receive incoming packets. - If [code]address[/code] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6). - If [code]address[/code] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will be bound to all available addresses matching that IP type. - If [code]address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). + Binds this [PacketPeerUDP] to the specified [param port] and [param bind_address] with a buffer size [param recv_buf_size], allowing it to receive incoming packets. + If [param bind_address] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6). + If [param bind_address] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will be bound to all available addresses matching that IP type. + If [param bind_address] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). </description> </method> <method name="close"> @@ -33,7 +33,7 @@ <param index="0" name="host" type="String" /> <param index="1" name="port" type="int" /> <description> - Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. + Calling this method connects this UDP peer to the given [param host]/[param port] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information. </description> </method> @@ -72,7 +72,7 @@ <param index="0" name="multicast_address" type="String" /> <param index="1" name="interface_name" type="String" /> <description> - Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. + Joins the multicast group specified by [param multicast_address] using the interface identified by [param interface_name]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. [b]Note:[/b] Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work. </description> @@ -82,7 +82,7 @@ <param index="0" name="multicast_address" type="String" /> <param index="1" name="interface_name" type="String" /> <description> - Removes the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code]. + Removes the interface identified by [param interface_name] from the multicast group specified by [param multicast_address]. </description> </method> <method name="set_broadcast_enabled"> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index f61c051a52..ddb290f007 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -19,7 +19,7 @@ <param index="1" name="callable" type="Callable" /> <param index="2" name="arguments" type="Array" default="[]" /> <description> - Adds a custom monitor with the name [code]id[/code]. You can specify the category of the monitor using slash delimiters in [code]id[/code] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [code]id[/code] is already present. + Adds a custom monitor with the name [param id]. You can specify the category of the monitor using slash delimiters in [param id] (for example: [code]"Game/NumberOfNPCs"[/code]). If there is more than one slash delimiter, then the default category is used. The default category is [code]"Custom"[/code]. Prints an error if given [param id] is already present. [codeblocks] [gdscript] func _ready(): @@ -75,7 +75,7 @@ <return type="Variant" /> <param index="0" name="id" type="StringName" /> <description> - Returns the value of custom monitor with given [code]id[/code]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [code]id[/code] is absent. + Returns the value of custom monitor with given [param id]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [param id] is absent. </description> </method> <method name="get_custom_monitor_names"> @@ -110,14 +110,14 @@ <return type="bool" /> <param index="0" name="id" type="StringName" /> <description> - Returns [code]true[/code] if custom monitor with the given [code]id[/code] is present, [code]false[/code] otherwise. + Returns [code]true[/code] if custom monitor with the given [param id] is present, [code]false[/code] otherwise. </description> </method> <method name="remove_custom_monitor"> <return type="void" /> <param index="0" name="id" type="StringName" /> <description> - Removes the custom monitor with given [code]id[/code]. Prints an error if the given [code]id[/code] is already absent. + Removes the custom monitor with given [param id]. Prints an error if the given [param id] is already absent. </description> </method> </methods> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index b9bffafdef..2350fd4458 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -29,10 +29,10 @@ <param index="1" name="test_only" type="bool" default="false" /> <param index="2" name="safe_margin" type="float" default="0.08" /> <description> - Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code]. + 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 [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. - [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). + 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). </description> </method> <method name="remove_collision_exception_with"> @@ -49,10 +49,10 @@ <param index="2" name="collision" type="KinematicCollision2D" default="null" /> <param index="3" name="safe_margin" type="float" default="0.08" /> <description> - Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] 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 [code]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. - [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion. - [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody2D.collision/safe_margin] for more details). + 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). </description> </method> </methods> diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index 4a641e5040..3ef7fc9030 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -21,7 +21,7 @@ <return type="bool" /> <param index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> <description> - Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked. + Returns [code]true[/code] if the specified linear or rotational [param axis] is locked. </description> </method> <method name="get_collision_exceptions"> @@ -37,11 +37,11 @@ <param index="2" name="safe_margin" type="float" default="0.001" /> <param index="3" name="max_collisions" type="int" default="1" /> <description> - Moves the body along the vector [code]distance[/code]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] should be computed using [code]delta[/code]. + 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 [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. - [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). - [code]max_collisions[/code] allows to retrieve more than one collision result. + 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 max_collisions] allows to retrieve more than one collision result. </description> </method> <method name="remove_collision_exception_with"> @@ -56,7 +56,7 @@ <param index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> <param index="1" name="lock" type="bool" /> <description> - Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code]. + Locks or unlocks the specified linear or rotational [param axis] depending on the value of [param lock]. </description> </method> <method name="test_move"> @@ -67,11 +67,11 @@ <param index="3" name="safe_margin" type="float" default="0.001" /> <param index="4" name="max_collisions" type="int" default="1" /> <description> - Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [code]distance[/code] 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 [code]distance[/code]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. - [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion. - [code]safe_margin[/code] is the extra margin used for collision recovery (see [member CharacterBody3D.collision/safe_margin] for more details). - [code]max_collisions[/code] allows to retrieve more than one collision result. + 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 max_collisions] allows to retrieve more than one collision result. </description> </method> </methods> diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index 56367fbf0c..93c9f83ff2 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -25,7 +25,7 @@ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="add_constant_torque"> @@ -58,7 +58,7 @@ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_impulse"> @@ -68,7 +68,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_torque"> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index b05960b035..62eb9f6ac4 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -25,7 +25,7 @@ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="add_constant_torque"> @@ -58,7 +58,7 @@ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_impulse"> @@ -68,7 +68,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_torque"> diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index e5a9e5dacf..6290ea315f 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -53,7 +53,7 @@ [code]collider_id[/code]: The colliding object's ID. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> @@ -81,7 +81,7 @@ [code]collider_id[/code]: The colliding object's ID. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. </description> </method> </methods> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index 6539edd4fe..619891df90 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -55,7 +55,7 @@ [code]collider_id[/code]: The colliding object's ID. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. </description> </method> <method name="intersect_ray"> @@ -82,7 +82,7 @@ [code]collider_id[/code]: The colliding object's ID. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - The number of intersections can be limited with the [code]max_results[/code] parameter, to reduce the processing time. + The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. </description> </method> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 4bb44223b3..920b56c8c6 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -232,7 +232,7 @@ <param index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector2(0, 0))[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_add_constant_torque"> @@ -279,7 +279,7 @@ <param index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_apply_impulse"> @@ -290,7 +290,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_apply_torque"> @@ -553,7 +553,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"> @@ -597,7 +597,7 @@ <param index="2" name="enable" type="bool" /> <param index="3" name="margin" type="float" /> <description> - Enables one way collision on body if [code]enable[/code] is [code]true[/code]. + Enables one way collision on body if [param enable] is [code]true[/code]. </description> </method> <method name="body_set_shape_disabled"> @@ -606,7 +606,7 @@ <param index="1" name="shape_idx" type="int" /> <param index="2" name="disabled" type="bool" /> <description> - Disables shape in body if [code]disable[/code] is [code]true[/code]. + Disables shape in body if [param disabled] is [code]true[/code]. </description> </method> <method name="body_set_shape_transform"> @@ -882,7 +882,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 b76e9dfdf4..b2456c69ec 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -226,7 +226,7 @@ <param index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]body_set_constant_force(body, Vector3(0, 0, 0))[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_add_constant_torque"> @@ -273,7 +273,7 @@ <param index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_apply_impulse"> @@ -284,7 +284,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="body_apply_torque"> @@ -549,7 +549,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"> @@ -582,7 +582,7 @@ <param index="0" name="body" type="RID" /> <param index="1" name="enable" type="bool" /> <description> - Sets the body pickable with rays if [code]enabled[/code] is set. + Sets the body pickable with rays if [param enable] is set. </description> </method> <method name="body_set_shape"> @@ -1422,7 +1422,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/Plane.xml b/doc/classes/Plane.xml index 63a05ef15c..e51e3753fc 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -30,7 +30,7 @@ <param index="2" name="c" type="float" /> <param index="3" name="d" type="float" /> <description> - Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin. + Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [param a], [param b] and [param c], and the plane has a distance of [param d] from the origin. </description> </constructor> <constructor name="Plane"> @@ -77,7 +77,7 @@ <return type="float" /> <param index="0" name="point" type="Vector3" /> <description> - Returns the shortest distance from the plane to the position [code]point[/code]. If the point is above the plane, the distance will be positive. If below, the distance will be negative. + Returns the shortest distance from the plane to the position [param point]. If the point is above the plane, the distance will be positive. If below, the distance will be negative. </description> </method> <method name="has_point" qualifiers="const"> @@ -85,7 +85,7 @@ <param index="0" name="point" type="Vector3" /> <param index="1" name="tolerance" type="float" default="1e-05" /> <description> - Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]tolerance[/code] threshold. + Returns [code]true[/code] if [param point] is inside the plane. Comparison uses a custom minimum [param tolerance] threshold. </description> </method> <method name="intersect_3" qualifiers="const"> @@ -93,7 +93,7 @@ <param index="0" name="b" type="Plane" /> <param index="1" name="c" type="Plane" /> <description> - Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned. + Returns the intersection point of the three planes [param b], [param c] and this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_ray" qualifiers="const"> @@ -101,7 +101,7 @@ <param index="0" name="from" type="Vector3" /> <param index="1" name="dir" type="Vector3" /> <description> - Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned. + Returns the intersection point of a ray consisting of the position [param from] and the direction normal [param dir] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_segment" qualifiers="const"> @@ -109,21 +109,21 @@ <param index="0" name="from" type="Vector3" /> <param index="1" name="to" type="Vector3" /> <description> - Returns the intersection point of a segment from position [code]from[/code] to position [code]to[/code] with this plane. If no intersection is found, [code]null[/code] is returned. + Returns the intersection point of a segment from position [param from] to position [param to] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="is_equal_approx" qualifiers="const"> <return type="bool" /> <param index="0" name="to_plane" type="Plane" /> <description> - Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this plane and [param to_plane] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_point_over" qualifiers="const"> <return type="bool" /> <param index="0" name="point" type="Vector3" /> <description> - Returns [code]true[/code] if [code]point[/code] is located above the plane. + Returns [code]true[/code] if [param point] is located above the plane. </description> </method> <method name="normalized" qualifiers="const"> @@ -136,7 +136,7 @@ <return type="Vector3" /> <param index="0" name="point" type="Vector3" /> <description> - Returns the orthogonal projection of [code]point[/code] into a point in the plane. + Returns the orthogonal projection of [param point] into a point in the plane. </description> </method> </methods> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 8498e703fb..5d5c69aadd 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -14,7 +14,7 @@ <param index="0" name="path" type="NodePath" /> <param index="1" name="weights" type="PackedFloat32Array" /> <description> - Adds a bone with the specified [code]path[/code] and [code]weights[/code]. + Adds a bone with the specified [param path] and [param weights]. </description> </method> <method name="clear_bones"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 284c5a1870..26bc765ef4 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -19,8 +19,8 @@ <param index="1" name="id" type="int" default="-1" /> <param index="2" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new checkable item with text [code]label[/code]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + Adds a new checkable item with text [param label]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -31,7 +31,7 @@ <param index="2" name="global" type="bool" default="false" /> <description> Adds a new checkable item and assigns the specified [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -42,8 +42,8 @@ <param index="2" name="id" type="int" default="-1" /> <param index="3" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + Adds a new checkable item with text [param label] and icon [param texture]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -54,8 +54,8 @@ <param index="2" name="id" type="int" default="-1" /> <param index="3" name="global" type="bool" default="false" /> <description> - Adds a new checkable item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + Adds a new checkable item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -66,8 +66,8 @@ <param index="2" name="id" type="int" default="-1" /> <param index="3" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new item with text [code]label[/code] and icon [code]texture[/code]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + Adds a new item with text [param label] and icon [param texture]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_icon_radio_check_item"> @@ -97,8 +97,8 @@ <param index="2" name="id" type="int" default="-1" /> <param index="3" name="global" type="bool" default="false" /> <description> - Adds a new item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + Adds a new item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. </description> </method> <method name="add_item"> @@ -107,9 +107,9 @@ <param index="1" name="id" type="int" default="-1" /> <param index="2" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new item with text [code]label[/code]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. - [b]Note:[/b] The provided [code]id[/code] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked]. + Adds a new item with text [param label]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + [b]Note:[/b] The provided [param id] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked]. </description> </method> <method name="add_multistate_item"> @@ -120,9 +120,9 @@ <param index="3" name="id" type="int" default="-1" /> <param index="4" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new multistate item with text [code]label[/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]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + Adds a new multistate item with text [param label]. + 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]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_radio_check_item"> @@ -131,8 +131,8 @@ <param index="1" name="id" type="int" default="-1" /> <param index="2" name="accel" type="int" enum="Key" default="0" /> <description> - Adds a new radio check button with text [code]label[/code]. - An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + Adds a new radio check button with text [param label]. + An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -143,7 +143,7 @@ <param index="2" name="global" type="bool" default="false" /> <description> Adds a new radio check button and assigns a [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> @@ -152,8 +152,8 @@ <param index="0" name="label" type="String" default="""" /> <param index="1" name="id" type="int" default="-1" /> <description> - Adds a separator between items. Separators also occupy an index, which you can set by using the [code]id[/code] parameter. - A [code]label[/code] can optionally be provided, which will appear at the center of the separator. + Adds a separator between items. Separators also occupy an index, which you can set by using the [param id] parameter. + A [param label] can optionally be provided, which will appear at the center of the separator. </description> </method> <method name="add_shortcut"> @@ -163,7 +163,7 @@ <param index="2" name="global" type="bool" default="false" /> <description> Adds a [Shortcut]. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. </description> </method> <method name="add_submenu_item"> @@ -172,8 +172,8 @@ <param index="1" name="submenu" type="String" /> <param index="2" name="id" type="int" default="-1" /> <description> - Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [code]submenu[/code] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked. - An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [param submenu] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked. + An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. </description> </method> <method name="clear"> @@ -192,35 +192,35 @@ <return type="int" enum="Key" /> <param index="0" name="index" type="int" /> <description> - Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + 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 [code]index[/code]. + 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" /> <description> - Returns the icon of the item at the given [code]index[/code]. + Returns the icon of the item at the given [param index]. </description> </method> <method name="get_item_id" qualifiers="const"> <return type="int" /> <param index="0" name="index" type="int" /> <description> - Returns the id of the item at the given [code]index[/code]. [code]id[/code] can be manually assigned, while index can not. + 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_index" qualifiers="const"> <return type="int" /> <param index="0" name="id" type="int" /> <description> - Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine and can not be set manually. + Returns the index of the item containing the specified [param id]. Index is automatically assigned to each item by the engine and can not be set manually. </description> </method> <method name="get_item_language" qualifiers="const"> @@ -241,21 +241,21 @@ <return type="Shortcut" /> <param index="0" name="index" type="int" /> <description> - Returns the [Shortcut] associated with the item at the given [code]index[/code]. + Returns the [Shortcut] associated with the item at the given [param index]. </description> </method> <method name="get_item_submenu" qualifiers="const"> <return type="String" /> <param index="0" name="index" type="int" /> <description> - Returns the submenu name of the item at the given [code]index[/code]. See [method add_submenu_item] for more info on how to add a submenu. + Returns the submenu name of the item at the given [param index]. See [method add_submenu_item] for more info on how to add a submenu. </description> </method> <method name="get_item_text" qualifiers="const"> <return type="String" /> <param index="0" name="index" type="int" /> <description> - Returns the text of the item at the given [code]index[/code]. + Returns the text of the item at the given [param index]. </description> </method> <method name="get_item_text_direction" qualifiers="const"> @@ -269,14 +269,14 @@ <return type="String" /> <param index="0" name="index" type="int" /> <description> - Returns the tooltip associated with the item at the given [code]index[/code]. + Returns the tooltip associated with the item at the given [param index]. </description> </method> <method name="is_item_checkable" qualifiers="const"> <return type="bool" /> <param index="0" name="index" type="int" /> <description> - Returns [code]true[/code] if the item at the given [code]index[/code] is checkable in some way, i.e. if it has a checkbox or radio button. + Returns [code]true[/code] if the item at the given [param index] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> @@ -284,14 +284,14 @@ <return type="bool" /> <param index="0" name="index" type="int" /> <description> - Returns [code]true[/code] if the item at the given [code]index[/code] is checked. + Returns [code]true[/code] if the item at the given [param index] is checked. </description> </method> <method name="is_item_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="index" type="int" /> <description> - Returns [code]true[/code] if the item at the given [code]index[/code] is disabled. When it is disabled it can't be selected, or its action invoked. + Returns [code]true[/code] if the item at the given [param index] is disabled. When it is disabled it can't be selected, or its action invoked. See [method set_item_disabled] for more info on how to disable an item. </description> </method> @@ -299,7 +299,7 @@ <return type="bool" /> <param index="0" name="index" type="int" /> <description> - Returns [code]true[/code] if the item at the given [code]index[/code] has radio button-style checkability. + Returns [code]true[/code] if the item at the given [param index] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. </description> </method> @@ -321,7 +321,7 @@ <return type="void" /> <param index="0" name="index" type="int" /> <description> - Removes the item at the given [code]index[/code] from the menu. + Removes the item at the given [param index] from the menu. [b]Note:[/b] The indices of items after the removed item will be shifted by one. </description> </method> @@ -329,14 +329,14 @@ <return type="void" /> <param index="0" name="index" type="int" /> <description> - Moves the scroll view to make the item at the given [code]index[/code] visible. + Moves the scroll view to make the item at the given [param index] visible. </description> </method> <method name="set_current_index"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Sets the currently focused item as the given [code]index[/code]. + Sets the currently focused item as the given [param index]. </description> </method> <method name="set_item_accelerator"> @@ -344,7 +344,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="accel" type="int" enum="Key" /> <description> - Sets the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + Sets 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="set_item_as_checkable"> @@ -352,7 +352,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="enable" type="bool" /> <description> - Sets whether the item at the given [code]index[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. + Sets whether the item at the given [param index] has a checkbox. If [code]false[/code], sets the type of the item to plain text. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> @@ -361,7 +361,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="enable" type="bool" /> <description> - Sets the type of the item at the given [code]index[/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 given [param index] to radio button. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_as_separator"> @@ -369,7 +369,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="enable" type="bool" /> <description> - Mark the item at the given [code]index[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. + Mark the item at the given [param index] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_checked"> @@ -377,7 +377,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="checked" type="bool" /> <description> - Sets the checkstate status of the item at the given [code]index[/code]. + Sets the checkstate status of the item at the given [param index]. </description> </method> <method name="set_item_disabled"> @@ -385,7 +385,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="disabled" type="bool" /> <description> - Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked. + 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"> @@ -393,7 +393,7 @@ <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 [code]index[/code]. + Sets the horizontal offset of the item at the given [param index]. </description> </method> <method name="set_item_icon"> @@ -401,7 +401,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="icon" type="Texture2D" /> <description> - Replaces the [Texture2D] icon of the item at the given [code]index[/code]. + Replaces the [Texture2D] icon of the item at the given [param index]. </description> </method> <method name="set_item_id"> @@ -409,8 +409,8 @@ <param index="0" name="index" type="int" /> <param index="1" name="id" type="int" /> <description> - Sets the [code]id[/code] of the item at the given [code]index[/code]. - The [code]id[/code] is used in [signal id_pressed] and [signal id_focused] signals. + Sets the [param id] of the item at the given [param index]. + The [param id] is used in [signal id_pressed] and [signal id_focused] signals. </description> </method> <method name="set_item_language"> @@ -443,7 +443,7 @@ <param index="1" name="shortcut" type="Shortcut" /> <param index="2" name="global" type="bool" default="false" /> <description> - Sets a [Shortcut] for the item at the given [code]index[/code]. + Sets a [Shortcut] for the item at the given [param index]. </description> </method> <method name="set_item_shortcut_disabled"> @@ -451,7 +451,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="disabled" type="bool" /> <description> - Disables the [Shortcut] of the item at the given [code]index[/code]. + Disables the [Shortcut] of the item at the given [param index]. </description> </method> <method name="set_item_submenu"> @@ -459,7 +459,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="submenu" type="String" /> <description> - Sets the submenu of the item at the given [code]index[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. + Sets the submenu of the item at the given [param index]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. </description> </method> <method name="set_item_text"> @@ -467,7 +467,7 @@ <param index="0" name="index" type="int" /> <param index="1" name="text" type="String" /> <description> - Sets the text of the item at the given [code]index[/code]. + Sets the text of the item at the given [param index]. </description> </method> <method name="set_item_text_direction"> @@ -483,14 +483,14 @@ <param index="0" name="index" type="int" /> <param index="1" name="tooltip" type="String" /> <description> - Sets the [String] tooltip of the item at the given [code]index[/code]. + Sets the [String] tooltip of the item at the given [param index]. </description> </method> <method name="toggle_item_checked"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Toggles the check state of the item at the given [code]index[/code]. + Toggles the check state of the item at the given [param index]. </description> </method> <method name="toggle_item_multistate"> @@ -525,19 +525,19 @@ <signal name="id_focused"> <param index="0" name="id" type="int" /> <description> - Emitted when user navigated to an item of some [code]id[/code] using [code]ui_up[/code] or [code]ui_down[/code] action. + Emitted when user navigated to an item of some [param id] using [code]ui_up[/code] or [code]ui_down[/code] action. </description> </signal> <signal name="id_pressed"> <param index="0" name="id" type="int" /> <description> - Emitted when an item of some [code]id[/code] is pressed or its accelerator is activated. + Emitted when an item of some [param id] is pressed or its accelerator is activated. </description> </signal> <signal name="index_pressed"> <param index="0" name="index" type="int" /> <description> - Emitted when an item of some [code]index[/code] is pressed or its accelerator is activated. + Emitted when an item of some [param index] is pressed or its accelerator is activated. </description> </signal> </signals> 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/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 8c575c25ce..fcde9f6686 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -87,7 +87,7 @@ <return type="String" /> <param index="0" name="path" type="String" /> <description> - Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. + Returns the absolute, native OS path corresponding to the localized [param path] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. [b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: [codeblock] var path = "" @@ -117,16 +117,16 @@ <param index="1" name="replace_files" type="bool" default="true" /> <param index="2" name="offset" type="int" default="0" /> <description> - Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success. - [b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code] unless [code]replace_files[/code] is set to [code]false[/code]. - [b]Note:[/b] The optional [code]offset[/code] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. + Loads the contents of the .pck or .zip file specified by [param pack] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success. + [b]Note:[/b] If a file from [param pack] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [param pack] unless [param replace_files] is set to [code]false[/code]. + [b]Note:[/b] The optional [param offset] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. </description> </method> <method name="localize_path" qualifiers="const"> <return type="String" /> <param index="0" name="path" type="String" /> <description> - Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [code]path[/code]. See also [method globalize_path]. + 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"> @@ -292,6 +292,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 +346,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 +468,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. @@ -576,19 +578,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 +869,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 +933,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". @@ -1468,13 +1474,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 +1571,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 +1639,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 +1842,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. diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index e75d4ea737..bc0ffbefe2 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -70,8 +70,8 @@ <return type="float" /> <param index="0" name="to" type="Quaternion" /> <description> - Returns the angle between this quaternion and [code]to[/code]. 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. + 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 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"> @@ -112,7 +112,7 @@ <return type="bool" /> <param index="0" name="to" type="Quaternion" /> <description> - Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this quaternion and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_normalized" qualifiers="const"> @@ -149,7 +149,7 @@ <param index="0" name="to" type="Quaternion" /> <param index="1" name="weight" type="float" /> <description> - Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. + Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight]. [b]Note:[/b] Both quaternions must be normalized. </description> </method> @@ -158,7 +158,7 @@ <param index="0" name="to" type="Quaternion" /> <param index="1" name="weight" type="float" /> <description> - Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. + Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight], but without checking if the rotation path is not bigger than 90 degrees. </description> </method> <method name="spherical_cubic_interpolate" qualifiers="const"> @@ -168,7 +168,7 @@ <param index="2" name="post_b" type="Quaternion" /> <param index="3" name="weight" type="float" /> <description> - Performs a spherical cubic interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. + 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> </methods> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 726f9e91d8..b8a290381f 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -30,7 +30,7 @@ <param index="0" name="from" type="float" /> <param index="1" name="to" type="float" /> <description> - Returns a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive). + Returns a pseudo-random float between [param from] and [param to] (inclusive). </description> </method> <method name="randfn"> @@ -38,7 +38,7 @@ <param index="0" name="mean" type="float" default="0.0" /> <param index="1" name="deviation" type="float" default="1.0" /> <description> - Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. + Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, 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"> @@ -52,7 +52,7 @@ <param index="0" name="from" type="int" /> <param index="1" name="to" type="int" /> <description> - Returns a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). + Returns a pseudo-random 32-bit signed integer between [param from] and [param to] (inclusive). </description> </method> <method name="randomize"> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index a4be738395..16e6e86f9e 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -72,7 +72,7 @@ <param index="0" name="value" type="float" /> <description> Emitted when [member value] changes. When used on a [Slider], this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to [signal value_changed], consider using a [i]debouncing[/i] [Timer] to call the function less often. - [b]Note:[/b] Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [code]value[/code] is set directly via code. + [b]Note:[/b] Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [param value] is set directly via code. </description> </signal> </signals> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index bbf29c1f44..4f4395a433 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -57,7 +57,7 @@ <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_collision_normal" qualifiers="const"> @@ -98,7 +98,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> </methods> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 09ce79191d..7cc6fc55cd 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -58,7 +58,7 @@ <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_collision_normal" qualifiers="const"> @@ -99,7 +99,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> </methods> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 082075b161..7132f4f0b5 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -106,7 +106,7 @@ <return type="Rect2" /> <param index="0" name="amount" type="float" /> <description> - Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on all sides. + Returns a copy of the [Rect2] grown by the specified [param amount] on all sides. </description> </method> <method name="grow_individual" qualifiers="const"> @@ -124,7 +124,7 @@ <param index="0" name="side" type="int" /> <param index="1" name="amount" type="float" /> <description> - Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on the specified [enum Side]. + Returns a copy of the [Rect2] grown by the specified [param amount] on the specified [enum Side]. </description> </method> <method name="has_no_area" qualifiers="const"> @@ -146,7 +146,7 @@ <return type="Rect2" /> <param index="0" name="b" type="Rect2" /> <description> - Returns the intersection of this [Rect2] and [code]b[/code]. + Returns the intersection of this [Rect2] and [param b]. If the rectangles do not intersect, an empty [Rect2] is returned. </description> </method> @@ -156,21 +156,21 @@ <param index="1" name="include_borders" type="bool" default="false" /> <description> Returns [code]true[/code] if the [Rect2] overlaps with [code]b[/code] (i.e. they have at least one point in common). - If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. + If [param include_borders] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. </description> </method> <method name="is_equal_approx" qualifiers="const"> <return type="bool" /> <param index="0" name="rect" type="Rect2" /> <description> - Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. + Returns [code]true[/code] if this [Rect2] and [param rect] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="merge" qualifiers="const"> <return type="Rect2" /> <param index="0" name="b" type="Rect2" /> <description> - Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. + Returns a larger [Rect2] that contains this [Rect2] and [param b]. </description> </method> </methods> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index a71380c69a..d5d68bde31 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -104,7 +104,7 @@ <return type="Rect2i" /> <param index="0" name="amount" type="int" /> <description> - Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on all sides. + Returns a copy of the [Rect2i] grown by the specified [param amount] on all sides. </description> </method> <method name="grow_individual" qualifiers="const"> @@ -122,7 +122,7 @@ <param index="0" name="side" type="int" /> <param index="1" name="amount" type="int" /> <description> - Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on the specified [enum Side]. + Returns a copy of the [Rect2i] grown by the specified [param amount] on the specified [enum Side]. </description> </method> <method name="has_no_area" qualifiers="const"> @@ -159,7 +159,7 @@ <return type="Rect2i" /> <param index="0" name="b" type="Rect2i" /> <description> - Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code]. + Returns a larger [Rect2i] that contains this [Rect2i] and [param b]. </description> </method> </methods> 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 19a75c8515..62351ea9ec 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -103,7 +103,7 @@ <param index="3" name="z_near" type="float" /> <param index="4" name="z_far" type="float" /> <description> - Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. + Sets camera to use frustum projection. This mode allows adjusting the [param offset] argument to create "tilted frustum" effects. </description> </method> <method name="camera_set_orthogonal"> @@ -1172,7 +1172,7 @@ <param index="0" name="size" type="int" /> <param index="1" name="depth" type="int" /> <description> - Sets the resolution of the volumetric fog's froxel buffer. [code]size[/code] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [code]depth[/code] is directly used to set the depth of the buffer. + Sets the resolution of the volumetric fog's froxel buffer. [param size] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [param depth] is directly used to set the depth of the buffer. </description> </method> <method name="fog_volume_create"> @@ -1290,7 +1290,7 @@ <return type="void" /> <param index="0" name="half_resolution" type="bool" /> <description> - If [code]half_resolution[/code] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution]. + If [param half_resolution] is [code]true[/code], renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. See also [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution]. </description> </method> <method name="global_shader_uniform_add"> @@ -1355,7 +1355,7 @@ <return type="bool" /> <param index="0" name="feature" type="String" /> <description> - Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code]. + Returns [code]true[/code] if the OS supports a certain [param feature]. Features might be [code]s3tc[/code], [code]etc[/code], and [code]etc2[/code]. </description> </method> <method name="instance_attach_object_instance_id"> @@ -1474,9 +1474,9 @@ <param index="1" name="transparency" type="float" /> <description> Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency]. - A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [code]transparency[/code] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. + A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [param transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in. - [b]Note:[/b] [code]transparency[/code] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are. + [b]Note:[/b] [param transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are. </description> </method> <method name="instance_geometry_set_visibility_range"> @@ -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"> @@ -2693,7 +2693,7 @@ <param index="2" name="scale" type="bool" /> <param index="3" name="use_filter" type="bool" default="true" /> <description> - Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. + Sets a boot image. The color defines the background color. If [param scale] is [code]true[/code], the image will be scaled to fit the screen size. If [param use_filter] is [code]true[/code], the image will be scaled with linear interpolation. If [param use_filter] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. </description> </method> <method name="set_debug_generate_wireframes"> @@ -2731,7 +2731,7 @@ <param index="2" name="index" type="int" default="0" /> <description> Returns a default texture from a shader searched by name. - [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture. + [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture. </description> </method> <method name="shader_get_param_default" qualifiers="const"> @@ -2763,7 +2763,7 @@ <param index="3" name="index" type="int" default="0" /> <description> Sets a shader's default texture. Overwrites the texture given by name. - [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture. + [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture. </description> </method> <method name="shader_set_path_hint"> @@ -3039,7 +3039,7 @@ <param index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <param index="2" name="screen" type="int" default="0" /> <description> - Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. + Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code: FIXME: The method seems to be non-existent. [codeblocks] @@ -3110,7 +3110,7 @@ <param index="3" name="sublayer" type="int" /> <description> Sets the stacking order for a viewport's canvas. - [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer. + [param layer] is the actual canvas layer, while [param sublayer] specifies the stacking order of the canvas among those in the same layer. </description> </method> <method name="viewport_set_canvas_transform"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index b5a2179463..3adf10da2d 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -22,8 +22,8 @@ <param index="0" name="subresources" type="bool" default="false" /> <description> Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values. - By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. - [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. + By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [param subresources] argument which will copy the subresources. + [b]Note:[/b] If [param subresources] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource. </description> </method> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index cfa1b9f5d7..9b8c8d4d9d 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -28,7 +28,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="add_types" type="bool" /> <description> - If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. + If implemented, gets the dependencies of a given resource. If [param add_types] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> @@ -67,8 +67,8 @@ <param index="2" name="use_sub_threads" type="bool" /> <param index="3" name="cache_mode" type="int" /> <description> - Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. - The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [param original_path] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. + The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> <method name="_rename_dependencies" qualifiers="virtual const"> @@ -76,7 +76,7 @@ <param index="0" name="path" type="String" /> <param index="1" name="renames" type="Dictionary" /> <description> - If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. + If implemented, renames dependencies within the given resource and saves it. [param renames] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [constant OK] on success, or an [enum Error] constant in case of failure. </description> </method> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 93f3a732bc..a84c2165f5 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -30,7 +30,7 @@ <param index="1" name="resource" type="String" /> <param index="2" name="flags" type="int" /> <description> - Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. + Saves the given resource object to a file at the target [param path]. [param flags] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. Returns [constant OK] on success, or an [enum Error] constant in case of failure. </description> </method> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 1632be7e88..d51a5293ec 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -26,15 +26,15 @@ <param index="0" name="path" type="String" /> <param index="1" name="type_hint" type="String" default="""" /> <description> - Returns whether a recognized resource exists for the given [code]path[/code]. - An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. + Returns whether a recognized resource exists for the given [param path]. + An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. </description> </method> <method name="get_dependencies"> <return type="PackedStringArray" /> <param index="0" name="path" type="String" /> <description> - Returns the dependencies for the resource at the given [code]path[/code]. + Returns the dependencies for the resource at the given [param path]. </description> </method> <method name="get_recognized_extensions_for_type"> @@ -55,7 +55,7 @@ <return type="bool" /> <param index="0" name="path" type="String" /> <description> - Returns whether a cached resource is available for the given [code]path[/code]. + Returns whether a cached resource is available for the given [param path]. Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. </description> </method> @@ -65,10 +65,10 @@ <param index="1" name="type_hint" type="String" default="""" /> <param index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" /> <description> - Loads a resource at the given [code]path[/code], caching the result for further access. + Loads a resource at the given [param path], caching the result for further access. The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. - An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. - The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. + The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. Returns an empty resource if no [ResourceFormatLoader] could handle the file. GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. </description> @@ -86,8 +86,8 @@ <param index="0" name="path" type="String" /> <param index="1" name="progress" type="Array" default="[]" /> <description> - Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values. - An array variable can optionally be passed via [code]progress[/code], and will return a one-element array containing the percentage of completion of the threaded loading. + Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [param path]. See [enum ThreadLoadStatus] for possible return values. + An array variable can optionally be passed via [param progress], and will return a one-element array containing the percentage of completion of the threaded loading. </description> </method> <method name="load_threaded_request"> @@ -97,8 +97,8 @@ <param index="2" name="use_sub_threads" type="bool" default="false" /> <param index="3" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" /> <description> - Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). - The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + Loads the resource using threads. If [param use_sub_threads] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). + The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> <method name="remove_resource_format_loader"> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index e52434c2a4..17904697e6 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -15,14 +15,14 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="resource" type="Resource" /> <description> - Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2. + Adds a resource to the preloader with the given [param name]. If a resource with the given [param name] already exists, the new resource will be renamed to "[param name] N" where N is an incrementing number starting from 2. </description> </method> <method name="get_resource" qualifiers="const"> <return type="Resource" /> <param index="0" name="name" type="StringName" /> <description> - Returns the resource associated to [code]name[/code]. + Returns the resource associated to [param name]. </description> </method> <method name="get_resource_list" qualifiers="const"> @@ -35,14 +35,14 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code]. + Returns [code]true[/code] if the preloader contains a resource associated to [param name]. </description> </method> <method name="remove_resource"> <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes the resource associated to [code]name[/code] from the preloader. + Removes the resource associated to [param name] from the preloader. </description> </method> <method name="rename_resource"> @@ -50,7 +50,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="newname" type="StringName" /> <description> - Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. + Renames a resource inside the preloader from [param name] to [param newname]. </description> </method> </methods> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 4c1fad22de..b0c9056cbc 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -39,8 +39,8 @@ <param index="1" name="path" type="String" default="""" /> <param index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" /> <description> - Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [code]path[/code] is empty, [ResourceSaver] will try to use [member Resource.resource_path]. - The [code]flags[/code] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags. + Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [param path] is empty, [ResourceSaver] will try to use [member Resource.resource_path]. + The [param flags] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags. Returns [constant OK] on success. </description> </method> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 304950d97c..c01546524d 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -27,7 +27,7 @@ <return type="bool" /> <param index="0" name="char_fx" type="CharFXTransform" /> <description> - Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text. + Override this method to modify properties in [param char_fx]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text. </description> </method> </methods> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index ef01eba49d..62142fce8b 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -24,8 +24,8 @@ <param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <param index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <description> - Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image. - If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. + Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image and a [param color] to tint the image. + If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. </description> </method> <method name="add_text"> @@ -39,7 +39,7 @@ <return type="void" /> <param index="0" name="bbcode" type="String" /> <description> - Parses [code]bbcode[/code] and adds tags to the tag stack as needed. + Parses [param bbcode] and adds tags to the tag stack as needed. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text]. </description> </method> @@ -176,7 +176,7 @@ <return type="void" /> <param index="0" name="effect" type="Variant" /> <description> - Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect]. + Installs a custom effect. [param effect] should be a valid [RichTextEffect]. </description> </method> <method name="is_menu_visible" qualifiers="const"> @@ -208,7 +208,7 @@ <return type="Dictionary" /> <param index="0" name="expressions" type="PackedStringArray" /> <description> - Parses BBCode parameter [code]expressions[/code] into a dictionary. + Parses BBCode parameter [param expressions] into a dictionary. </description> </method> <method name="pop"> @@ -294,7 +294,7 @@ <return type="void" /> <param index="0" name="level" type="int" /> <description> - Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length. + Adds an [code][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length. </description> </method> <method name="push_italics"> @@ -309,7 +309,7 @@ <param index="1" name="type" type="int" enum="RichTextLabel.ListType" /> <param index="2" name="capitalize" type="bool" /> <description> - Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length. + Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length. </description> </method> <method name="push_meta"> @@ -380,21 +380,21 @@ <param index="0" name="line" type="int" /> <description> Removes a line of content from the label. Returns [code]true[/code] if the line exists. - The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. + The [param line] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. </description> </method> <method name="scroll_to_line"> <return type="void" /> <param index="0" name="line" type="int" /> <description> - Scrolls the window's top line to match [code]line[/code]. + Scrolls the window's top line to match [param line]. </description> </method> <method name="scroll_to_paragraph"> <return type="void" /> <param index="0" name="paragraph" type="int" /> <description> - Scrolls the window's top line to match first line of the [code]paragraph[/code]. + Scrolls the window's top line to match first line of the [param paragraph]. </description> </method> <method name="select_all"> @@ -440,9 +440,9 @@ <param index="1" name="expand" type="bool" /> <param index="2" name="ratio" type="int" /> <description> - Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios. + Edits the selected column's expansion options. If [param expand] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. - If [code]expand[/code] is [code]false[/code], the column will not contribute to the total ratio. + If [param expand] is [code]false[/code], the column will not contribute to the total ratio. </description> </method> </methods> diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml index c50da89a26..445e6d94ea 100644 --- a/doc/classes/RigidDynamicBody2D.xml +++ b/doc/classes/RigidDynamicBody2D.xml @@ -36,7 +36,7 @@ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="add_constant_torque"> @@ -69,7 +69,7 @@ <param index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_impulse"> @@ -79,7 +79,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_torque"> @@ -200,14 +200,14 @@ <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. - [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="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. - [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"> @@ -217,10 +217,10 @@ <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. - [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. - [code]body_shape_index[/code] 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]. - [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D 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 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]. + [param local_shape_index] the index of the [Shape2D] of this RigidDynamicBody2D 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"> @@ -230,10 +230,10 @@ <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. - [code]body_rid[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. - [code]body_shape_index[/code] 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]. - [code]local_shape_index[/code] the index of the [Shape2D] of this RigidDynamicBody2D 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 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]. + [param local_shape_index] the index of the [Shape2D] of this RigidDynamicBody2D 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="sleeping_state_changed"> diff --git a/doc/classes/RigidDynamicBody3D.xml b/doc/classes/RigidDynamicBody3D.xml index 5c89dbbf44..83f24be418 100644 --- a/doc/classes/RigidDynamicBody3D.xml +++ b/doc/classes/RigidDynamicBody3D.xml @@ -36,7 +36,7 @@ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code]. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="add_constant_torque"> @@ -69,7 +69,7 @@ <param index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_impulse"> @@ -79,7 +79,7 @@ <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). - [code]position[/code] is the offset from the body origin in global coordinates. + [param position] is the offset from the body origin in global coordinates. </description> </method> <method name="apply_torque"> @@ -206,14 +206,14 @@ <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. - [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="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. - [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"> @@ -223,10 +223,10 @@ <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. - [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. - [code]body_shape_index[/code] 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]. - [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D 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 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]. + [param local_shape_index] the index of the [Shape3D] of this RigidDynamicBody3D 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"> @@ -236,10 +236,10 @@ <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. - [code]body_rid[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. - [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. - [code]body_shape_index[/code] 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]. - [code]local_shape_index[/code] the index of the [Shape3D] of this RigidDynamicBody3D 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 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]. + [param local_shape_index] the index of the [Shape3D] of this RigidDynamicBody3D 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="sleeping_state_changed"> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index f171d29b84..acb29838ba 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -14,7 +14,7 @@ <return type="Array" /> <param index="0" name="idx" type="int" /> <description> - Returns the list of bound parameters for the signal at [code]idx[/code]. + Returns the list of bound parameters for the signal at [param idx]. </description> </method> <method name="get_connection_count" qualifiers="const"> @@ -28,42 +28,42 @@ <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the connection flags for the signal at [code]idx[/code]. See [enum Object.ConnectFlags] constants. + Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants. </description> </method> <method name="get_connection_method" qualifiers="const"> <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Returns the method connected to the signal at [code]idx[/code]. + Returns the method connected to the signal at [param idx]. </description> </method> <method name="get_connection_signal" qualifiers="const"> <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Returns the name of the signal at [code]idx[/code]. + Returns the name of the signal at [param idx]. </description> </method> <method name="get_connection_source" qualifiers="const"> <return type="NodePath" /> <param index="0" name="idx" type="int" /> <description> - Returns the path to the node that owns the signal at [code]idx[/code], relative to the root node. + Returns the path to the node that owns the signal at [param idx], relative to the root node. </description> </method> <method name="get_connection_target" qualifiers="const"> <return type="NodePath" /> <param index="0" name="idx" type="int" /> <description> - Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node. + Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node. </description> </method> <method name="get_connection_unbinds" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the number of unbound parameters for the signal at [code]idx[/code]. + Returns the number of unbound parameters for the signal at [param idx]. </description> </method> <method name="get_node_count" qualifiers="const"> @@ -77,42 +77,42 @@ <return type="PackedStringArray" /> <param index="0" name="idx" type="int" /> <description> - Returns the list of group names associated with the node at [code]idx[/code]. + Returns the list of group names associated with the node at [param idx]. </description> </method> <method name="get_node_index" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods. + Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [param idx] argument used here and in other methods. </description> </method> <method name="get_node_instance" qualifiers="const"> <return type="PackedScene" /> <param index="0" name="idx" type="int" /> <description> - Returns a [PackedScene] for the node at [code]idx[/code] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance. + Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance. </description> </method> <method name="get_node_instance_placeholder" qualifiers="const"> <return type="String" /> <param index="0" name="idx" type="int" /> <description> - Returns the path to the represented scene file if the node at [code]idx[/code] is an [InstancePlaceholder]. + Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder]. </description> </method> <method name="get_node_name" qualifiers="const"> <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Returns the name of the node at [code]idx[/code]. + Returns the name of the node at [param idx]. </description> </method> <method name="get_node_owner_path" qualifiers="const"> <return type="NodePath" /> <param index="0" name="idx" type="int" /> <description> - Returns the path to the owner of the node at [code]idx[/code], relative to the root node. + Returns the path to the owner of the node at [param idx], relative to the root node. </description> </method> <method name="get_node_path" qualifiers="const"> @@ -120,15 +120,15 @@ <param index="0" name="idx" type="int" /> <param index="1" name="for_parent" type="bool" default="false" /> <description> - Returns the path to the node at [code]idx[/code]. - If [code]for_parent[/code] is [code]true[/code], returns the path of the [code]idx[/code] node's parent instead. + Returns the path to the node at [param idx]. + If [param for_parent] is [code]true[/code], returns the path of the [param idx] node's parent instead. </description> </method> <method name="get_node_property_count" qualifiers="const"> <return type="int" /> <param index="0" name="idx" type="int" /> <description> - Returns the number of exported or overridden properties for the node at [code]idx[/code]. + Returns the number of exported or overridden properties for the node at [param idx]. The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code]. </description> </method> @@ -137,7 +137,7 @@ <param index="0" name="idx" type="int" /> <param index="1" name="prop_idx" type="int" /> <description> - Returns the name of the property at [code]prop_idx[/code] for the node at [code]idx[/code]. + Returns the name of the property at [param prop_idx] for the node at [param idx]. </description> </method> <method name="get_node_property_value" qualifiers="const"> @@ -145,21 +145,21 @@ <param index="0" name="idx" type="int" /> <param index="1" name="prop_idx" type="int" /> <description> - Returns the value of the property at [code]prop_idx[/code] for the node at [code]idx[/code]. + Returns the value of the property at [param prop_idx] for the node at [param idx]. </description> </method> <method name="get_node_type" qualifiers="const"> <return type="StringName" /> <param index="0" name="idx" type="int" /> <description> - Returns the type of the node at [code]idx[/code]. + Returns the type of the node at [param idx]. </description> </method> <method name="is_node_instance_placeholder" qualifiers="const"> <return type="bool" /> <param index="0" name="idx" type="int" /> <description> - Returns [code]true[/code] if the node at [code]idx[/code] is an [InstancePlaceholder]. + Returns [code]true[/code] if the node at [param idx] is an [InstancePlaceholder]. </description> </method> </methods> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index dfa5704548..0b358bd06f 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -18,7 +18,7 @@ <param index="0" name="group" type="StringName" /> <param index="1" name="method" type="StringName" /> <description> - Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. + Calls [param method] on each member of the given group. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. [b]Note:[/b] [method call_group] will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after [method call_group] was called, use [method call_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> @@ -28,20 +28,20 @@ <param index="1" name="group" type="StringName" /> <param index="2" name="method" type="StringName" /> <description> - Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. + Calls [param method] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [param method] by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. [codeblock] # Call the method in a deferred manner and in reverse order. get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE) [/codeblock] - [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred]. + [b]Note:[/b] Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to [method call_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param flags] argument, methods will be called with a one-frame delay in a way similar to [method Object.set_deferred]. </description> </method> <method name="change_scene"> <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Changes the running scene to the one at the given [code]path[/code], after loading it into a [PackedScene] and creating a new instance. - Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [code]path[/code] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. + Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance. + Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene] call. </description> </method> @@ -59,7 +59,7 @@ <param index="0" name="time_sec" type="float" /> <param index="1" name="process_always" type="bool" default="true" /> <description> - Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer. + Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [param process_always] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer. Commonly used to create a one-shot delay timer as in the following example: [codeblocks] [gdscript] @@ -103,7 +103,7 @@ <return type="MultiplayerAPI" /> <param index="0" name="for_path" type="NodePath" default="NodePath("")" /> <description> - Return the [MultiplayerAPI] configured for the given path, or the default one if [code]for_path[/code] is empty. + Return the [MultiplayerAPI] configured for the given path, or the default one if [param for_path] is empty. </description> </method> <method name="get_node_count" qualifiers="const"> @@ -137,7 +137,7 @@ <param index="0" name="group" type="StringName" /> <param index="1" name="notification" type="int" /> <description> - Sends the given notification to all members of the [code]group[/code]. + Sends the given notification to all members of the [param group]. [b]Note:[/b] [method notify_group] will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use [method notify_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> @@ -147,8 +147,8 @@ <param index="1" name="group" type="StringName" /> <param index="2" name="notification" type="int" /> <description> - Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags]. - [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code]. + Sends the given notification to all members of the [param group], respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to [method notify_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, notifications will be sent with a one-frame delay in a way similar to using [code]Object.call_deferred("notification", ...)[/code]. </description> </method> <method name="queue_delete"> @@ -162,7 +162,7 @@ <return type="void" /> <param index="0" name="exit_code" type="int" default="0" /> <description> - Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code. + Quits the application at the end of the current iteration. Argument [param exit_code] can optionally be given (defaulting to 0) to customize the exit status code. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button. @@ -181,7 +181,7 @@ <param index="1" name="property" type="String" /> <param index="2" name="value" type="Variant" /> <description> - Sets the given [code]property[/code] to [code]value[/code] on all members of the given group. + Sets the given [param property] to [param value] on all members of the given group. [b]Note:[/b] [method set_group] will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use [method set_group_flags] with the [constant GROUP_CALL_DEFERRED] flag. </description> </method> @@ -192,8 +192,8 @@ <param index="2" name="property" type="String" /> <param index="3" name="value" type="Variant" /> <description> - Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags]. - [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [code]flags[/code] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred]. + Sets the given [param property] to [param value] on all members of the given group, respecting the given [enum GroupCallFlags]. + [b]Note:[/b] Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to [method set_group]. However, if the [constant GROUP_CALL_DEFERRED] flag is present in the [param call_flags] argument, properties will be set with a one-frame delay in a way similar to [method Object.call_deferred]. </description> </method> <method name="set_multiplayer"> @@ -201,7 +201,7 @@ <param index="0" name="multiplayer" type="MultiplayerAPI" /> <param index="1" name="root_path" type="NodePath" default="NodePath("")" /> <description> - Sets a custom [MultiplayerAPI] with the given [code]root_path[/code] (controlling also the relative subpaths), or override the default one if [code]root_path[/code] is empty. + Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty. </description> </method> </methods> @@ -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 f567a0c23c..8202f9f536 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -78,7 +78,7 @@ <return type="bool" /> <param index="0" name="base_object" type="Object" /> <description> - Returns [code]true[/code] if [code]base_object[/code] is an instance of this script. + Returns [code]true[/code] if [param base_object] is an instance of this script. </description> </method> <method name="is_tool" qualifiers="const"> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 33ff054cce..9118f38a3e 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -45,7 +45,7 @@ <param index="0" name="base_name" type="String" /> <param index="1" name="base_path" type="String" /> <description> - Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language. + Opens the script create dialog. The script will extend [param base_name]. The file extension can be omitted from [param base_path]. It will be added based on the selected scripting language. </description> </method> <method name="register_syntax_highlighter"> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 207a745696..de586fc3d0 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -16,7 +16,7 @@ <return type="void" /> <param index="0" name="control" type="Control" /> <description> - Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. + Ensures the given [param control] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. [b]Note:[/b] This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.process_frame]: [codeblock] add_child(child_node) diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 6390d36bf1..b7e6d80ccb 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -16,8 +16,8 @@ <param index="1" name="index" type="int" default="0" /> <description> Returns the texture that is set as default for the specified parameter. - [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. - [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture. + [b]Note:[/b] [param param] must match the name of the uniform in the code exactly. + [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture. </description> </method> <method name="get_mode" qualifiers="const"> @@ -31,7 +31,7 @@ <param index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the shader has this param defined as a uniform in its code. - [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. + [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. </description> </method> <method name="set_default_texture_param"> @@ -41,8 +41,8 @@ <param index="2" name="index" type="int" default="0" /> <description> Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. - [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. - [b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture. + [b]Note:[/b] [param param] must match the name of the uniform in the code exactly. + [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture. </description> </method> </methods> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 3e2247c022..92df3255b1 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -21,14 +21,14 @@ <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. + 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 [code]name[/code]. + Returns the default value of the material property with given [param name]. </description> </method> <method name="set_shader_uniform"> @@ -37,7 +37,7 @@ <param index="1" name="value" type="Variant" /> <description> Changes the value set for this material of a uniform in the shader. - [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. + [b]Note:[/b] [param param] must match the name of the uniform in the code exactly. </description> </method> </methods> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 8f5ca034e4..4d7031ab86 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -17,7 +17,7 @@ <param index="2" name="shape_xform" type="Transform2D" /> <description> Returns [code]true[/code] if this shape is colliding with another. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). + This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]). </description> </method> <method name="collide_and_get_contacts"> @@ -27,9 +27,9 @@ <param index="2" name="shape_xform" type="Transform2D" /> <description> Returns a list of contact point pairs where this shape touches another. - If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape]. A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). + This method needs the transformation matrix for this shape ([param local_xform]), the shape to check collisions with ([param with_shape]), and the transformation matrix of that shape ([param shape_xform]). </description> </method> <method name="collide_with_motion"> @@ -41,7 +41,7 @@ <param index="4" name="shape_motion" type="Vector2" /> <description> Returns whether this shape would collide with another, if a given movement was applied. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). + This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]). </description> </method> <method name="collide_with_motion_and_get_contacts"> @@ -53,9 +53,9 @@ <param index="4" name="shape_motion" type="Vector2" /> <description> Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. - If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [code]with_shape[/code]. + If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of [param with_shape]. A collision pair A, B can be used to calculate the collision normal with [code](B - A).normalized()[/code], and the collision depth with [code](B - A).length()[/code]. This information is typically used to separate shapes, particularly in collision solvers. - This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). + This method needs the transformation matrix for this shape ([param local_xform]), the movement to test on this shape ([param local_motion]), the shape to check collisions with ([param with_shape]), the transformation matrix of that shape ([param shape_xform]), and the movement to test onto the other object ([param shape_motion]). </description> </method> <method name="draw"> @@ -63,7 +63,7 @@ <param index="0" name="canvas_item" type="RID" /> <param index="1" name="color" type="Color" /> <description> - Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured. + Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [param color]. The exact drawing method is specific for each shape and cannot be configured. </description> </method> </methods> diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml index 652cacfb53..36c3beecb1 100644 --- a/doc/classes/ShapeCast2D.xml +++ b/doc/classes/ShapeCast2D.xml @@ -55,14 +55,14 @@ <return type="Object" /> <param index="0" name="index" type="int" /> <description> - Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <param index="0" name="index" type="int" /> <description> - Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collision_count" qualifiers="const"> @@ -75,21 +75,21 @@ <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_collision_normal" qualifiers="const"> <return type="Vector2" /> <param index="0" name="index" type="int" /> <description> - Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object. + Returns the normal of one of the multiple collisions at [param index] of the intersecting object. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector2" /> <param index="0" name="index" type="int" /> <description> - Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object. + Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object. [b]Note:[/b] this point is in the [b]global[/b] coordinate system. </description> </method> @@ -118,7 +118,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> </methods> diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml index 9a5606e198..cbdf660133 100644 --- a/doc/classes/ShapeCast3D.xml +++ b/doc/classes/ShapeCast3D.xml @@ -55,14 +55,14 @@ <return type="Object" /> <param index="0" name="index" type="int" /> <description> - Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <param index="0" name="index" type="int" /> <description> - Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the shape ID of the colliding shape of one of the multiple collisions at [param index], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collision_count" qualifiers="const"> @@ -75,21 +75,21 @@ <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_collision_normal" qualifiers="const"> <return type="Vector3" /> <param index="0" name="index" type="int" /> <description> - Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object. + Returns the normal of one of the multiple collisions at [param index] of the intersecting object. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector3" /> <param index="0" name="index" type="int" /> <description> - Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object. + Returns the collision point of one of the multiple collisions at [param index] where the shape intersects the colliding object. [b]Note:[/b] this point is in the [b]global[/b] coordinate system. </description> </method> @@ -125,7 +125,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> </methods> diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml index 329471fdb8..f30a5a5e7c 100644 --- a/doc/classes/Shortcut.xml +++ b/doc/classes/Shortcut.xml @@ -26,7 +26,7 @@ <return type="bool" /> <param index="0" name="event" type="InputEvent" /> <description> - Returns whether any [InputEvent] in [member events] equals [code]event[/code]. + Returns whether any [InputEvent] in [member events] equals [param event]. </description> </method> </methods> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index dc543085cf..d99477ee95 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -28,7 +28,7 @@ <param index="0" name="object" type="Object" /> <param index="1" name="signal" type="StringName" /> <description> - Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code]. + Creates a new [Signal] with the name [param signal] in the specified [param object]. </description> </constructor> </constructors> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 0abb8be075..808f93b491 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -23,7 +23,7 @@ <return type="Bone2D" /> <param index="0" name="idx" type="int" /> <description> - Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [code]idx[/code]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. + Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [param idx]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. </description> </method> <method name="get_bone_count" qualifiers="const"> @@ -36,7 +36,7 @@ <return type="Transform2D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the local pose override transform for [code]bone_idx[/code]. + Returns the local pose override transform for [param bone_idx]. </description> </method> <method name="get_modification_stack" qualifiers="const"> @@ -58,9 +58,9 @@ <param index="2" name="strength" type="float" /> <param index="3" name="persistent" type="bool" /> <description> - Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. - [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [code]bone_idx[/code]! + Sets the local pose transform, [param override_pose], for the bone at [param bone_idx]. + [param strength] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. + [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [param bone_idx]! </description> </method> <method name="set_modification_stack"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index c02a482a91..e332618e9f 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -17,7 +17,7 @@ <return type="void" /> <param index="0" name="name" type="String" /> <description> - Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. + Adds a bone, with name [param name]. [method get_bone_count] will become the bone index. </description> </method> <method name="add_bone_child"> @@ -64,7 +64,7 @@ <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the bone index that matches [code]name[/code] as its name. + Returns the bone index that matches [param name] as its name. </description> </method> <method name="force_update_all_bone_transforms"> @@ -77,20 +77,20 @@ <return type="void" /> <param index="0" name="bone_idx" type="int" /> <description> - Force updates the bone transform for the bone at [code]bone_idx[/code] and all of its children. + Force updates the bone transform for the bone at [param bone_idx] and all of its children. </description> </method> <method name="get_bone_children"> <return type="PackedInt32Array" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns an array containing the bone indexes of all the children node of the passed in bone, [code]bone_idx[/code]. + Returns an array containing the bone indexes of all the children node of the passed in bone, [param bone_idx]. </description> </method> <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"> @@ -111,36 +111,36 @@ <return type="Transform3D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the global pose override transform for [code]bone_idx[/code]. + Returns the global pose override transform for [param bone_idx]. </description> </method> <method name="get_bone_global_rest" qualifiers="const"> <return type="Transform3D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the global rest transform for [code]bone_idx[/code]. + Returns the global rest transform for [param bone_idx]. </description> </method> <method name="get_bone_local_pose_override" qualifiers="const"> <return type="Transform3D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the local pose override transform for [code]bone_idx[/code]. + Returns the local pose override transform for [param bone_idx]. </description> </method> <method name="get_bone_name" qualifiers="const"> <return type="String" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the name of the bone at index [code]index[/code]. + Returns the name of the bone at index [param bone_idx]. </description> </method> <method name="get_bone_parent" qualifiers="const"> <return type="int" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. - [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. + Returns the bone index which is the parent of the bone at [param bone_idx]. If -1, then bone has no parent. + [b]Note:[/b] The parent bone returned will always be less than [param bone_idx]. </description> </method> <method name="get_bone_pose" qualifiers="const"> @@ -172,7 +172,7 @@ <return type="Transform3D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the rest transform for a bone [code]bone_idx[/code]. + Returns the rest transform for a bone [param bone_idx]. </description> </method> <method name="get_modification_stack"> @@ -209,7 +209,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="basis" type="Basis" /> <description> - Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [code]bone_idx[/code]. + Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [param bone_idx]. This is helper function to make using [method Transform3D.looking_at] easier with bone poses. </description> </method> @@ -217,7 +217,7 @@ <return type="bool" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns whether the bone pose for the bone at [code]bone_idx[/code] is enabled. + Returns whether the bone pose for the bone at [param bone_idx] is enabled. </description> </method> <method name="local_pose_to_global_pose"> @@ -225,7 +225,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="local_pose" type="Transform3D" /> <description> - Converts the passed-in local pose to a global pose relative to the inputted bone, [code]bone_idx[/code]. + Converts the passed-in local pose to a global pose relative to the inputted bone, [param bone_idx]. This could be used to convert [method get_bone_pose] for use with the [method set_bone_global_pose_override] function. </description> </method> @@ -277,7 +277,7 @@ <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, [code]child_bone_idx[/code], from the passed-in bone, [code]bone_idx[/code], if it exists. + 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. </description> </method> @@ -286,7 +286,7 @@ <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, [code]bone_idx[/code], to the passed-in array of bone indexes, [code]bone_children[/code]. + Sets the children for the passed in bone, [param bone_idx], to the passed-in array of bone indexes, [param bone_children]. </description> </method> <method name="set_bone_enabled"> @@ -294,7 +294,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="enabled" type="bool" default="true" /> <description> - Disables the pose for the bone at [code]bone_idx[/code] if [code]false[/code], enables the bone pose if [code]true[/code]. + Disables the pose for the bone at [param bone_idx] if [code]false[/code], enables the bone pose if [code]true[/code]. </description> </method> <method name="set_bone_global_pose_override"> @@ -304,8 +304,8 @@ <param index="2" name="amount" type="float" /> <param index="3" name="persistent" type="bool" default="false" /> <description> - Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + Sets the global pose transform, [param pose], for the bone at [param bone_idx]. + [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose. </description> </method> @@ -316,8 +316,8 @@ <param index="2" name="amount" type="float" /> <param index="3" name="persistent" type="bool" default="false" /> <description> - Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + Sets the local pose transform, [param pose], for the bone at [param bone_idx]. + [param amount] is the interpolation strength that will be used when applying the pose, and [param persistent] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose. </description> </method> @@ -333,8 +333,8 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="parent_idx" type="int" /> <description> - Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. - [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. + Sets the bone index [param parent_idx] as the parent of the bone at [param bone_idx]. If -1, then bone has no parent. + [b]Note:[/b] [param parent_idx] must be less than [param bone_idx]. </description> </method> <method name="set_bone_pose_position"> @@ -363,21 +363,21 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="rest" type="Transform3D" /> <description> - Sets the rest transform for bone [code]bone_idx[/code]. + Sets the rest transform for bone [param bone_idx]. </description> </method> <method name="set_modification_stack"> <return type="void" /> <param index="0" name="modification_stack" type="SkeletonModificationStack3D" /> <description> - Sets the modification stack for this skeleton to the passed-in modification stack, [code]modification_stack[/code]. + Sets the modification stack for this skeleton to the passed-in modification stack, [param modification_stack]. </description> </method> <method name="unparent_bone_and_rest"> <return type="void" /> <param index="0" name="bone_idx" type="int" /> <description> - Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset. + Unparents the bone at [param bone_idx] and sets its rest position to that of its parent prior to being reset. </description> </method> <method name="world_transform_to_global_pose"> diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml index c9171ead51..46d32aef41 100644 --- a/doc/classes/SkeletonModification2D.xml +++ b/doc/classes/SkeletonModification2D.xml @@ -38,7 +38,7 @@ <param index="2" name="max" type="float" /> <param index="3" name="invert" type="bool" /> <description> - Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds. + Takes a angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds. </description> </method> <method name="get_editor_draw_gizmo" qualifiers="const"> diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml index 048d5cb397..c8fee3f94d 100644 --- a/doc/classes/SkeletonModification2DCCDIK.xml +++ b/doc/classes/SkeletonModification2DCCDIK.xml @@ -16,49 +16,49 @@ <return type="NodePath" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + Returns the [Bone2D] node assigned to the CCDIK joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_bone_index" qualifiers="const"> <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + Returns the index of the [Bone2D] node assigned to the CCDIK joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details. + Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details. </description> </method> <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. + Returns the maximum angle constraint for the joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. + Returns the minimum angle constraint for the joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_enable_constraint" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. + Returns whether angle constraints on the CCDIK joint at [param joint_idx] are enabled. </description> </method> <method name="get_ccdik_joint_rotate_from_joint" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip. + Returns whether the joint at [param joint_idx] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip. </description> </method> <method name="set_ccdik_joint_bone2d_node"> @@ -66,7 +66,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone2d_nodepath" type="NodePath" /> <description> - Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. + Sets the [Bone2D] node assigned to the CCDIK joint at [param joint_idx]. </description> </method> <method name="set_ccdik_joint_bone_index"> @@ -74,7 +74,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton. + Sets the bone index, [param bone_idx], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_ccdik_joint_constraint_angle_invert"> @@ -82,7 +82,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="invert" type="bool" /> <description> - Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. + Sets whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. </description> </method> @@ -91,7 +91,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="angle_max" type="float" /> <description> - Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. + Sets the maximum angle constraint for the joint at [param joint_idx]. </description> </method> <method name="set_ccdik_joint_constraint_angle_min"> @@ -99,7 +99,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="angle_min" type="float" /> <description> - Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. + Sets the minimum angle constraint for the joint at [param joint_idx]. </description> </method> <method name="set_ccdik_joint_enable_constraint"> @@ -107,7 +107,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="enable_constraint" type="bool" /> <description> - Determines whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving. + Determines whether angle constraints on the CCDIK joint at [param joint_idx] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving. </description> </method> <method name="set_ccdik_joint_rotate_from_joint"> @@ -115,13 +115,13 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="rotate_from_joint" type="bool" /> <description> - Sets whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. + Sets whether the joint at [param joint_idx] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. </description> </method> </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 3108a55deb..ff3a65fe1a 100644 --- a/doc/classes/SkeletonModification2DFABRIK.xml +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -17,21 +17,21 @@ <return type="NodePath" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns the [Bone2D] node assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_bone_index" qualifiers="const"> <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns the index of the [Bone2D] node assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_magnet_position" qualifiers="const"> <return type="Vector2" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the magnet position vector for the joint at [code]joint_idx[/code]. + Returns the magnet position vector for the joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_use_target_rotation" qualifiers="const"> @@ -46,7 +46,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone2d_nodepath" type="NodePath" /> <description> - Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. + Sets the [Bone2D] node assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="set_fabrik_joint_bone_index"> @@ -54,7 +54,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton. + Sets the bone index, [param bone_idx], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_fabrik_joint_magnet_position"> @@ -62,7 +62,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="magnet_position" type="Vector2" /> <description> - Sets the magnet position vector for the joint at [code]joint_idx[/code]. + Sets the magnet position vector for the joint at [param joint_idx]. </description> </method> <method name="set_fabrik_joint_use_target_rotation"> @@ -70,14 +70,14 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="use_target_rotation" type="bool" /> <description> - Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node. + Sets whether the joint at [param joint_idx] will use the target node's rotation rather than letting FABRIK rotate the node. [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored. </description> </method> </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/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml index 0fadf6e6c2..7329b2d865 100644 --- a/doc/classes/SkeletonModification2DJiggle.xml +++ b/doc/classes/SkeletonModification2DJiggle.xml @@ -21,56 +21,56 @@ <return type="NodePath" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + Returns the [Bone2D] node assigned to the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_bone_index" qualifiers="const"> <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + Returns the index of the [Bone2D] node assigned to the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_damping" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code]. + Returns the amount of damping of the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_gravity" qualifiers="const"> <return type="Vector2" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by. + Returns a [Vector2] representing the amount of gravity the Jiggle joint at [param joint_idx] is influenced by. </description> </method> <method name="get_jiggle_joint_mass" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the amount of mass of the jiggle joint at [code]joint_idx[/code]. + Returns the amount of mass of the jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_override" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification. + Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default Jiggle joint data defined in the modification. </description> </method> <method name="get_jiggle_joint_stiffness" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the stiffness of the Jiggle joint at [code]joint_idx[/code]. + Returns the stiffness of the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_use_gravity" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not. + Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not. </description> </method> <method name="get_use_colliders" qualifiers="const"> @@ -91,7 +91,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone2d_node" type="NodePath" /> <description> - Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. + Sets the [Bone2D] node assigned to the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_bone_index"> @@ -99,7 +99,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton. + Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton. </description> </method> <method name="set_jiggle_joint_damping"> @@ -107,7 +107,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="damping" type="float" /> <description> - Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + Sets the amount of dampening of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_gravity"> @@ -115,7 +115,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="gravity" type="Vector2" /> <description> - Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code]. + Sets the gravity vector of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_mass"> @@ -123,7 +123,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="mass" type="float" /> <description> - Sets the of mass of the Jiggle joint at [code]joint_idx[/code]. + Sets the of mass of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_override"> @@ -131,7 +131,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="override" type="bool" /> <description> - Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification. + Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification. </description> </method> <method name="set_jiggle_joint_stiffness"> @@ -139,7 +139,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="stiffness" type="float" /> <description> - Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code]. + Sets the of stiffness of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_use_gravity"> @@ -147,7 +147,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="use_gravity" type="bool" /> <description> - Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity. + Sets whether the Jiggle joint at [param joint_idx] should use gravity. </description> </method> <method name="set_use_colliders"> diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index 9ddb34a5d0..d5f46b2ea0 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -19,7 +19,7 @@ <return type="NodePath" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the [PhysicalBone2D] node at [code]joint_idx[/code]. + Returns the [PhysicalBone2D] node at [param joint_idx]. </description> </method> <method name="set_physical_bone_node"> @@ -27,7 +27,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="physicalbone2d_node" type="NodePath" /> <description> - Sets the [PhysicalBone2D] node at [code]joint_idx[/code]. + Sets the [PhysicalBone2D] node at [param joint_idx]. [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D]. </description> </method> @@ -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/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml index 9a6e72baaf..8457179651 100644 --- a/doc/classes/SkeletonModification3D.xml +++ b/doc/classes/SkeletonModification3D.xml @@ -32,7 +32,7 @@ <param index="2" name="max" type="float" /> <param index="3" name="invert" type="bool" /> <description> - Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds. + Takes a angle and clamps it so it is within the passed-in [param min] and [param max] range. [param invert] will inversely clamp the angle, clamping it to the range outside of the given bounds. </description> </method> <method name="get_is_setup" qualifiers="const"> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml index fbefca32ad..dec0fbe99f 100644 --- a/doc/classes/SkeletonModification3DCCDIK.xml +++ b/doc/classes/SkeletonModification3DCCDIK.xml @@ -16,49 +16,49 @@ <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the bone index of the bone assigned to the CCDIK joint at [code]joint_idx[/code]. + Returns the bone index of the bone assigned to the CCDIK joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_bone_name" qualifiers="const"> <return type="String" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the name of the bone that is assigned to the CCDIK joint at [code]joint_idx[/code]. + Returns the name of the bone that is assigned to the CCDIK joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_ccdik_axis" qualifiers="const"> <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the integer representing the joint axis of the CCDIK joint at [code]joint_idx[/code]. + Returns the integer representing the joint axis of the CCDIK joint at [param joint_idx]. </description> </method> <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees! + Returns the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees! </description> </method> <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees! + Returns the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle is in degrees! </description> </method> <method name="get_ccdik_joint_constraint_invert" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details. + Returns whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details. </description> </method> <method name="get_ccdik_joint_enable_joint_constraint" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Enables angle constraints to the CCDIK joint at [code]joint_idx[/code]. + Enables angle constraints to the CCDIK joint at [param joint_idx]. </description> </method> <method name="set_ccdik_joint_bone_index"> @@ -66,7 +66,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_index" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton. + Sets the bone index, [param bone_index], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_ccdik_joint_bone_name"> @@ -74,7 +74,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_name" type="String" /> <description> - Sets the bone name, [code]bone_name[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton. + Sets the bone name, [param bone_name], of the CCDIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_ccdik_joint_ccdik_axis"> @@ -82,7 +82,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="axis" type="int" /> <description> - Sets the joint axis of the CCDIK joint at [code]joint_idx[/code] to the passed-in joint axis, [code]axis[/code]. + Sets the joint axis of the CCDIK joint at [param joint_idx] to the passed-in joint axis, [param axis]. </description> </method> <method name="set_ccdik_joint_constraint_angle_max"> @@ -90,7 +90,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="max_angle" type="float" /> <description> - Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians! + Sets the maximum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians! </description> </method> <method name="set_ccdik_joint_constraint_angle_min"> @@ -98,7 +98,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="min_angle" type="float" /> <description> - Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians! + Sets the minimum angle constraint for the joint at [param joint_idx]. [b]Note:[/b] This angle must be in radians! </description> </method> <method name="set_ccdik_joint_constraint_invert"> @@ -106,7 +106,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="invert" type="bool" /> <description> - Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. + Sets whether the CCDIK joint at [param joint_idx] uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. </description> </method> @@ -115,13 +115,13 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="enable" type="bool" /> <description> - Sets whether joint constraints are enabled for the CCDIK joint at [code]joint_idx[/code]. + Sets whether joint constraints are enabled for the CCDIK joint at [param joint_idx]. </description> </method> </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/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml index 5908f94650..325cc2a12e 100644 --- a/doc/classes/SkeletonModification3DFABRIK.xml +++ b/doc/classes/SkeletonModification3DFABRIK.xml @@ -17,49 +17,49 @@ <return type="void" /> <param index="0" name="joint_idx" type="int" /> <description> - Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_auto_calculate_length" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_bone_index" qualifiers="const"> <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the bone index of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns the bone index of the bone assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_bone_name" qualifiers="const"> <return type="String" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the name of the bone that is assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns the name of the bone that is assigned to the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_length" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the length of the FABRIK joint at [code]joint_idx[/code]. + Returns the length of the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_magnet" qualifiers="const"> <return type="Vector3" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the magnet vector of the FABRIK joint at [code]joint_idx[/code]. + Returns the magnet vector of the FABRIK joint at [param joint_idx]. </description> </method> <method name="get_fabrik_joint_tip_node" qualifiers="const"> <return type="NodePath" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [code]joint_idx[/code], if one has been set. + Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [param joint_idx], if one has been set. </description> </method> <method name="get_fabrik_joint_use_target_basis" qualifiers="const"> @@ -74,7 +74,7 @@ <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [code]joint_idx[/code]. + Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [param joint_idx]. </description> </method> <method name="set_fabrik_joint_auto_calculate_length"> @@ -82,7 +82,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="auto_calculate_length" type="bool" /> <description> - When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [code]joint_idx[/code]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned. + When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [param joint_idx]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned. </description> </method> <method name="set_fabrik_joint_bone_index"> @@ -90,7 +90,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_index" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. + Sets the bone index, [param bone_index], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. </description> </method> <method name="set_fabrik_joint_bone_name"> @@ -98,7 +98,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_name" type="String" /> <description> - Sets the bone name, [code]bone_name[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. + Sets the bone name, [param bone_name], of the FABRIK joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. </description> </method> <method name="set_fabrik_joint_length"> @@ -106,7 +106,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="length" type="float" /> <description> - Sets the joint length, [code]length[/code], of the FABRIK joint at [code]joint_idx[/code]. + Sets the joint length, [param length], of the FABRIK joint at [param joint_idx]. </description> </method> <method name="set_fabrik_joint_magnet"> @@ -114,7 +114,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="magnet_position" type="Vector3" /> <description> - Sets the magenet position to [code]magnet_position[/code] for the joint at [code]joint_idx[/code]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved. + Sets the magenet position to [param magnet_position] for the joint at [param joint_idx]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved. </description> </method> <method name="set_fabrik_joint_tip_node"> @@ -122,7 +122,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="tip_node" type="NodePath" /> <description> - Sets the nodepath of the FARIK joint at [code]joint_idx[/code] to [code]tip_node[/code]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length. + Sets the nodepath of the FARIK joint at [param joint_idx] to [param tip_node]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length. [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone. </description> </method> @@ -131,7 +131,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="use_target_basis" type="bool" /> <description> - Sets whether the FABRIK joint at [code]joint_idx[/code] uses the target's [Basis] for its rotation. + Sets whether the FABRIK joint at [param joint_idx] uses the target's [Basis] for its rotation. [b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. </description> </method> @@ -140,7 +140,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="use_tip_node" type="bool" /> <description> - Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [code]joint_idx[/code]. This will only work if there is a node assigned to the tip nodepath for this joint. + Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [param joint_idx]. This will only work if there is a node assigned to the tip nodepath for this joint. </description> </method> </methods> diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml index ddbd5b4274..ef469d42ea 100644 --- a/doc/classes/SkeletonModification3DJiggle.xml +++ b/doc/classes/SkeletonModification3DJiggle.xml @@ -21,42 +21,42 @@ <return type="int" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the bone index of the bone assigned to the Jiggle joint at [code]joint_idx[/code]. + Returns the bone index of the bone assigned to the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_bone_name" qualifiers="const"> <return type="String" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the name of the bone that is assigned to the Jiggle joint at [code]joint_idx[/code]. + Returns the name of the bone that is assigned to the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_damping" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + Returns the amount of dampening of the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_gravity" qualifiers="const"> <return type="Vector3" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a [Vector3] representign the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by. + Returns a [Vector3] representign the amount of gravity the Jiggle joint at [param joint_idx] is influenced by. </description> </method> <method name="get_jiggle_joint_mass" qualifiers="const"> <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the amount of mass of the Jiggle joint at [code]joint_idx[/code]. + Returns the amount of mass of the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_override" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification. + Returns a boolean that indicates whether the joint at [param joint_idx] is overriding the default jiggle joint data defined in the modification. </description> </method> <method name="get_jiggle_joint_roll" qualifiers="const"> @@ -70,14 +70,14 @@ <return type="float" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns the stiffness of the Jiggle joint at [code]joint_idx[/code]. + Returns the stiffness of the Jiggle joint at [param joint_idx]. </description> </method> <method name="get_jiggle_joint_use_gravity" qualifiers="const"> <return type="bool" /> <param index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not. + Returns a boolean that indicates whether the joint at [param joint_idx] is using gravity or not. </description> </method> <method name="get_use_colliders" qualifiers="const"> @@ -98,7 +98,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. + Sets the bone index, [param bone_idx], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. </description> </method> <method name="set_jiggle_joint_bone_name"> @@ -106,7 +106,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="name" type="String" /> <description> - Sets the bone name, [code]bone_name[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. + Sets the bone name, [param name], of the Jiggle joint at [param joint_idx]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. </description> </method> <method name="set_jiggle_joint_damping"> @@ -114,7 +114,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="damping" type="float" /> <description> - Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + Sets the amount of dampening of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_gravity"> @@ -122,7 +122,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="gravity" type="Vector3" /> <description> - Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code]. + Sets the gravity vector of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_mass"> @@ -130,7 +130,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="mass" type="float" /> <description> - Sets the of mass of the Jiggle joint at [code]joint_idx[/code]. + Sets the of mass of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_override"> @@ -138,7 +138,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="override" type="bool" /> <description> - Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification. + Sets whether the Jiggle joint at [param joint_idx] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification. </description> </method> <method name="set_jiggle_joint_roll"> @@ -154,7 +154,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="stiffness" type="float" /> <description> - Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code]. + Sets the of stiffness of the Jiggle joint at [param joint_idx]. </description> </method> <method name="set_jiggle_joint_use_gravity"> @@ -162,7 +162,7 @@ <param index="0" name="joint_idx" type="int" /> <param index="1" name="use_gravity" type="bool" /> <description> - Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity. + Sets whether the Jiggle joint at [param joint_idx] should use gravity. </description> </method> <method name="set_use_colliders"> diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml index 2fd7afc360..6618ebbcfb 100644 --- a/doc/classes/SkeletonModification3DTwoBoneIK.xml +++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml @@ -101,14 +101,14 @@ <return type="void" /> <param index="0" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D]. + Sets the bone index, [param bone_idx], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D]. </description> </method> <method name="set_joint_one_bone_name"> <return type="void" /> <param index="0" name="bone_name" type="String" /> <description> - Sets the bone name, [code]bone_name[/code], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D]. + Sets the bone name, [param bone_name], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D]. </description> </method> <method name="set_joint_one_length"> @@ -129,14 +129,14 @@ <return type="void" /> <param index="0" name="bone_idx" type="int" /> <description> - Sets the bone index, [code]bone_index[/code], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D]. + Sets the bone index, [param bone_idx], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D]. </description> </method> <method name="set_joint_two_bone_name"> <return type="void" /> <param index="0" name="bone_name" type="String" /> <description> - Sets the bone name, [code]bone_name[/code], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D]. + Sets the bone name, [param bone_name], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D]. </description> </method> <method name="set_joint_two_length"> diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml index d752323231..950e52e622 100644 --- a/doc/classes/SkeletonModificationStack2D.xml +++ b/doc/classes/SkeletonModificationStack2D.xml @@ -22,7 +22,7 @@ <return type="void" /> <param index="0" name="mod_idx" type="int" /> <description> - Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists. + Deletes the [SkeletonModification2D] at the index position [param mod_idx], if it exists. </description> </method> <method name="enable_all_modifications"> @@ -37,7 +37,7 @@ <param index="0" name="delta" type="float" /> <param index="1" name="execution_mode" type="int" /> <description> - Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. + Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [param execution_mode], starting from index [code]0[/code] to [member modification_count]. [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. </description> </method> @@ -51,7 +51,7 @@ <return type="SkeletonModification2D" /> <param index="0" name="mod_idx" type="int" /> <description> - Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code]. + Returns the [SkeletonModification2D] at the passed-in index, [param mod_idx]. </description> </method> <method name="get_skeleton" qualifiers="const"> @@ -65,7 +65,7 @@ <param index="0" name="mod_idx" type="int" /> <param index="1" name="modification" type="SkeletonModification2D" /> <description> - Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. + Sets the modification at [param mod_idx] to the passed-in modification, [param modification]. </description> </method> <method name="setup"> diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml index 010c2181e7..34c7099bca 100644 --- a/doc/classes/SkeletonModificationStack3D.xml +++ b/doc/classes/SkeletonModificationStack3D.xml @@ -21,7 +21,7 @@ <return type="void" /> <param index="0" name="mod_idx" type="int" /> <description> - Deletes the [SkeletonModification3D] at the index position [code]mod_idx[/code], if it exists. + Deletes the [SkeletonModification3D] at the index position [param mod_idx], if it exists. </description> </method> <method name="enable_all_modifications"> @@ -36,7 +36,7 @@ <param index="0" name="delta" type="float" /> <param index="1" name="execution_mode" type="int" /> <description> - Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. + Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [param execution_mode], starting from index [code]0[/code] to [member modification_count]. [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. </description> </method> @@ -50,7 +50,7 @@ <return type="SkeletonModification3D" /> <param index="0" name="mod_idx" type="int" /> <description> - Returns the [SkeletonModification3D] at the passed-in index, [code]mod_idx[/code]. + Returns the [SkeletonModification3D] at the passed-in index, [param mod_idx]. </description> </method> <method name="get_skeleton" qualifiers="const"> @@ -64,7 +64,7 @@ <param index="0" name="mod_idx" type="int" /> <param index="1" name="modification" type="SkeletonModification3D" /> <description> - Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. + Sets the modification at [param mod_idx] to the passed-in modification, [param modification]. </description> </method> <method name="setup"> @@ -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/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml index 52925c2d41..55d21f3224 100644 --- a/doc/classes/SkeletonProfile.xml +++ b/doc/classes/SkeletonProfile.xml @@ -13,14 +13,14 @@ <return type="int" /> <param index="0" name="bone_name" type="StringName" /> <description> - Returns the bone index that matches [code]bone_name[/code] as its name. + Returns the bone index that matches [param bone_name] as its name. </description> </method> <method name="get_bone_name" qualifiers="const"> <return type="StringName" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap]. + Returns the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the returned bone name is the bone name of the target skeleton. </description> </method> @@ -28,35 +28,35 @@ <return type="StringName" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the name of the bone which is the parent to the bone at [code]bone_idx[/code]. The result is empty if the bone has no parent. + Returns the name of the bone which is the parent to the bone at [param bone_idx]. The result is empty if the bone has no parent. </description> </method> <method name="get_bone_tail" qualifiers="const"> <return type="StringName" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the name of the bone which is the tail of the bone at [code]bone_idx[/code]. + Returns the name of the bone which is the tail of the bone at [param bone_idx]. </description> </method> <method name="get_group" qualifiers="const"> <return type="StringName" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the group of the bone at [code]bone_idx[/code]. + Returns the group of the bone at [param bone_idx]. </description> </method> <method name="get_group_name" qualifiers="const"> <return type="StringName" /> <param index="0" name="group_idx" type="int" /> <description> - Returns the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor. + Returns the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor. </description> </method> <method name="get_handle_offset" qualifiers="const"> <return type="Vector2" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor. + Returns the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square. </description> </method> @@ -64,21 +64,21 @@ <return type="Transform3D" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the reference pose transform for bone [code]bone_idx[/code]. + Returns the reference pose transform for bone [param bone_idx]. </description> </method> <method name="get_tail_direction" qualifiers="const"> <return type="int" enum="SkeletonProfile.TailDirection" /> <param index="0" name="bone_idx" type="int" /> <description> - Returns the tail direction of the bone at [code]bone_idx[/code]. + Returns the tail direction of the bone at [param bone_idx]. </description> </method> <method name="get_texture" qualifiers="const"> <return type="Texture2D" /> <param index="0" name="group_idx" type="int" /> <description> - Returns the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor. + Returns the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor. </description> </method> <method name="set_bone_name"> @@ -86,7 +86,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="bone_name" type="StringName" /> <description> - Sets the name of the bone at [code]bone_idx[/code] that will be the key name in the [BoneMap]. + Sets the name of the bone at [param bone_idx] that will be the key name in the [BoneMap]. In the retargeting process, the setting bone name is the bone name of the target skeleton. </description> </method> @@ -95,7 +95,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="bone_parent" type="StringName" /> <description> - Sets the bone with name [code]bone_parent[/code] as the parent of the bone at [code]bone_idx[/code]. If an empty string is passed, then the bone has no parent. + Sets the bone with name [param bone_parent] as the parent of the bone at [param bone_idx]. If an empty string is passed, then the bone has no parent. </description> </method> <method name="set_bone_tail"> @@ -103,7 +103,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="bone_tail" type="StringName" /> <description> - Sets the bone with name [code]bone_tail[/code] as the tail of the bone at [code]bone_idx[/code]. + Sets the bone with name [param bone_tail] as the tail of the bone at [param bone_idx]. </description> </method> <method name="set_group"> @@ -111,7 +111,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="group" type="StringName" /> <description> - Sets the group of the bone at [code]bone_idx[/code]. + Sets the group of the bone at [param bone_idx]. </description> </method> <method name="set_group_name"> @@ -119,7 +119,7 @@ <param index="0" name="group_idx" type="int" /> <param index="1" name="group_name" type="StringName" /> <description> - Sets the name of the group at [code]group_idx[/code] that will be the drawing group in the [BoneMap] editor. + Sets the name of the group at [param group_idx] that will be the drawing group in the [BoneMap] editor. </description> </method> <method name="set_handle_offset"> @@ -127,7 +127,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="handle_offset" type="Vector2" /> <description> - Sets the offset of the bone at [code]bone_idx[/code] that will be the button position in the [BoneMap] editor. + Sets the offset of the bone at [param bone_idx] that will be the button position in the [BoneMap] editor. This is the offset with origin at the top left corner of the square. </description> </method> @@ -136,7 +136,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="bone_name" type="Transform3D" /> <description> - Sets the reference pose transform for bone [code]bone_idx[/code]. + Sets the reference pose transform for bone [param bone_idx]. </description> </method> <method name="set_tail_direction"> @@ -144,7 +144,7 @@ <param index="0" name="bone_idx" type="int" /> <param index="1" name="tail_direction" type="int" enum="SkeletonProfile.TailDirection" /> <description> - Sets the tail direction of the bone at [code]bone_idx[/code]. + Sets the tail direction of the bone at [param bone_idx]. [b]Note:[/b] This only specifies the method of calculation. The actual coordinates required should be stored in an external skeleton, so the calculation itself needs to be done externally. </description> </method> @@ -153,7 +153,7 @@ <param index="0" name="group_idx" type="int" /> <param index="1" name="texture" type="Texture2D" /> <description> - Sets the texture of the group at [code]group_idx[/code] that will be the drawing group background image in the [BoneMap] editor. + Sets the texture of the group at [param group_idx] that will be the drawing group background image in the [BoneMap] editor. </description> </method> </methods> diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index 88ea7f2b49..c3dbd69e59 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -27,7 +27,7 @@ <signal name="drag_ended"> <param index="0" name="value_changed" type="bool" /> <description> - Emitted when dragging stops. If [code]value_changed[/code] is true, [member Range.value] is different from the value when you started the dragging. + Emitted when dragging stops. If [param value_changed] is true, [member Range.value] is different from the value when you started the dragging. </description> </signal> <signal name="drag_started"> diff --git a/doc/classes/SoftDynamicBody3D.xml b/doc/classes/SoftDynamicBody3D.xml index f59df90eca..87492704d7 100644 --- a/doc/classes/SoftDynamicBody3D.xml +++ b/doc/classes/SoftDynamicBody3D.xml @@ -28,14 +28,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_physics_rid" qualifiers="const"> @@ -69,7 +69,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 [code]value[/code], 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"> @@ -77,7 +77,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 [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. </description> </method> <method name="set_point_pinned"> @@ -86,7 +86,7 @@ <param index="1" name="pinned" type="bool" /> <param index="2" name="attachment_path" type="NodePath" default="NodePath("")" /> <description> - Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to. + Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [param attachment_path] can define a [Node3D] the pinned vertex will be attached to. </description> </method> </methods> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index f063a4c4c2..e9721495dd 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -101,7 +101,7 @@ <param index="0" name="anim" type="StringName" /> <param index="1" name="newname" type="StringName" /> <description> - Changes the animation's name to [code]newname[/code]. + Changes the animation's name to [param newname]. </description> </method> <method name="set_animation_loop"> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 7ce38d9d21..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 [code]bytes[/code] 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,14 +63,14 @@ <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"> <return type="String" /> <param index="0" name="bytes" type="int" default="-1" /> <description> - Gets an ASCII string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. + Gets an ASCII string with byte-length [param bytes] from the stream. If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. </description> </method> <method name="get_u16"> @@ -101,14 +101,14 @@ <return type="String" /> <param index="0" name="bytes" type="int" default="-1" /> <description> - Gets an UTF-8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as UTF-8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. + Gets an UTF-8 string with byte-length [param bytes] from the stream (this decodes the string sent as UTF-8). If [param bytes] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. </description> </method> <method name="get_var"> <return type="Variant" /> <param index="0" name="allow_objects" type="bool" default="false" /> <description> - Gets a Variant from the stream. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + Gets a Variant from the stream. 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> @@ -233,7 +233,7 @@ <param index="0" name="value" type="Variant" /> <param index="1" name="full_objects" type="bool" default="false" /> <description> - Puts a Variant into the stream. If [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). + Puts a Variant into the stream. 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/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index ee603360fa..4bef9f44b7 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -45,7 +45,7 @@ <return type="void" /> <param index="0" name="position" type="int" /> <description> - Moves the cursor to the specified position. [code]position[/code] must be a valid index of [member data_array]. + Moves the cursor to the specified position. [param position] must be a valid index of [member data_array]. </description> </method> </methods> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index dd571226b8..7fe9c54e3e 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -18,7 +18,7 @@ <param index="2" name="certificate" type="X509Certificate" /> <param index="3" name="chain" type="X509Certificate" default="null" /> <description> - Accepts a peer connection as a server using the given [code]private_key[/code] and providing the given [code]certificate[/code] to the client. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. + Accepts a peer connection as a server using the given [param private_key] and providing the given [param certificate] to the client. You can pass the optional [param chain] parameter to provide additional CA chain information along with the certificate. </description> </method> <method name="connect_to_stream"> @@ -28,8 +28,8 @@ <param index="2" name="for_hostname" type="String" default="""" /> <param index="3" name="valid_certificate" type="X509Certificate" default="null" /> <description> - Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. - [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions. + Connects to a peer using an underlying [StreamPeer] [param stream]. If [param validate_certs] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [param for_hostname]. + [b]Note:[/b] Specifying a custom [param valid_certificate] is not supported in HTML5 exports due to browsers restrictions. </description> </method> <method name="disconnect_from_stream"> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index 58f3a0e8db..c08fb82797 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -16,7 +16,7 @@ <param index="1" name="host" type="String" default=""*"" /> <description> Opens the TCP socket, and binds it to the specified local address. - This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [code]host[/code] and [code]port[/code] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. + This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [param host] and [param port] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. </description> </method> <method name="connect_to_host"> @@ -67,7 +67,7 @@ <return type="void" /> <param index="0" name="enabled" type="bool" /> <description> - If [code]enabled[/code] is [code]true[/code], packets will be sent immediately. If [code]enabled[/code] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url]. + If [param enabled] is [code]true[/code], packets will be sent immediately. If [param enabled] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url]. [b]Note:[/b] It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth. </description> </method> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 06579ec49e..f1cd4d72f7 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -95,8 +95,8 @@ <param index="0" name="to" type="String" /> <description> Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. - [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. - [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to]. </description> </method> @@ -124,7 +124,7 @@ <param index="1" name="from" type="int" default="0" /> <param index="2" name="to" type="int" default="0" /> <description> - Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. + Returns the number of occurrences of substring [param what] between [param from] and [param to] positions. If [param from] and [param to] equals 0 the whole string will be used. If only [param to] equals 0 the remained substring will be used. </description> </method> <method name="countn" qualifiers="const"> @@ -133,7 +133,7 @@ <param index="1" name="from" type="int" default="0" /> <param index="2" name="to" type="int" default="0" /> <description> - Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. + Returns the number of occurrences of substring [param what] (ignoring case) between [param from] and [param to] positions. If [param from] and [param to] equals 0 the whole string will be used. If only [param to] equals 0 the remained substring will be used. </description> </method> <method name="dedent" qualifiers="const"> @@ -180,8 +180,8 @@ <param index="0" name="values" type="Variant" /> <param index="1" name="placeholder" type="String" default=""{_}"" /> <description> - Formats the string by replacing all occurrences of [code]placeholder[/code] with the elements of [code]values[/code]. - [code]values[/code] can be a [Dictionary] or an [Array]. Any underscores in [code]placeholder[/code] will be replaced with the corresponding keys in advance. Array elements use their index as keys. + Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values]. + [param values] can be a [Dictionary] or an [Array]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys. [codeblock] # Prints: Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it. var use_array_values = "Waiting for {0} is a play by {1}, and {0} Engine is named after it." @@ -190,7 +190,7 @@ # Prints: User 42 is Godot. print("User {id} is {name}.".format({"id": 42, "name": "Godot"})) [/codeblock] - Some additional handling is performed when [code]values[/code] is an array. If [code]placeholder[/code] does not contain an underscore, the elements of the array will be used to replace one occurrence of the placeholder in turn; If an array element is another 2-element array, it'll be interpreted as a key-value pair. + Some additional handling is performed when [param values] is an array. If [param placeholder] does not contain an underscore, the elements of the array will be used to replace one occurrence of the placeholder in turn; If an array element is another 2-element array, it'll be interpreted as a key-value pair. [codeblock] # Prints: User 42 is Godot. print("User {} is {}.".format([42, "Godot"], "{}")) @@ -237,7 +237,7 @@ <param index="0" name="delimiter" type="String" /> <param index="1" name="slice" type="int" /> <description> - Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist. + Splits a string using a [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist. This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. Example: [codeblock] @@ -249,7 +249,7 @@ <return type="int" /> <param index="0" name="delimiter" type="String" /> <description> - Splits a string using a [code]delimiter[/code] and returns a number of slices. + Splits a string using a [param delimiter] and returns a number of slices. </description> </method> <method name="get_slicec" qualifiers="const"> @@ -257,7 +257,7 @@ <param index="0" name="delimiter" type="int" /> <param index="1" name="slice" type="int" /> <description> - Splits a string using a Unicode character with code [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist. + Splits a string using a Unicode character with code [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist. This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. </description> </method> @@ -296,7 +296,7 @@ <return type="String" /> <param index="0" name="prefix" type="String" /> <description> - Returns a copy of the string with lines indented with [code]prefix[/code]. + Returns a copy of the string with lines indented with [param prefix]. For example, the string can be indented with two tabs using [code]"\t\t"[/code], or four spaces using [code]" "[/code]. The prefix can be any string so it can also be used to comment out strings with e.g. [code]"# "[/code]. See also [method dedent] to remove indentation. [b]Note:[/b] Empty lines are kept empty. </description> @@ -306,7 +306,7 @@ <param index="0" name="position" type="int" /> <param index="1" name="what" type="String" /> <description> - Returns a copy of the string with the substring [code]what[/code] inserted at the given position. + Returns a copy of the string with the substring [param what] inserted at the given [param position]. </description> </method> <method name="is_absolute_path" qualifiers="const"> @@ -364,7 +364,7 @@ <return type="bool" /> <param index="0" name="with_prefix" type="bool" default="false" /> <description> - Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. + Returns [code]true[/code] if this string contains a valid hexadecimal number. If [param with_prefix] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. </description> </method> <method name="is_valid_html_color" qualifiers="const"> @@ -407,7 +407,7 @@ <return type="String" /> <param index="0" name="parts" type="PackedStringArray" /> <description> - Returns a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method. + Returns a [String] which is the concatenation of the [param parts]. The separator between elements is the string providing this method. Example: [codeblocks] [gdscript] @@ -429,7 +429,7 @@ <return type="String" /> <param index="0" name="length" type="int" /> <description> - Returns a number of characters from the left of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length. + Returns a number of characters from the left of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length. Examples: [codeblock] print("sample text".left(3)) #prints "sam" @@ -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"> @@ -448,15 +448,15 @@ <param index="0" name="min_length" type="int" /> <param index="1" name="character" type="String" default="" "" /> <description> - Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the left of the string. + Formats a string to be at least [param min_length] long by adding [param character]s to the left of the string. </description> </method> <method name="lstrip" qualifiers="const"> <return type="String" /> <param index="0" name="chars" type="String" /> <description> - Returns a copy of the string with characters removed from the left. The [code]chars[/code] argument is a string specifying the set of characters to be removed. - [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters. + Returns a copy of the string with characters removed from the left. The [param chars] argument is a string specifying the set of characters to be removed. + [b]Note:[/b] The [param chars] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters. </description> </method> <method name="match" qualifiers="const"> @@ -491,8 +491,8 @@ <description> Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code]. - [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. - [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to]. </description> </method> @@ -501,8 +501,8 @@ <param index="0" name="to" type="String" /> <description> Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. - [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. - [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. + [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [param to] string or [code]-1[/code] if the "base" string is shorter than the [param to] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. + [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [param to] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. </description> </method> @@ -512,7 +512,7 @@ <param index="1" name="decimals" type="int" default="-1" /> <description> Converts a [float] to a string representation of a decimal number. - The number of decimal places can be specified with [code]decimals[/code]. If [code]decimals[/code] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point). + The number of decimal places can be specified with [param decimals]. If [param decimals] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point). Trailing zeros are not included in the string. The last digit will be rounded and not truncated. Some examples: [codeblock] @@ -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] @@ -556,21 +556,21 @@ <return type="String" /> <param index="0" name="digits" type="int" /> <description> - Formats a number to have an exact number of [code]digits[/code] after the decimal point. + Formats a number to have an exact number of [param digits] after the decimal point. </description> </method> <method name="pad_zeros" qualifiers="const"> <return type="String" /> <param index="0" name="digits" type="int" /> <description> - Formats a number to have an exact number of [code]digits[/code] before the decimal point. + Formats a number to have an exact number of [param digits] before the decimal point. </description> </method> <method name="plus_file" qualifiers="const"> <return type="String" /> <param index="0" name="file" type="String" /> <description> - If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. + If the string is a path, this concatenates [param file] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. </description> </method> <method name="repeat" qualifiers="const"> @@ -616,7 +616,7 @@ <return type="String" /> <param index="0" name="length" type="int" /> <description> - Returns a number of characters from the right of the string. If negative [code]length[/code] is used, the characters are counted downwards from [String]'s length. + Returns a number of characters from the right of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length. Examples: [codeblock] print("sample text".right(3)) #prints "ext" @@ -629,7 +629,7 @@ <param index="0" name="min_length" type="int" /> <param index="1" name="character" type="String" default="" "" /> <description> - Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the right of the string. + Formats a string to be at least [param min_length] long by adding [param character]s to the right of the string. </description> </method> <method name="rsplit" qualifiers="const"> @@ -638,10 +638,10 @@ <param index="1" name="allow_empty" type="bool" default="true" /> <param index="2" name="maxsplit" type="int" default="0" /> <description> - Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right. + Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right. The splits in the returned array are sorted in the same order as the original string, from left to right. - If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. - If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split]. + If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + If [param maxsplit] is specified, it defines the number of splits to do from the right up to [param maxsplit]. The default value of 0 means that all items are split, thus giving the same result as [method split]. Example: [codeblocks] [gdscript] @@ -661,8 +661,8 @@ <return type="String" /> <param index="0" name="chars" type="String" /> <description> - Returns a copy of the string with characters removed from the right. The [code]chars[/code] argument is a string specifying the set of characters to be removed. - [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters. + Returns a copy of the string with characters removed from the right. The [param chars] argument is a string specifying the set of characters to be removed. + [b]Note:[/b] The [param chars] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters. </description> </method> <method name="sha1_buffer" qualifiers="const"> @@ -714,9 +714,9 @@ <param index="1" name="allow_empty" type="bool" default="true" /> <param index="2" name="maxsplit" type="int" default="0" /> <description> - Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length. - If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. - If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split. + Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length. + If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + If [param maxsplit] is specified, it defines the number of splits to do from the left up to [param maxsplit]. The default value of [code]0[/code] means that all items are split. If you need only one element from the array at a specific index, [method get_slice] is a more performant option. Example: [codeblocks] @@ -744,7 +744,7 @@ <description> Splits the string in floats by using a delimiter string and returns an array of the substrings. For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. - If [code]allow_empty[/code] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. + If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. </description> </method> <method name="strip_edges" qualifiers="const"> @@ -766,7 +766,7 @@ <param index="0" name="from" type="int" /> <param index="1" name="len" type="int" default="-1" /> <description> - Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position. + Returns part of the string from the position [param from] with length [param len]. Argument [param len] is optional and using [code]-1[/code] will return remaining characters from given position. </description> </method> <method name="to_ascii_buffer" qualifiers="const"> @@ -846,7 +846,7 @@ <return type="int" /> <param index="0" name="at" type="int" /> <description> - Returns the character code at position [code]at[/code]. + Returns the character code at position [param at]. </description> </method> <method name="uri_decode" qualifiers="const"> @@ -887,7 +887,7 @@ <return type="String" /> <param index="0" name="escape_quotes" type="bool" default="false" /> <description> - Returns a copy of the string with special characters escaped using the XML standard. If [code]escape_quotes[/code] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped. + Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped. </description> </method> <method name="xml_unescape" qualifiers="const"> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index 8593acd1ef..d9c19a0c86 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -94,7 +94,7 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="offset" type="float" /> <description> - Sets the default value of the specified [enum Side] to [code]offset[/code] pixels. + Sets the default value of the specified [enum Side] to [param offset] pixels. </description> </method> <method name="test_mask" qualifiers="const"> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 48f656af8e..c4024fa4b5 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -41,7 +41,7 @@ <return type="int" /> <param index="0" name="corner" type="int" enum="Corner" /> <description> - Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values. + Returns the given [param corner]'s radius. See [enum Corner] for possible values. </description> </method> <method name="get_expand_margin" qualifiers="const"> @@ -56,14 +56,14 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="width" type="int" /> <description> - Sets the specified [enum Side]'s border width to [code]width[/code] pixels. + Sets the specified [enum Side]'s border width to [param width] pixels. </description> </method> <method name="set_border_width_all"> <return type="void" /> <param index="0" name="width" type="int" /> <description> - Sets the border width to [code]width[/code] pixels for all sides. + Sets the border width to [param width] pixels for all sides. </description> </method> <method name="set_corner_radius"> @@ -71,14 +71,14 @@ <param index="0" name="corner" type="int" enum="Corner" /> <param index="1" name="radius" type="int" /> <description> - Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values. + Sets the corner radius to [param radius] pixels for the given [param corner]. See [enum Corner] for possible values. </description> </method> <method name="set_corner_radius_all"> <return type="void" /> <param index="0" name="radius" type="int" /> <description> - Sets the corner radius to [code]radius[/code] pixels for all corners. + Sets the corner radius to [param radius] pixels for all corners. </description> </method> <method name="set_corner_radius_individual"> @@ -88,7 +88,7 @@ <param index="2" name="radius_bottom_right" type="int" /> <param index="3" name="radius_bottom_left" type="int" /> <description> - Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels. + Sets the corner radius for each corner to [param radius_top_left], [param radius_top_right], [param radius_bottom_right], and [param radius_bottom_left] pixels. </description> </method> <method name="set_expand_margin"> @@ -96,14 +96,14 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="size" type="float" /> <description> - Sets the expand margin to [code]size[/code] pixels for the specified [enum Side]. + Sets the expand margin to [param size] pixels for the specified [enum Side]. </description> </method> <method name="set_expand_margin_all"> <return type="void" /> <param index="0" name="size" type="float" /> <description> - Sets the expand margin to [code]size[/code] pixels for all margins. + Sets the expand margin to [param size] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -113,7 +113,7 @@ <param index="2" name="size_right" type="float" /> <param index="3" name="size_bottom" type="float" /> <description> - Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. + Sets the expand margin for each margin to [param size_left], [param size_top], [param size_right], and [param size_bottom] pixels. </description> </method> </methods> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index 2468857cf1..7db70e630d 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -27,7 +27,7 @@ <return type="void" /> <param index="0" name="size" type="float" /> <description> - Sets the expand margin to [code]size[/code] pixels for all margins. + Sets the expand margin to [param size] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -37,7 +37,7 @@ <param index="2" name="size_right" type="float" /> <param index="3" name="size_bottom" type="float" /> <description> - Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. + Sets the expand margin for each margin to [param size_left], [param size_top], [param size_right], and [param size_bottom] pixels. </description> </method> <method name="set_expand_margin_size"> @@ -45,7 +45,7 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="size" type="float" /> <description> - Sets the expand margin to [code]size[/code] pixels for the specified [enum Side]. + Sets the expand margin to [param size] pixels for the specified [enum Side]. </description> </method> <method name="set_margin_size"> @@ -53,7 +53,7 @@ <param index="0" name="margin" type="int" enum="Side" /> <param index="1" name="size" type="float" /> <description> - Sets the margin to [code]size[/code] pixels for the specified [enum Side]. + Sets the margin to [param size] pixels for the specified [enum Side]. </description> </method> </methods> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 51c9e59fd2..ccec691107 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -86,7 +86,7 @@ <param index="1" name="flags" type="int" default="0" /> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat]. + [b]FIXME:[/b] Document possible values for [param flags], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat]. </description> </method> <method name="commit_to_arrays"> @@ -123,7 +123,7 @@ <param index="0" name="nd_threshold" type="float" /> <param index="1" name="target_index_count" type="int" default="3" /> <description> - Generates a LOD for a given [code]nd_threshold[/code] in linear units (square root of quadric error metric), using at most [code]target_index_count[/code] indices. + Generates a LOD for a given [param nd_threshold] in linear units (square root of quadric error metric), using at most [param target_index_count] indices. Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead. </description> </method> @@ -131,7 +131,7 @@ <return type="void" /> <param index="0" name="flip" type="bool" default="false" /> <description> - Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents]. + Generates normals from vertices so you do not have to do it manually. If [param flip] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents]. [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> @@ -151,7 +151,7 @@ <return type="int" enum="SurfaceTool.CustomFormat" /> <param index="0" name="channel_index" type="int" /> <description> - Returns the format for custom [code]channel_index[/code] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused. + Returns the format for custom [param channel_index] (currently up to 4). Returns [constant CUSTOM_MAX] if this custom channel is unused. </description> </method> <method name="get_primitive_type" qualifiers="const"> @@ -184,7 +184,7 @@ <return type="void" /> <param index="0" name="bones" type="PackedInt32Array" /> <description> - Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/code] must contain 4 integers. + Specifies an array of bones to use for the [i]next[/i] vertex. [param bones] must contain 4 integers. </description> </method> <method name="set_color"> @@ -200,8 +200,8 @@ <param index="0" name="channel_index" type="int" /> <param index="1" name="custom_color" type="Color" /> <description> - Sets the custom value on this vertex for [code]channel_index[/code]. - [method set_custom_format] must be called first for this [code]channel_index[/code]. Formats which are not RGBA will ignore other color channels. + Sets the custom value on this vertex for [param channel_index]. + [method set_custom_format] must be called first for this [param channel_index]. Formats which are not RGBA will ignore other color channels. </description> </method> <method name="set_custom_format"> @@ -209,7 +209,7 @@ <param index="0" name="channel_index" type="int" /> <param index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" /> <description> - Sets the color format for this custom [code]channel_index[/code]. Use [constant CUSTOM_MAX] to disable. + Sets the color format for this custom [param channel_index]. Use [constant CUSTOM_MAX] to disable. Must be invoked after [method begin] and should be set before [method commit] or [method commit_to_arrays]. </description> </method> @@ -268,7 +268,7 @@ <return type="void" /> <param index="0" name="weights" type="PackedFloat32Array" /> <description> - Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. + Specifies weight values to use for the [i]next[/i] vertex. [param weights] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> </methods> 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..ee3c87b8e6 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -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> @@ -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..219052d3d5 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -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"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 4266a414ce..ae57a08ef8 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -77,7 +77,7 @@ <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"> diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 46005f8373..538cdd4138 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -84,7 +84,7 @@ <return type="float" /> <param index="0" name="to" type="Vector4" /> <description> - Returns the squared distance between this vector and [code]to[/code]. + Returns the squared distance between this vector and [param to]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> 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/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 ", "") diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 7207a6efbb..3e416bc615 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1655,18 +1655,18 @@ void RasterizerSceneGLES3::_setup_lights(const RenderDataGLES3 *p_render_data, b // TODO, to avoid stalls, should rotate between 3 buffers based on frame index. // TODO, consider mapping the buffer as in 2D + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_OMNILIGHT_UNIFORM_LOCATION, scene_state.omni_light_buffer); if (r_omni_light_count) { - glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_OMNILIGHT_UNIFORM_LOCATION, scene_state.omni_light_buffer); glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(LightData) * r_omni_light_count, scene_state.omni_lights); } + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_SPOTLIGHT_UNIFORM_LOCATION, scene_state.spot_light_buffer); if (r_spot_light_count) { - glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_SPOTLIGHT_UNIFORM_LOCATION, scene_state.spot_light_buffer); glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(LightData) * r_spot_light_count, scene_state.spot_lights); } + glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, scene_state.directional_light_buffer); if (r_directional_light_count) { - glBindBufferBase(GL_UNIFORM_BUFFER, SCENE_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, scene_state.directional_light_buffer); glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(DirectionalLightData) * r_directional_light_count, scene_state.directional_lights); } glBindBuffer(GL_UNIFORM_BUFFER, 0); diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp index 667ba4f5e6..dee715150b 100644 --- a/drivers/gles3/storage/mesh_storage.cpp +++ b/drivers/gles3/storage/mesh_storage.cpp @@ -255,7 +255,10 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); } for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + const AABB &bone = p_surface.bone_aabbs[i]; + if (!bone.has_no_volume()) { + mesh->bone_aabbs.write[i].merge_with(bone); + } } mesh->aabb.merge_with(p_surface.aabb); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index e7946f56da..232cda48fc 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1942,6 +1942,21 @@ void EditorNode::_dialog_action(String p_file) { } } break; + case FILE_SAVE_AND_RUN_MAIN_SCENE: { + ProjectSettings::get_singleton()->set("application/run/main_scene", p_file); + ProjectSettings::get_singleton()->save(); + + if (file->get_file_mode() == EditorFileDialog::FILE_MODE_SAVE_FILE) { + _save_default_environment(); + _save_scene_with_preview(p_file); + if ((bool)pick_main_scene->get_meta("from_native", false)) { + run_native->resume_run_native(); + } else { + _run(false, p_file); + } + } + } break; + case FILE_EXPORT_MESH_LIBRARY: { Ref<MeshLibrary> ml; if (file_export_lib_merge->is_pressed() && FileAccess::exists(p_file)) { @@ -2396,10 +2411,8 @@ void EditorNode::_run(bool p_current, const String &p_custom) { } if (scene->get_scene_file_path().is_empty()) { - current_menu_option = -1; - _menu_option(FILE_SAVE_AS_SCENE); - // Set the option to save and run so when the dialog is accepted, the scene runs. current_menu_option = FILE_SAVE_AND_RUN; + _menu_option_confirm(FILE_SAVE_AS_SCENE, true); file->set_title(TTR("Save scene before running...")); return; } @@ -2414,6 +2427,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { if (!ensure_main_scene(false)) { return; } + run_filename = GLOBAL_DEF_BASIC("application/run/main_scene", ""); } if (bool(EDITOR_GET("run/auto_save/save_before_running"))) { @@ -4102,8 +4116,15 @@ void EditorNode::_pick_main_scene_custom_action(const String &p_custom_action_na } pick_main_scene->hide(); - current_menu_option = SETTINGS_PICK_MAIN_SCENE; - _dialog_action(scene->get_scene_file_path()); + + if (!FileAccess::exists(scene->get_scene_file_path())) { + current_menu_option = FILE_SAVE_AND_RUN_MAIN_SCENE; + _menu_option_confirm(FILE_SAVE_AS_SCENE, true); + file->set_title(TTR("Save scene before running...")); + } else { + current_menu_option = SETTINGS_PICK_MAIN_SCENE; + _dialog_action(scene->get_scene_file_path()); + } } } @@ -6130,7 +6151,7 @@ EditorNode::EditorNode() { rmp.instantiate(); EditorInspector::add_inspector_plugin(rmp); - Ref<EditorInspectorShaderModePlugin> smp; + Ref<EditorInspectorVisualShaderModePlugin> smp; smp.instantiate(); EditorInspector::add_inspector_plugin(smp); } diff --git a/editor/editor_node.h b/editor/editor_node.h index 0201e84eaf..771eaf6a68 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -141,6 +141,7 @@ private: FILE_SAVE_AS_SCENE, FILE_SAVE_ALL_SCENES, FILE_SAVE_AND_RUN, + FILE_SAVE_AND_RUN_MAIN_SCENE, FILE_SHOW_IN_FILESYSTEM, FILE_EXPORT_PROJECT, FILE_EXPORT_MESH_LIBRARY, diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 566c22f5a9..400ad1ebac 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -445,7 +445,7 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C CanvasItemEditor::get_singleton()->get_bottom_split()->add_child(p_control); } break; - case CONTAINER_PROPERTY_EDITOR_BOTTOM: { + case CONTAINER_INSPECTOR_BOTTOM: { InspectorDock::get_singleton()->get_addon_area()->add_child(p_control); } break; @@ -498,7 +498,7 @@ void EditorPlugin::remove_control_from_container(CustomControlContainer p_locati CanvasItemEditor::get_singleton()->get_bottom_split()->remove_child(p_control); } break; - case CONTAINER_PROPERTY_EDITOR_BOTTOM: { + case CONTAINER_INSPECTOR_BOTTOM: { InspectorDock::get_singleton()->get_addon_area()->remove_child(p_control); } break; @@ -950,7 +950,7 @@ void EditorPlugin::_bind_methods() { BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE_LEFT); BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE_RIGHT); BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_BOTTOM); - BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM); + BIND_ENUM_CONSTANT(CONTAINER_INSPECTOR_BOTTOM); BIND_ENUM_CONSTANT(CONTAINER_PROJECT_SETTING_TAB_LEFT); BIND_ENUM_CONSTANT(CONTAINER_PROJECT_SETTING_TAB_RIGHT); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index 84c63d1021..3f9d276b6a 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -184,7 +184,7 @@ public: CONTAINER_CANVAS_EDITOR_SIDE_LEFT, CONTAINER_CANVAS_EDITOR_SIDE_RIGHT, CONTAINER_CANVAS_EDITOR_BOTTOM, - CONTAINER_PROPERTY_EDITOR_BOTTOM, + CONTAINER_INSPECTOR_BOTTOM, CONTAINER_PROJECT_SETTING_TAB_LEFT, CONTAINER_PROJECT_SETTING_TAB_RIGHT, }; diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index b4d3973705..ab1586cb77 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -1176,5 +1176,23 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags } } +bool EditorExportPlatform::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { + String templates_error; + bool valid_export_configuration = has_valid_export_configuration(p_preset, templates_error, r_missing_templates); + + String project_configuration_error; + bool valid_project_configuration = has_valid_project_configuration(p_preset, project_configuration_error); + + if (!templates_error.is_empty()) { + r_error += templates_error; + } + + if (!project_configuration_error.is_empty()) { + r_error += project_configuration_error; + } + + return valid_export_configuration && valid_project_configuration; +} + EditorExportPlatform::EditorExportPlatform() { } diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h index ad1bcc1996..c870ee66aa 100644 --- a/editor/export/editor_export_platform.h +++ b/editor/export/editor_export_platform.h @@ -200,7 +200,9 @@ public: virtual Ref<Texture2D> get_run_icon() const { return get_logo(); } String test_etc2() const; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0; + bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const = 0; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const = 0; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const = 0; virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) = 0; diff --git a/editor/export/editor_export_platform_pc.cpp b/editor/export/editor_export_platform_pc.cpp index 5e0044f2ae..9fca4c908a 100644 --- a/editor/export/editor_export_platform_pc.cpp +++ b/editor/export/editor_export_platform_pc.cpp @@ -75,7 +75,7 @@ Ref<Texture2D> EditorExportPlatformPC::get_logo() const { return logo; } -bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformPC::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err; bool valid = false; @@ -106,6 +106,10 @@ bool EditorExportPlatformPC::can_export(const Ref<EditorExportPreset> &p_preset, return valid; } +bool EditorExportPlatformPC::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + return true; +} + Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags); diff --git a/editor/export/editor_export_platform_pc.h b/editor/export/editor_export_platform_pc.h index bdb86e924a..cf96db6c2d 100644 --- a/editor/export/editor_export_platform_pc.h +++ b/editor/export/editor_export_platform_pc.h @@ -52,7 +52,8 @@ public: virtual String get_os_name() const override; virtual Ref<Texture2D> get_logo() const override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; virtual Error sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path); virtual String get_template_file_name(const String &p_target, const String &p_arch) const = 0; diff --git a/editor/icons/DefaultProjectIcon.svg b/editor/icons/DefaultProjectIcon.svg index f81ba4d390..adc26df6c2 100644 --- a/editor/icons/DefaultProjectIcon.svg +++ b/editor/icons/DefaultProjectIcon.svg @@ -1 +1 @@ -<svg height="64" viewBox="0 0 64 64" width="64" xmlns="http://www.w3.org/2000/svg"><g stroke-linejoin="round"><path d="m8 0c-4.432 0-8 3.568-8 8v48c0 4.432 3.568 8 8 8h48c4.432 0 8-3.568 8-8v-48c0-4.432-3.568-8-8-8z" fill="#355570" stroke-linecap="round" stroke-width="2"/><path d="m8 0c-4.432 0-8 3.568-8 8v48c0 4.432 3.568 8 8 8h48c4.432 0 8-3.568 8-8v-48c0-4.432-3.568-8-8-8zm0 2h48c3.324 0 6 2.676 6 6v48c0 3.324-2.676 6-6 6h-48c-3.324 0-6-2.676-6-6v-48c0-3.324 2.676-6 6-6z" fill-opacity=".19608" stroke-linecap="round" stroke-width="2"/><path d="m27.254 10c-2.1314.47383-4.2401 1.134-6.2168 2.1289.04521 1.7455.15796 3.4164.38672 5.1152-.76768.4919-1.574.91443-2.291 1.4902-.72854.5604-1.4731 1.0965-2.1328 1.752-1.3179-.8716-2.7115-1.691-4.1484-2.4141-1.549 1.667-2.9985 3.4672-4.1816 5.4805.89011 1.4399 1.8209 2.7894 2.8242 4.0703h.027343v9.9453 1.2617 1.1504l-.009765 1.6309h-.001953c.0031.7321.011718 1.5356.011718 1.6953 0 7.1942 9.1264 10.652 20.465 10.691h.013672.013672c11.338-.04 20.461-3.4972 20.461-10.691 0-.1626.010282-.96271.013672-1.6953h-.001953l-.011719-1.6309v-.98633l.003907-.001953v-11.369h.027343c1.0035-1.2809 1.9337-2.6304 2.8242-4.0703-1.1827-2.0133-2.6327-3.8135-4.1816-5.4805-1.4366.7231-2.8325 1.5425-4.1504 2.4141-.65947-.6555-1.4013-1.1916-2.1309-1.752-.71682-.5758-1.5248-.99833-2.291-1.4902.22813-1.6988.3413-3.3697.38672-5.1152-1.977-.99494-4.0863-1.6551-6.2188-2.1289-.85139 1.4309-1.6285 2.9812-2.3066 4.4961-.80409-.1344-1.613-.18571-2.4219-.19531h-.015625-.015625c-.81037.01-1.6176.060513-2.4219.19531-.67768-1.5149-1.4559-3.0652-2.3086-4.4961z" fill="#fff" stroke="#fff" stroke-width="3"/></g><g stroke-width=".32031" transform="matrix(.050279 0 0 .050279 6.2574 1.18)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.1626 0 0 -4.1626 919.24 771.67)"/><path d="m0 0v-59.041c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325h.134c4.795 6.12 9.232 12.569 13.487 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.253-6.88 8.693-13.329 13.487-19.449z" fill="#478cbf" transform="matrix(4.1626 0 0 -4.1626 104.7 525.91)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.133c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.1626 0 0 -4.1626 784.07 817.24)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.1626 0 0 -4.1626 389.21 625.67)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.1626 0 0 -4.1626 367.37 631.06)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.1626 0 0 -4.1626 511.99 724.74)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.1626 0 0 -4.1626 634.79 625.67)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.1626 0 0 -4.1626 656.64 631.06)"/></g></svg> +<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg> diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 2e6de95a46..b301bbf0f9 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -139,7 +139,7 @@ void ResourceImporterLayeredTexture::get_import_options(const String &p_path, Li r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "compress/lossy_quality", PROPERTY_HINT_RANGE, "0,1,0.01"), 0.7)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/hdr_compression", PROPERTY_HINT_ENUM, "Disabled,Opaque Only,Always"), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/bptc_ldr", PROPERTY_HINT_ENUM, "Disabled,Enabled,RGBA Only"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/channel_pack", PROPERTY_HINT_ENUM, "sRGB Friendly,Optimized"), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "compress/channel_pack", PROPERTY_HINT_ENUM, "sRGB Friendly,Optimized,Normal Map (RG Channels)"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "mipmaps/generate"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "mipmaps/limit", PROPERTY_HINT_RANGE, "-1,256"), -1)); @@ -250,7 +250,7 @@ void ResourceImporterLayeredTexture::_save_tex(Vector<Ref<Image>> p_images, cons } if (p_mipmaps) { - p_images.write[i]->generate_mipmaps(); + p_images.write[i]->generate_mipmaps(p_csource == Image::COMPRESS_SOURCE_NORMAL); } else { p_images.write[i]->clear_mipmaps(); } @@ -354,6 +354,9 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const Image::CompressSource csource = Image::COMPRESS_SOURCE_GENERIC; if (channel_pack == 0) { csource = Image::COMPRESS_SOURCE_SRGB; + } else if (channel_pack == 2) { + // force normal + csource = Image::COMPRESS_SOURCE_NORMAL; } Image::UsedChannels used_channels = image->detect_used_channels(csource); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 74ce5ef128..d70c50f72a 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -47,6 +47,50 @@ #include "servers/rendering/shader_preprocessor.h" #include "servers/rendering/shader_types.h" +/*** SHADER SYNTAX HIGHLIGHTER ****/ + +Dictionary GDShaderSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) { + Dictionary color_map; + + for (const Point2i ®ion : disabled_branch_regions) { + if (p_line >= region.x && p_line <= region.y) { + Dictionary highlighter_info; + highlighter_info["color"] = disabled_branch_color; + + color_map[0] = highlighter_info; + return color_map; + } + } + + return CodeHighlighter::_get_line_syntax_highlighting_impl(p_line); +} + +void GDShaderSyntaxHighlighter::add_disabled_branch_region(const Point2i &p_region) { + ERR_FAIL_COND(p_region.x < 0); + ERR_FAIL_COND(p_region.y < 0); + + for (int i = 0; i < disabled_branch_regions.size(); i++) { + ERR_FAIL_COND_MSG(disabled_branch_regions[i].x == p_region.x, "Branch region with a start line '" + itos(p_region.x) + "' already exists."); + } + + Point2i disabled_branch_region; + disabled_branch_region.x = p_region.x; + disabled_branch_region.y = p_region.y; + disabled_branch_regions.push_back(disabled_branch_region); + + clear_highlighting_cache(); +} + +void GDShaderSyntaxHighlighter::clear_disabled_branch_regions() { + disabled_branch_regions.clear(); + clear_highlighting_cache(); +} + +void GDShaderSyntaxHighlighter::set_disabled_branch_color(const Color &p_color) { + disabled_branch_color = p_color; + clear_highlighting_cache(); +} + /*** SHADER SCRIPT EDITOR ****/ static bool saved_warnings_enabled = false; @@ -264,6 +308,7 @@ void ShaderTextEditor::_load_theme_settings() { syntax_highlighter->clear_color_regions(); syntax_highlighter->add_color_region("/*", "*/", comment_color, false); syntax_highlighter->add_color_region("//", "", comment_color, true); + syntax_highlighter->set_disabled_branch_color(comment_color); text_editor->clear_comment_delimiters(); text_editor->add_comment_delimiter("/*", "*/", false); @@ -346,7 +391,7 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptLa if (!complete_from_path.ends_with("/")) { complete_from_path += "/"; } - preprocessor.preprocess(p_code, code, nullptr, nullptr, nullptr, &pp_options, _complete_include_paths); + preprocessor.preprocess(p_code, "", code, nullptr, nullptr, nullptr, nullptr, &pp_options, _complete_include_paths); complete_from_path = String(); if (pp_options.size()) { for (const ScriptLanguage::CodeCompletionOption &E : pp_options) { @@ -392,11 +437,29 @@ void ShaderTextEditor::_validate_script() { String code_pp; String error_pp; List<ShaderPreprocessor::FilePosition> err_positions; - last_compile_result = preprocessor.preprocess(code, code_pp, &error_pp, &err_positions); + List<ShaderPreprocessor::Region> regions; + String filename; + if (shader.is_valid()) { + filename = shader->get_path(); + } else if (shader_inc.is_valid()) { + filename = shader_inc->get_path(); + } + last_compile_result = preprocessor.preprocess(code, filename, code_pp, &error_pp, &err_positions, ®ions); for (int i = 0; i < get_text_editor()->get_line_count(); i++) { get_text_editor()->set_line_background_color(i, Color(0, 0, 0, 0)); } + + syntax_highlighter->clear_disabled_branch_regions(); + for (const ShaderPreprocessor::Region ®ion : regions) { + if (!region.enabled) { + if (filename != region.file) { + continue; + } + syntax_highlighter->add_disabled_branch_region(Point2i(region.from_line, region.to_line)); + } + } + set_error(""); set_error_count(0); diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index 9a59e86192..0980cc4db2 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -48,6 +48,21 @@ class VisualShaderEditor; class HSplitContainer; class ShaderCreateDialog; +class GDShaderSyntaxHighlighter : public CodeHighlighter { + GDCLASS(GDShaderSyntaxHighlighter, CodeHighlighter) + +private: + Vector<Point2i> disabled_branch_regions; + Color disabled_branch_color; + +public: + virtual Dictionary _get_line_syntax_highlighting_impl(int p_line) override; + + void add_disabled_branch_region(const Point2i &p_region); + void clear_disabled_branch_regions(); + void set_disabled_branch_color(const Color &p_color); +}; + class ShaderTextEditor : public CodeTextEditor { GDCLASS(ShaderTextEditor, CodeTextEditor); @@ -57,7 +72,7 @@ class ShaderTextEditor : public CodeTextEditor { _ALWAYS_INLINE_ bool operator()(const ShaderWarning &p_a, const ShaderWarning &p_b) const { return (p_a.get_line() < p_b.get_line()); } }; - Ref<CodeHighlighter> syntax_highlighter; + Ref<GDShaderSyntaxHighlighter> syntax_highlighter; RichTextLabel *warnings_panel = nullptr; Ref<Shader> shader; Ref<ShaderInclude> shader_inc; diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 4a144bc391..cf24095582 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -6063,7 +6063,7 @@ Control *VisualShaderNodePluginDefault::create_editor(const Ref<Resource> &p_par return editor; } -void EditorPropertyShaderMode::_option_selected(int p_which) { +void EditorPropertyVisualShaderMode::_option_selected(int p_which) { Ref<VisualShader> visual_shader(Object::cast_to<VisualShader>(get_edited_object())); if (visual_shader->get_mode() == p_which) { return; @@ -6149,39 +6149,39 @@ void EditorPropertyShaderMode::_option_selected(int p_which) { undo_redo->commit_action(); } -void EditorPropertyShaderMode::update_property() { +void EditorPropertyVisualShaderMode::update_property() { int which = get_edited_object()->get(get_edited_property()); options->select(which); } -void EditorPropertyShaderMode::setup(const Vector<String> &p_options) { +void EditorPropertyVisualShaderMode::setup(const Vector<String> &p_options) { for (int i = 0; i < p_options.size(); i++) { options->add_item(p_options[i], i); } } -void EditorPropertyShaderMode::set_option_button_clip(bool p_enable) { +void EditorPropertyVisualShaderMode::set_option_button_clip(bool p_enable) { options->set_clip_text(p_enable); } -void EditorPropertyShaderMode::_bind_methods() { +void EditorPropertyVisualShaderMode::_bind_methods() { } -EditorPropertyShaderMode::EditorPropertyShaderMode() { +EditorPropertyVisualShaderMode::EditorPropertyVisualShaderMode() { options = memnew(OptionButton); options->set_clip_text(true); add_child(options); add_focusable(options); - options->connect("item_selected", callable_mp(this, &EditorPropertyShaderMode::_option_selected)); + options->connect("item_selected", callable_mp(this, &EditorPropertyVisualShaderMode::_option_selected)); } -bool EditorInspectorShaderModePlugin::can_handle(Object *p_object) { +bool EditorInspectorVisualShaderModePlugin::can_handle(Object *p_object) { return true; // Can handle everything. } -bool EditorInspectorShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { +bool EditorInspectorVisualShaderModePlugin::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) { if (p_path == "mode" && p_object->is_class("VisualShader") && p_type == Variant::INT) { - EditorPropertyShaderMode *mode_editor = memnew(EditorPropertyShaderMode); + EditorPropertyVisualShaderMode *mode_editor = memnew(EditorPropertyVisualShaderMode); Vector<String> options = p_hint_text.split(","); mode_editor->setup(options); add_property_editor(p_path, mode_editor); diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index b846c34f9e..b6a3b43754 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -529,8 +529,8 @@ public: virtual Control *create_editor(const Ref<Resource> &p_parent_resource, const Ref<VisualShaderNode> &p_node) override; }; -class EditorPropertyShaderMode : public EditorProperty { - GDCLASS(EditorPropertyShaderMode, EditorProperty); +class EditorPropertyVisualShaderMode : public EditorProperty { + GDCLASS(EditorPropertyVisualShaderMode, EditorProperty); OptionButton *options = nullptr; void _option_selected(int p_which); @@ -542,11 +542,11 @@ public: void setup(const Vector<String> &p_options); virtual void update_property() override; void set_option_button_clip(bool p_enable); - EditorPropertyShaderMode(); + EditorPropertyVisualShaderMode(); }; -class EditorInspectorShaderModePlugin : public EditorInspectorPlugin { - GDCLASS(EditorInspectorShaderModePlugin, EditorInspectorPlugin); +class EditorInspectorVisualShaderModePlugin : public EditorInspectorPlugin { + GDCLASS(EditorInspectorVisualShaderModePlugin, EditorInspectorPlugin); public: virtual bool can_handle(Object *p_object) override; diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index 6c544e4437..5ce837f862 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -516,6 +516,7 @@ static const char *gdscript_function_renames[][2] = { { "set_region_filter_clip", "set_region_filter_clip_enabled" }, // Sprite2D { "set_rotate", "set_rotates" }, // PathFollow2D { "set_scancode", "set_keycode" }, // InputEventKey + { "set_shader_param", "set_shader_uniform" }, // ShaderMaterial { "set_shift", "set_shift_pressed" }, // InputEventWithModifiers { "set_size_override", "set_size_2d_override" }, // SubViewport broke ImageTexture { "set_size_override_stretch", "set_size_2d_override_stretch" }, // SubViewport @@ -1618,6 +1619,7 @@ public: RegEx reg_image_lock = RegEx("([a-zA-Z0-9_\\.]+)\\.lock\\(\\)"); RegEx reg_image_unlock = RegEx("([a-zA-Z0-9_\\.]+)\\.unlock\\(\\)"); RegEx reg_os_fullscreen = RegEx("OS.window_fullscreen[= ]+([^#^\n]+)"); + RegEx reg_instantiate = RegEx("\\.instance\\(([^\\)]*)\\)"); }; // Function responsible for converting project @@ -1690,7 +1692,6 @@ int ProjectConverter3To4::convert() { rename_common(builtin_types_renames, file_content); custom_rename(file_content, "\\.shader", ".gdshader"); - custom_rename(file_content, "instance", "instantiate"); } else if (file_name.ends_with(".tscn")) { rename_classes(file_content); // Using only specialized function @@ -1835,7 +1836,6 @@ int ProjectConverter3To4::validate_conversion() { changed_elements.append_array(check_for_rename_common(shaders_renames, file_content)); changed_elements.append_array(check_for_rename_common(builtin_types_renames, file_content)); - changed_elements.append_array(check_for_custom_rename(file_content, "instance", "instantiate")); changed_elements.append_array(check_for_custom_rename(file_content, "\\.shader", ".gdshader")); } else if (file_name.ends_with(".tscn")) { changed_elements.append_array(check_for_rename_classes(file_content)); @@ -2188,6 +2188,15 @@ bool ProjectConverter3To4::test_conversion(const RegExContainer ®_container) } valid = valid & (got == expected); } +{ + String base = "var node = $world/ukraine/lviv."; + String expected = "$world/ukraine/lviv."; + String got = get_object_of_execution(base); + if (got != expected) { + ERR_PRINT("Failed to get proper data from get_object_of_execution `" + base + "` should return `" + expected + "`(" + itos(expected.size()) + "), got instead `" + got + "`(" + itos(got.size()) + ")"); + } + valid = valid & (got == expected); +} } // get_starting_space { @@ -2539,22 +2548,43 @@ String ProjectConverter3To4::get_starting_space(const String &line) const { // so it is `var roman = kieliszek.` and this function return `kieliszek.` String ProjectConverter3To4::get_object_of_execution(const String &line) const { int end = line.size() - 1; // Last one is \0 + int variable_start = end - 1; int start = end - 1; + bool is_possibly_nodepath = false; + bool is_valid_nodepath = false; + while (start >= 0) { char32_t character = line[start]; - if ((character >= 'A' && character <= 'Z') || (character >= 'a' && character <= 'z') || character == '.' || character == '_') { + bool is_variable_char = (character >= 'A' && character <= 'Z') || (character >= 'a' && character <= 'z') || character == '.' || character == '_'; + bool is_nodepath_start = character == '$'; + bool is_nodepath_sep = character == '/'; + if (is_variable_char || is_nodepath_start || is_nodepath_sep) { if (start == 0) { break; + } else if (is_nodepath_sep) { + // Freeze variable_start, try to fetch more chars since this might be node path literal + is_possibly_nodepath = true; + } else if (is_nodepath_start) { + // Found $, this is a node path literal + is_valid_nodepath = true; + break; + } + if (!is_possibly_nodepath) { + variable_start--; } start--; continue; } else { - start++; // Found invalid character, needs to be ignored + // Abandon all hope, this is neither a variable nor a node path literal + variable_start++; // Found invalid character, needs to be ignored break; } } - return line.substr(start, (end - start)); + if (is_valid_nodepath) { + variable_start = start; + } + return line.substr(variable_start, (end - variable_start)); } void ProjectConverter3To4::rename_enums(String &file_content) { @@ -2775,6 +2805,9 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai line = reg_container.reg_os_fullscreen.sub(line, "ProjectSettings.set(\"display/window/size/fullscreen\", $1)", true); } + // Instantiate + line = reg_container.reg_instantiate.sub(line, ".instantiate($1)", true); + // -- r.move_and_slide( a, b, c, d, e ) -> r.set_velocity(a) ... r.move_and_slide() KinematicBody if (line.find("move_and_slide(") != -1) { int start = line.find("move_and_slide("); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 21891e381b..9d2dcd129c 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1164,6 +1164,12 @@ void ProjectList::load_project_icon(int p_index) { icon = default_icon; } + // The default project icon is 128×128 to look crisp on hiDPI displays, + // but we want the actual displayed size to be 64×64 on loDPI displays. + item.control->icon->set_ignore_texture_size(true); + item.control->icon->set_custom_minimum_size(Size2(64, 64) * EDSCALE); + item.control->icon->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); + item.control->icon->set_texture(icon); item.control->icon_needs_reload = false; } diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp index bd1f2529ca..8c4a231e8a 100644 --- a/editor/shader_create_dialog.cpp +++ b/editor/shader_create_dialog.cpp @@ -37,6 +37,13 @@ #include "scene/resources/visual_shader.h" #include "servers/rendering/shader_types.h" +enum ShaderType { + SHADER_TYPE_TEXT, + SHADER_TYPE_VISUAL, + SHADER_TYPE_INC, + SHADER_TYPE_MAX, +}; + void ShaderCreateDialog::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { diff --git a/editor/shader_create_dialog.h b/editor/shader_create_dialog.h index bf031c3601..9ba655369b 100644 --- a/editor/shader_create_dialog.h +++ b/editor/shader_create_dialog.h @@ -44,13 +44,6 @@ class EditorFileDialog; class ShaderCreateDialog : public ConfirmationDialog { GDCLASS(ShaderCreateDialog, ConfirmationDialog); - enum ShaderType { - SHADER_TYPE_TEXT, - SHADER_TYPE_VISUAL, - SHADER_TYPE_INC, - SHADER_TYPE_MAX, - }; - struct ShaderTypeData { List<String> extensions; String default_extension; diff --git a/main/main.cpp b/main/main.cpp index 965fcc66c6..6559b69f2e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -161,7 +161,7 @@ static DisplayServer::WindowMode window_mode = DisplayServer::WINDOW_MODE_WINDOW static DisplayServer::ScreenOrientation window_orientation = DisplayServer::SCREEN_LANDSCAPE; static DisplayServer::VSyncMode window_vsync_mode = DisplayServer::VSYNC_ENABLED; static uint32_t window_flags = 0; -static Size2i window_size = Size2i(1024, 600); +static Size2i window_size = Size2i(1152, 648); static int init_screen = -1; static bool init_fullscreen = false; @@ -1997,10 +1997,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) { GLOBAL_DEF_RST("internationalization/rendering/text_driver", ""); String text_driver_options; for (int i = 0; i < TextServerManager::get_singleton()->get_interface_count(); i++) { - if (i > 0) { + const String driver_name = TextServerManager::get_singleton()->get_interface(i)->get_name(); + if (driver_name == "Dummy") { + // Dummy text driver cannot draw any text, making the editor unusable if selected. + continue; + } + if (!text_driver_options.is_empty() && text_driver_options.find(",") == -1) { + // Not the first option; add a comma before it as a separator for the property hint. text_driver_options += ","; } - text_driver_options += TextServerManager::get_singleton()->get_interface(i)->get_name(); + text_driver_options += driver_name; } ProjectSettings::get_singleton()->set_custom_property_info("internationalization/rendering/text_driver", PropertyInfo(Variant::STRING, "internationalization/rendering/text_driver", PROPERTY_HINT_ENUM, text_driver_options)); diff --git a/methods.py b/methods.py index 82c19f09e3..ba7474ea02 100644 --- a/methods.py +++ b/methods.py @@ -420,6 +420,7 @@ def use_windows_spawn_fix(self, platform=None): startupinfo=startupinfo, shell=False, env=env, + text=True, ) _, err = proc.communicate() rv = proc.wait() diff --git a/modules/gltf/doc_classes/GLTFLight.xml b/modules/gltf/doc_classes/GLTFLight.xml index 354cd48a06..db2dfb487a 100644 --- a/modules/gltf/doc_classes/GLTFLight.xml +++ b/modules/gltf/doc_classes/GLTFLight.xml @@ -1,10 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GLTFLight" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <brief_description> + Represents a GLTF light. </brief_description> <description> + Represents a light as defined by the [code]KHR_lights_punctual[/code] GLTF extension. </description> <tutorials> + <link title="KHR_lights_punctual GLTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual</link> </tutorials> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> diff --git a/modules/gltf/doc_classes/GLTFSpecGloss.xml b/modules/gltf/doc_classes/GLTFSpecGloss.xml index 8433cf8dd7..8882e48257 100644 --- a/modules/gltf/doc_classes/GLTFSpecGloss.xml +++ b/modules/gltf/doc_classes/GLTFSpecGloss.xml @@ -1,21 +1,29 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GLTFSpecGloss" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> <brief_description> + Archived GLTF extension for specular/glossy materials. </brief_description> <description> + KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. </description> <tutorials> + <link title="KHR_materials_pbrSpecularGlossiness GLTF extension spec">https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness</link> </tutorials> <members> <member name="diffuse_factor" type="Color" setter="set_diffuse_factor" getter="get_diffuse_factor" default="Color(1, 1, 1, 1)"> + The reflected diffuse factor of the material. </member> <member name="diffuse_img" type="Image" setter="set_diffuse_img" getter="get_diffuse_img"> + The diffuse texture. </member> <member name="gloss_factor" type="float" setter="set_gloss_factor" getter="get_gloss_factor" default="1.0"> + The glossiness or smoothness of the material. </member> <member name="spec_gloss_img" type="Image" setter="set_spec_gloss_img" getter="get_spec_gloss_img"> + The specular-glossiness texture. </member> <member name="specular_factor" type="Color" setter="set_specular_factor" getter="get_specular_factor" default="Color(1, 1, 1, 1)"> + The specular RGB color of the material. The alpha channel is unused. </member> </members> </class> diff --git a/modules/gltf/extensions/gltf_light.h b/modules/gltf/extensions/gltf_light.h index 58fa299dfd..f0765a1bbc 100644 --- a/modules/gltf/extensions/gltf_light.h +++ b/modules/gltf/extensions/gltf_light.h @@ -35,6 +35,8 @@ #include "core/io/resource.h" #include "scene/3d/light_3d.h" +// https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual + class GLTFLight : public Resource { GDCLASS(GLTFLight, Resource) friend class GLTFDocument; diff --git a/modules/gltf/extensions/gltf_spec_gloss.h b/modules/gltf/extensions/gltf_spec_gloss.h index a45fa4296c..2b4d3ee609 100644 --- a/modules/gltf/extensions/gltf_spec_gloss.h +++ b/modules/gltf/extensions/gltf_spec_gloss.h @@ -34,6 +34,11 @@ #include "core/io/image.h" #include "core/io/resource.h" +// KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. +// This means that it is deprecated and not recommended for new files. +// However, it is still supported for loading old files. +// https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness + class GLTFSpecGloss : public Resource { GDCLASS(GLTFSpecGloss, Resource); friend class GLTFDocument; diff --git a/modules/openxr/doc_classes/OpenXRAction.xml b/modules/openxr/doc_classes/OpenXRAction.xml index 6ff8c1ad26..d1a2ce2d2e 100644 --- a/modules/openxr/doc_classes/OpenXRAction.xml +++ b/modules/openxr/doc_classes/OpenXRAction.xml @@ -5,7 +5,7 @@ </brief_description> <description> This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics). - OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return [code]false[/core] if the trigger is depressed and [code]true[/code] if pressed fully. + OpenXR performs automatic conversion between action type and input type whenever possible. An analogue trigger bound to a boolean action will thus return [code]false[/code] if the trigger is depressed and [code]true[/code] if pressed fully. Actions are not directly bound to specific devices, instead OpenXR recognises a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the [url=https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-reserved]reserved path section in the OpenXR specification[/url] for more info on the top level paths. Note that the name of the resource is used to register the action with. </description> diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 6f1b4bde40..685b1f01af 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -248,6 +248,7 @@ static const char *AAB_ASSETS_DIRECTORY = "res://android/build/assetPacks/instal static const int DEFAULT_MIN_SDK_VERSION = 19; // Should match the value in 'platform/android/java/app/config.gradle#minSdk' static const int DEFAULT_TARGET_SDK_VERSION = 32; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk' +#ifndef ANDROID_ENABLED void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { EditorExportPlatformAndroid *ea = static_cast<EditorExportPlatformAndroid *>(ud); @@ -277,7 +278,6 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { } } -#ifndef ANDROID_ENABLED // Check for devices updates String adb = get_adb_path(); if (FileAccess::exists(adb)) { @@ -389,7 +389,6 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { ea->devices_changed.set(); } } -#endif uint64_t sleep = 200; uint64_t wait = 3000000; @@ -402,7 +401,6 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { } } -#ifndef ANDROID_ENABLED if (EditorSettings::get_singleton()->get("export/android/shutdown_adb_on_exit")) { String adb = get_adb_path(); if (!FileAccess::exists(adb)) { @@ -413,8 +411,8 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) { args.push_back("kill-server"); OS::get_singleton()->execute(adb, args); } -#endif } +#endif String EditorExportPlatformAndroid::get_project_name(const String &p_name) const { String aname; @@ -2049,7 +2047,7 @@ String EditorExportPlatformAndroid::get_apksigner_path() { return apksigner_path; } -bool EditorExportPlatformAndroid::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err; bool valid = false; const bool custom_build_enabled = p_preset->get("custom_build/use_custom_build"); @@ -2097,7 +2095,7 @@ bool EditorExportPlatformAndroid::can_export(const Ref<EditorExportPreset> &p_pr valid = installed_android_build_template && !r_missing_templates; } - // Validate the rest of the configuration. + // Validate the rest of the export configuration. String dk = p_preset->get("keystore/debug"); String dk_user = p_preset->get("keystore/debug_user"); @@ -2173,6 +2171,19 @@ bool EditorExportPlatformAndroid::can_export(const Ref<EditorExportPreset> &p_pr } } + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformAndroid::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + String err; + bool valid = true; + const bool custom_build_enabled = p_preset->get("custom_build/use_custom_build"); + + // Validate the project configuration. bool apk_expansion = p_preset->get("apk_expansion/enable"); if (apk_expansion) { @@ -3125,10 +3136,14 @@ EditorExportPlatformAndroid::EditorExportPlatformAndroid() { devices_changed.set(); plugins_changed.set(); +#ifndef ANDROID_ENABLED check_for_changes_thread.start(_check_for_changes_poll_thread, this); +#endif } EditorExportPlatformAndroid::~EditorExportPlatformAndroid() { +#ifndef ANDROID_ENABLED quit_request.set(); check_for_changes_thread.wait_to_finish(); +#endif } diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h index 1da3f68f9a..46012bd46c 100644 --- a/platform/android/export/export_plugin.h +++ b/platform/android/export/export_plugin.h @@ -80,10 +80,12 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { Vector<Device> devices; SafeFlag devices_changed; Mutex device_lock; +#ifndef ANDROID_ENABLED Thread check_for_changes_thread; SafeFlag quit_request; static void _check_for_changes_poll_thread(void *ud); +#endif String get_project_name(const String &p_name) const; @@ -186,7 +188,8 @@ public: static String get_apksigner_path(); - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; diff --git a/platform/android/file_access_filesystem_jandroid.cpp b/platform/android/file_access_filesystem_jandroid.cpp index 6b21c18d59..56561cb616 100644 --- a/platform/android/file_access_filesystem_jandroid.cpp +++ b/platform/android/file_access_filesystem_jandroid.cpp @@ -46,6 +46,7 @@ jmethodID FileAccessFilesystemJAndroid::_file_seek_end = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_read = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_tell = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_eof = nullptr; +jmethodID FileAccessFilesystemJAndroid::_file_set_eof = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_close = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_write = nullptr; jmethodID FileAccessFilesystemJAndroid::_file_flush = nullptr; @@ -162,6 +163,16 @@ bool FileAccessFilesystemJAndroid::eof_reached() const { } } +void FileAccessFilesystemJAndroid::_set_eof(bool eof) { + if (_file_set_eof) { + ERR_FAIL_COND_MSG(!is_open(), "File must be opened before use."); + + JNIEnv *env = get_jni_env(); + ERR_FAIL_COND(env == nullptr); + env->CallVoidMethod(file_access_handler, _file_set_eof, id, eof); + } +} + uint8_t FileAccessFilesystemJAndroid::get_8() const { ERR_FAIL_COND_V_MSG(!is_open(), 0, "File must be opened before use."); uint8_t byte; @@ -184,6 +195,7 @@ String FileAccessFilesystemJAndroid::get_line() const { while (true) { size_t line_buffer_size = MIN(buffer_size_limit, file_size - get_position()); if (line_buffer_size <= 0) { + const_cast<FileAccessFilesystemJAndroid *>(this)->_set_eof(true); break; } @@ -310,6 +322,7 @@ void FileAccessFilesystemJAndroid::setup(jobject p_file_access_handler) { _file_get_size = env->GetMethodID(cls, "fileGetSize", "(I)J"); _file_tell = env->GetMethodID(cls, "fileGetPosition", "(I)J"); _file_eof = env->GetMethodID(cls, "isFileEof", "(I)Z"); + _file_set_eof = env->GetMethodID(cls, "setFileEof", "(IZ)V"); _file_seek = env->GetMethodID(cls, "fileSeek", "(IJ)V"); _file_seek_end = env->GetMethodID(cls, "fileSeekFromEnd", "(IJ)V"); _file_read = env->GetMethodID(cls, "fileRead", "(ILjava/nio/ByteBuffer;)I"); diff --git a/platform/android/file_access_filesystem_jandroid.h b/platform/android/file_access_filesystem_jandroid.h index 7deb8de37b..76d7db6e3a 100644 --- a/platform/android/file_access_filesystem_jandroid.h +++ b/platform/android/file_access_filesystem_jandroid.h @@ -44,6 +44,7 @@ class FileAccessFilesystemJAndroid : public FileAccess { static jmethodID _file_seek_end; static jmethodID _file_tell; static jmethodID _file_eof; + static jmethodID _file_set_eof; static jmethodID _file_read; static jmethodID _file_write; static jmethodID _file_flush; @@ -56,6 +57,7 @@ class FileAccessFilesystemJAndroid : public FileAccess { String path_src; void _close(); ///< close a file + void _set_eof(bool eof); public: virtual Error _open(const String &p_path, int p_mode_flags) override; ///< open a file diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/DataAccess.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/DataAccess.kt index 463dabfb23..f23537a29e 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/DataAccess.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/DataAccess.kt @@ -104,7 +104,6 @@ internal abstract class DataAccess(private val filePath: String) { protected abstract val fileChannel: FileChannel internal var endOfFile = false - private set fun close() { try { @@ -125,9 +124,7 @@ internal abstract class DataAccess(private val filePath: String) { fun seek(position: Long) { try { fileChannel.position(position) - if (position <= size()) { - endOfFile = false - } + endOfFile = position >= fileChannel.size() } catch (e: Exception) { Log.w(TAG, "Exception when seeking file $filePath.", e) } @@ -161,8 +158,7 @@ internal abstract class DataAccess(private val filePath: String) { fun read(buffer: ByteBuffer): Int { return try { val readBytes = fileChannel.read(buffer) - endOfFile = readBytes == -1 - || (fileChannel.position() >= fileChannel.size() && fileChannel.size() > 0) + endOfFile = readBytes == -1 || (fileChannel.position() >= fileChannel.size()) if (readBytes == -1) { 0 } else { diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileAccessHandler.kt b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileAccessHandler.kt index 04b6772c45..83da3a24b3 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/io/file/FileAccessHandler.kt +++ b/platform/android/java/lib/src/org/godotengine/godot/io/file/FileAccessHandler.kt @@ -194,6 +194,11 @@ class FileAccessHandler(val context: Context) { return files[fileId].endOfFile } + fun setFileEof(fileId: Int, eof: Boolean) { + val file = files[fileId] ?: return + file.endOfFile = eof + } + fun fileClose(fileId: Int) { if (hasFileId(fileId)) { files[fileId].close() diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index 001c9b803d..425a977569 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -1817,7 +1817,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p return OK; } -bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformIOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err; bool valid = false; @@ -1842,7 +1842,18 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset valid = dvalid || rvalid; r_missing_templates = !valid; - // Validate the rest of the configuration. + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformIOS::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + String err; + bool valid = true; + + // Validate the project configuration. String team_id = p_preset->get("application/app_store_team_id"); if (team_id.length() == 0) { @@ -1873,10 +1884,14 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset EditorExportPlatformIOS::EditorExportPlatformIOS() { logo = ImageTexture::create_from_image(memnew(Image(_ios_logo))); plugins_changed.set(); +#ifndef ANDROID_ENABLED check_for_changes_thread.start(_check_for_changes_poll_thread, this); +#endif } EditorExportPlatformIOS::~EditorExportPlatformIOS() { +#ifndef ANDROID_ENABLED quit_request.set(); check_for_changes_thread.wait_to_finish(); +#endif } diff --git a/platform/ios/export/export_plugin.h b/platform/ios/export/export_plugin.h index e32aef82dd..abda8e218a 100644 --- a/platform/ios/export/export_plugin.h +++ b/platform/ios/export/export_plugin.h @@ -57,8 +57,10 @@ class EditorExportPlatformIOS : public EditorExportPlatform { // Plugins SafeFlag plugins_changed; +#ifndef ANDROID_ENABLED Thread check_for_changes_thread; SafeFlag quit_request; +#endif Mutex plugins_lock; Vector<PluginConfigIOS> plugins; @@ -139,6 +141,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform { return true; } +#ifndef ANDROID_ENABLED static void _check_for_changes_poll_thread(void *ud) { EditorExportPlatformIOS *ea = static_cast<EditorExportPlatformIOS *>(ud); @@ -172,6 +175,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform { } } } +#endif protected: virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) const override; @@ -198,7 +202,8 @@ public: } virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual void get_platform_features(List<String> *r_features) const override { r_features->push_back("mobile"); diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp index b99f88d067..0bdee11018 100644 --- a/platform/javascript/export/export_plugin.cpp +++ b/platform/javascript/export/export_plugin.cpp @@ -362,7 +362,7 @@ Ref<Texture2D> EditorExportPlatformJavaScript::get_logo() const { return logo; } -bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformJavaScript::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { #ifndef DEV_ENABLED // We don't provide export templates for the HTML5 platform currently as there // is no suitable renderer to use with them. So we forbid exporting and tell @@ -396,7 +396,27 @@ bool EditorExportPlatformJavaScript::can_export(const Ref<EditorExportPreset> &p valid = dvalid || rvalid; r_missing_templates = !valid; - // Validate the rest of the configuration. + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformJavaScript::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { +#ifndef DEV_ENABLED + // We don't provide export templates for the HTML5 platform currently as there + // is no suitable renderer to use with them. So we forbid exporting and tell + // users why. This is skipped in DEV_ENABLED so that contributors can still test + // the pipeline once we start having WebGL or WebGPU support. + r_error = "The HTML5 platform is currently not supported in Godot 4.0, as there is no suitable renderer for it.\n"; + return false; +#endif + + String err; + bool valid = true; + + // Validate the project configuration. if (p_preset->get("vram_texture_compression/for_mobile")) { String etc_error = test_etc2(); diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h index fbaa3615cb..16bab02d54 100644 --- a/platform/javascript/export/export_plugin.h +++ b/platform/javascript/export/export_plugin.h @@ -118,7 +118,8 @@ public: virtual String get_os_name() const override; virtual Ref<Texture2D> get_logo() const override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index bcc2636c07..edce9c0380 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -1550,7 +1550,7 @@ void EditorExportPlatformMacOS::_zip_folder_recursive(zipFile &p_zip, const Stri da->list_dir_end(); } -bool EditorExportPlatformMacOS::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err; bool valid = false; @@ -1580,6 +1580,17 @@ bool EditorExportPlatformMacOS::can_export(const Ref<EditorExportPreset> &p_pres valid = dvalid || rvalid; r_missing_templates = !valid; + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformMacOS::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + String err; + bool valid = true; + String identifier = p_preset->get("application/bundle_identifier"); String pn_err; if (!is_package_name_valid(identifier, &pn_err)) { diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h index 21bc380d55..4603c61a28 100644 --- a/platform/macos/export/export_plugin.h +++ b/platform/macos/export/export_plugin.h @@ -119,7 +119,8 @@ public: } virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual void get_platform_features(List<String> *r_features) const override { r_features->push_back("pc"); diff --git a/platform/uwp/export/export_plugin.cpp b/platform/uwp/export/export_plugin.cpp index 070c46242f..4e4afb9704 100644 --- a/platform/uwp/export/export_plugin.cpp +++ b/platform/uwp/export/export_plugin.cpp @@ -121,7 +121,7 @@ void EditorExportPlatformUWP::get_export_options(List<ExportOption> *r_options) } } -bool EditorExportPlatformUWP::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformUWP::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { #ifndef DEV_ENABLED // We don't provide export templates for the UWP platform currently as it // has not been ported for Godot 4.0. This is skipped in DEV_ENABLED so that @@ -163,7 +163,26 @@ bool EditorExportPlatformUWP::can_export(const Ref<EditorExportPreset> &p_preset valid = dvalid || rvalid; r_missing_templates = !valid; - // Validate the rest of the configuration. + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformUWP::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { +#ifndef DEV_ENABLED + // We don't provide export templates for the UWP platform currently as it + // has not been ported for Godot 4.0. This is skipped in DEV_ENABLED so that + // contributors can still test the pipeline if/when we can build it again. + r_error = "The UWP platform is currently not supported in Godot 4.0.\n"; + return false; +#endif + + String err; + bool valid = true; + + // Validate the project configuration. if (!_valid_resource_name(p_preset->get("package/short_name"))) { valid = false; diff --git a/platform/uwp/export/export_plugin.h b/platform/uwp/export/export_plugin.h index 4a3c5db377..71d0479543 100644 --- a/platform/uwp/export/export_plugin.h +++ b/platform/uwp/export/export_plugin.h @@ -429,7 +429,8 @@ public: virtual void get_export_options(List<ExportOption> *r_options) override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override; diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp index febef5ad12..9d3ec31f73 100644 --- a/platform/windows/export/export_plugin.cpp +++ b/platform/windows/export/export_plugin.cpp @@ -412,15 +412,26 @@ Error EditorExportPlatformWindows::_code_sign(const Ref<EditorExportPreset> &p_p return OK; } -bool EditorExportPlatformWindows::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { +bool EditorExportPlatformWindows::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const { String err = ""; - bool valid = EditorExportPlatformPC::can_export(p_preset, err, r_missing_templates); + bool valid = EditorExportPlatformPC::has_valid_export_configuration(p_preset, err, r_missing_templates); String rcedit_path = EditorSettings::get_singleton()->get("export/windows/rcedit"); if (p_preset->get("application/modify_resources") && rcedit_path.is_empty()) { err += TTR("The rcedit tool must be configured in the Editor Settings (Export > Windows > Rcedit) to change the icon or app information data.") + "\n"; } + if (!err.is_empty()) { + r_error = err; + } + + return valid; +} + +bool EditorExportPlatformWindows::has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const { + String err = ""; + bool valid = true; + String icon_path = ProjectSettings::get_singleton()->globalize_path(p_preset->get("application/icon")); if (!icon_path.is_empty() && !FileAccess::exists(icon_path)) { err += TTR("Invalid icon path:") + " " + icon_path + "\n"; diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index b9e59829a0..3ea8ff3dc9 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -49,7 +49,8 @@ public: virtual List<String> get_binary_extensions(const Ref<EditorExportPreset> &p_preset) const override; virtual void get_export_options(List<ExportOption> *r_options) override; virtual bool get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const override; - virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const override; + virtual bool has_valid_project_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error) const override; virtual String get_template_file_name(const String &p_target, const String &p_arch) const override; virtual Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size) override; }; diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 06e5cbc97e..837f3061f1 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -346,13 +346,13 @@ void Line2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_points", "points"), &Line2D::set_points); ClassDB::bind_method(D_METHOD("get_points"), &Line2D::get_points); - ClassDB::bind_method(D_METHOD("set_point_position", "i", "position"), &Line2D::set_point_position); - ClassDB::bind_method(D_METHOD("get_point_position", "i"), &Line2D::get_point_position); + ClassDB::bind_method(D_METHOD("set_point_position", "index", "position"), &Line2D::set_point_position); + ClassDB::bind_method(D_METHOD("get_point_position", "index"), &Line2D::get_point_position); ClassDB::bind_method(D_METHOD("get_point_count"), &Line2D::get_point_count); - ClassDB::bind_method(D_METHOD("add_point", "position", "at_position"), &Line2D::add_point, DEFVAL(-1)); - ClassDB::bind_method(D_METHOD("remove_point", "i"), &Line2D::remove_point); + ClassDB::bind_method(D_METHOD("add_point", "position", "index"), &Line2D::add_point, DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("remove_point", "index"), &Line2D::remove_point); ClassDB::bind_method(D_METHOD("clear_points"), &Line2D::clear_points); diff --git a/scene/3d/label_3d.cpp b/scene/3d/label_3d.cpp index 712a37e745..ed2bce253a 100644 --- a/scene/3d/label_3d.cpp +++ b/scene/3d/label_3d.cpp @@ -163,7 +163,17 @@ void Label3D::_bind_methods() { } void Label3D::_validate_property(PropertyInfo &property) const { - if (property.name == "material_override" || property.name == "material_overlay") { + if ( + property.name == "material_override" || + property.name == "material_overlay" || + property.name == "lod_bias" || + property.name == "gi_mode" || + property.name == "gi_lightmap_scale") { + property.usage = PROPERTY_USAGE_NO_EDITOR; + } + + if (property.name == "cast_shadow" && alpha_cut == ALPHA_CUT_DISABLED) { + // Alpha-blended materials can't cast shadows. property.usage = PROPERTY_USAGE_NO_EDITOR; } } @@ -889,6 +899,7 @@ void Label3D::set_alpha_cut_mode(AlphaCutMode p_mode) { if (alpha_cut != p_mode) { alpha_cut = p_mode; _queue_update(); + notify_property_list_changed(); } } @@ -927,7 +938,12 @@ Label3D::Label3D() { mesh = RenderingServer::get_singleton()->mesh_create(); + // Disable shadow casting by default to improve performance and avoid unintended visual artifacts. set_cast_shadows_setting(SHADOW_CASTING_SETTING_OFF); + + // Label3D can't contribute to GI in any way, so disable it to improve performance. + set_gi_mode(GI_MODE_DISABLED); + set_base(mesh); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 06aa913eb1..6d0380c898 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2262,6 +2262,15 @@ void Control::_notify_theme_changed() { } } +void Control::_invalidate_theme_cache() { + data.theme_icon_cache.clear(); + data.theme_style_cache.clear(); + data.theme_font_cache.clear(); + data.theme_font_size_cache.clear(); + data.theme_color_cache.clear(); + data.theme_constant_cache.clear(); +} + void Control::set_theme(const Ref<Theme> &p_theme) { if (data.theme == p_theme) { return; @@ -2443,9 +2452,15 @@ Ref<Texture2D> Control::get_theme_icon(const StringName &p_name, const StringNam } } + if (data.theme_icon_cache.has(p_theme_type) && data.theme_icon_cache[p_theme_type].has(p_name)) { + return data.theme_icon_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<Ref<Texture2D>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types); + Ref<Texture2D> icon = get_theme_item_in_types<Ref<Texture2D>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_ICON, p_name, theme_types); + data.theme_icon_cache[p_theme_type][p_name] = icon; + return icon; } Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const StringName &p_theme_type) const { @@ -2456,9 +2471,15 @@ Ref<StyleBox> Control::get_theme_stylebox(const StringName &p_name, const String } } + if (data.theme_style_cache.has(p_theme_type) && data.theme_style_cache[p_theme_type].has(p_name)) { + return data.theme_style_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<Ref<StyleBox>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types); + Ref<StyleBox> style = get_theme_item_in_types<Ref<StyleBox>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_STYLEBOX, p_name, theme_types); + data.theme_style_cache[p_theme_type][p_name] = style; + return style; } Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_theme_type) const { @@ -2469,9 +2490,15 @@ Ref<Font> Control::get_theme_font(const StringName &p_name, const StringName &p_ } } + if (data.theme_font_cache.has(p_theme_type) && data.theme_font_cache[p_theme_type].has(p_name)) { + return data.theme_font_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<Ref<Font>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types); + Ref<Font> font = get_theme_item_in_types<Ref<Font>>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT, p_name, theme_types); + data.theme_font_cache[p_theme_type][p_name] = font; + return font; } int Control::get_theme_font_size(const StringName &p_name, const StringName &p_theme_type) const { @@ -2482,9 +2509,15 @@ int Control::get_theme_font_size(const StringName &p_name, const StringName &p_t } } + if (data.theme_font_size_cache.has(p_theme_type) && data.theme_font_size_cache[p_theme_type].has(p_name)) { + return data.theme_font_size_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types); + int font_size = get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_FONT_SIZE, p_name, theme_types); + data.theme_font_size_cache[p_theme_type][p_name] = font_size; + return font_size; } Color Control::get_theme_color(const StringName &p_name, const StringName &p_theme_type) const { @@ -2495,9 +2528,15 @@ Color Control::get_theme_color(const StringName &p_name, const StringName &p_the } } + if (data.theme_color_cache.has(p_theme_type) && data.theme_color_cache[p_theme_type].has(p_name)) { + return data.theme_color_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<Color>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types); + Color color = get_theme_item_in_types<Color>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_COLOR, p_name, theme_types); + data.theme_color_cache[p_theme_type][p_name] = color; + return color; } int Control::get_theme_constant(const StringName &p_name, const StringName &p_theme_type) const { @@ -2508,9 +2547,15 @@ int Control::get_theme_constant(const StringName &p_name, const StringName &p_th } } + if (data.theme_constant_cache.has(p_theme_type) && data.theme_constant_cache[p_theme_type].has(p_name)) { + return data.theme_constant_cache[p_theme_type][p_name]; + } + List<StringName> theme_types; _get_theme_type_dependencies(p_theme_type, &theme_types); - return get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types); + int constant = get_theme_item_in_types<int>(data.theme_owner, data.theme_owner_window, Theme::DATA_TYPE_CONSTANT, p_name, theme_types); + data.theme_constant_cache[p_theme_type][p_name] = constant; + return constant; } bool Control::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const { @@ -3007,6 +3052,10 @@ void Control::remove_child_notify(Node *p_child) { void Control::_notification(int p_notification) { switch (p_notification) { + case NOTIFICATION_ENTER_TREE: { + _invalidate_theme_cache(); + } break; + case NOTIFICATION_POST_ENTER_TREE: { data.minimum_size_valid = false; data.is_rtl_dirty = true; @@ -3144,6 +3193,7 @@ void Control::_notification(int p_notification) { } break; case NOTIFICATION_THEME_CHANGED: { + _invalidate_theme_cache(); update_minimum_size(); update(); } break; @@ -3164,6 +3214,7 @@ void Control::_notification(int p_notification) { case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: { if (is_inside_tree()) { data.is_rtl_dirty = true; + _invalidate_theme_cache(); _size_changed(); } } break; diff --git a/scene/gui/control.h b/scene/gui/control.h index 9f17eccc3b..db19d09b11 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -229,6 +229,13 @@ private: Theme::ThemeColorMap color_override; Theme::ThemeConstantMap constant_override; + mutable HashMap<StringName, Theme::ThemeIconMap> theme_icon_cache; + mutable HashMap<StringName, Theme::ThemeStyleMap> theme_style_cache; + mutable HashMap<StringName, Theme::ThemeFontMap> theme_font_cache; + mutable HashMap<StringName, Theme::ThemeFontSizeMap> theme_font_size_cache; + mutable HashMap<StringName, Theme::ThemeColorMap> theme_color_cache; + mutable HashMap<StringName, Theme::ThemeConstantMap> theme_constant_cache; + // Internationalization. LayoutDirection layout_dir = LAYOUT_DIRECTION_INHERITED; @@ -291,6 +298,7 @@ private: void _theme_changed(); void _theme_property_override_changed(); void _notify_theme_changed(); + void _invalidate_theme_cache(); static void _propagate_theme_changed(Node *p_at, Control *p_owner, Window *p_owner_window, bool p_assign = true); diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 5de92acb75..1835604285 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -1167,7 +1167,7 @@ void Curve2D::_get_property_list(List<PropertyInfo> *p_list) const { void Curve2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_count"), &Curve2D::get_point_count); ClassDB::bind_method(D_METHOD("set_point_count", "count"), &Curve2D::set_point_count); - ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "index"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve2D::set_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve2D::get_point_position); ClassDB::bind_method(D_METHOD("set_point_in", "idx", "position"), &Curve2D::set_point_in); @@ -1972,7 +1972,7 @@ void Curve3D::_get_property_list(List<PropertyInfo> *p_list) const { void Curve3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_point_count"), &Curve3D::get_point_count); ClassDB::bind_method(D_METHOD("set_point_count", "count"), &Curve3D::set_point_count); - ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1)); + ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "index"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve3D::set_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve3D::get_point_position); ClassDB::bind_method(D_METHOD("set_point_tilt", "idx", "tilt"), &Curve3D::set_point_tilt); diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 619036d296..880876baed 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -2808,6 +2808,8 @@ void SystemFont::_update_base_font() { file->set_oversampling(oversampling); base_font = file; + + break; } if (base_font.is_valid()) { diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index db7b03f2be..48d06934e3 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -82,7 +82,7 @@ void Shader::set_code(const String &p_code) { // 1) Need to keep track of include dependencies at resource level // 2) Server does not do interaction with Resource filetypes, this is a scene level feature. ShaderPreprocessor preprocessor; - preprocessor.preprocess(p_code, pp_code, nullptr, nullptr, &new_include_dependencies); + preprocessor.preprocess(p_code, "", pp_code, nullptr, nullptr, nullptr, &new_include_dependencies); } // This ensures previous include resources are not freed and then re-loaded during parse (which would make compiling slower) diff --git a/scene/resources/shader_include.cpp b/scene/resources/shader_include.cpp index 42435fe3c7..fe628dd323 100644 --- a/scene/resources/shader_include.cpp +++ b/scene/resources/shader_include.cpp @@ -47,7 +47,7 @@ void ShaderInclude::set_code(const String &p_code) { { String pp_code; ShaderPreprocessor preprocessor; - preprocessor.preprocess(p_code, pp_code, nullptr, nullptr, &new_dependencies); + preprocessor.preprocess(p_code, "", pp_code, nullptr, nullptr, nullptr, &new_dependencies); } // This ensures previous include resources are not freed and then re-loaded during parse (which would make compiling slower) diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index a67716d52b..fa24a95115 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1698,13 +1698,13 @@ Error VisualShader::_write_node(Type type, StringBuilder *global_code, StringBui inputs[i] = "(" + src_var + " ? 1.0 : 0.0)"; } break; case VisualShaderNode::PORT_TYPE_VECTOR_2D: { - inputs[i] = "dot(" + src_var + ", vec2(0.5, 0.5))"; + inputs[i] = src_var + ".x"; } break; case VisualShaderNode::PORT_TYPE_VECTOR_3D: { - inputs[i] = "dot(" + src_var + ", vec3(0.333333, 0.333333, 0.333333))"; + inputs[i] = src_var + ".x"; } break; case VisualShaderNode::PORT_TYPE_VECTOR_4D: { - inputs[i] = "dot(" + src_var + ", vec4(0.25, 0.25, 0.25, 0.25))"; + inputs[i] = src_var + ".x"; } break; default: break; diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index b422d298b2..2911d726b4 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -1015,7 +1015,7 @@ Vector<StringName> VisualShaderNodeCurveTexture::get_editable_properties() const } String VisualShaderNodeCurveTexture::generate_global(Shader::Mode p_mode, VisualShader::Type p_type, int p_id) const { - return "uniform sampler2D " + make_unique_id(p_type, p_id, "curve") + ";\n"; + return "uniform sampler2D " + make_unique_id(p_type, p_id, "curve") + " : repeat_disable;\n"; } String VisualShaderNodeCurveTexture::generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview) const { @@ -6830,23 +6830,23 @@ void VisualShaderNodeMultiplyAdd::set_op_type(OpType p_op_type) { switch (p_op_type) { case OP_TYPE_SCALAR: { set_input_port_default_value(0, 0.0, get_input_port_default_value(0)); - set_input_port_default_value(1, 0.0, get_input_port_default_value(1)); + set_input_port_default_value(1, 1.0, get_input_port_default_value(1)); set_input_port_default_value(2, 0.0, get_input_port_default_value(2)); } break; case OP_TYPE_VECTOR_2D: { set_input_port_default_value(0, Vector2(), get_input_port_default_value(0)); - set_input_port_default_value(1, Vector2(), get_input_port_default_value(1)); + set_input_port_default_value(1, Vector2(1.0, 1.0), get_input_port_default_value(1)); set_input_port_default_value(2, Vector2(), get_input_port_default_value(2)); } break; case OP_TYPE_VECTOR_3D: { set_input_port_default_value(0, Vector3(), get_input_port_default_value(0)); - set_input_port_default_value(1, Vector3(), get_input_port_default_value(1)); + set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0), get_input_port_default_value(1)); set_input_port_default_value(2, Vector3(), get_input_port_default_value(2)); } break; case OP_TYPE_VECTOR_4D: { - set_input_port_default_value(0, Quaternion(), get_input_port_default_value(0)); - set_input_port_default_value(1, Quaternion(), get_input_port_default_value(1)); - set_input_port_default_value(2, Quaternion(), get_input_port_default_value(2)); + set_input_port_default_value(0, Vector4(), get_input_port_default_value(0)); + set_input_port_default_value(1, Vector4(1.0, 1.0, 1.0, 1.0), get_input_port_default_value(1)); + set_input_port_default_value(2, Vector4(), get_input_port_default_value(2)); } break; default: break; @@ -6880,7 +6880,7 @@ void VisualShaderNodeMultiplyAdd::_bind_methods() { VisualShaderNodeMultiplyAdd::VisualShaderNodeMultiplyAdd() { set_input_port_default_value(0, 0.0); - set_input_port_default_value(1, 0.0); + set_input_port_default_value(1, 1.0); set_input_port_default_value(2, 0.0); } diff --git a/servers/navigation_server_2d.cpp b/servers/navigation_server_2d.cpp index 126bb08c94..27b49014d8 100644 --- a/servers/navigation_server_2d.cpp +++ b/servers/navigation_server_2d.cpp @@ -204,7 +204,7 @@ void NavigationServer2D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_create"), &NavigationServer2D::map_create); ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &NavigationServer2D::map_set_active); - ClassDB::bind_method(D_METHOD("map_is_active", "nap"), &NavigationServer2D::map_is_active); + ClassDB::bind_method(D_METHOD("map_is_active", "map"), &NavigationServer2D::map_is_active); ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &NavigationServer2D::map_set_cell_size); ClassDB::bind_method(D_METHOD("map_get_cell_size", "map"), &NavigationServer2D::map_get_cell_size); ClassDB::bind_method(D_METHOD("map_set_edge_connection_margin", "map", "margin"), &NavigationServer2D::map_set_edge_connection_margin); diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 115eda7b30..206698f97c 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -41,7 +41,7 @@ void NavigationServer3D::_bind_methods() { ClassDB::bind_method(D_METHOD("map_create"), &NavigationServer3D::map_create); ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &NavigationServer3D::map_set_active); - ClassDB::bind_method(D_METHOD("map_is_active", "nap"), &NavigationServer3D::map_is_active); + ClassDB::bind_method(D_METHOD("map_is_active", "map"), &NavigationServer3D::map_is_active); ClassDB::bind_method(D_METHOD("map_set_up", "map", "up"), &NavigationServer3D::map_set_up); ClassDB::bind_method(D_METHOD("map_get_up", "map"), &NavigationServer3D::map_get_up); ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &NavigationServer3D::map_set_cell_size); diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index dc3f35f942..585c42b2d8 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -416,7 +416,10 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface) mesh->bone_aabbs.resize(p_surface.bone_aabbs.size()); } for (int i = 0; i < p_surface.bone_aabbs.size(); i++) { - mesh->bone_aabbs.write[i].merge_with(p_surface.bone_aabbs[i]); + const AABB &bone = p_surface.bone_aabbs[i]; + if (!bone.has_no_volume()) { + mesh->bone_aabbs.write[i].merge_with(bone); + } } mesh->aabb.merge_with(p_surface.aabb); } diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp index 7637eae4a6..c2cf08812c 100644 --- a/servers/rendering/shader_compiler.cpp +++ b/servers/rendering/shader_compiler.cpp @@ -1434,8 +1434,11 @@ void ShaderCompiler::initialize(DefaultIdentifierActions p_actions) { texture_functions.insert("textureLod"); texture_functions.insert("textureProjLod"); texture_functions.insert("textureGrad"); + texture_functions.insert("textureProjGrad"); texture_functions.insert("textureGather"); texture_functions.insert("textureSize"); + texture_functions.insert("textureQueryLod"); + texture_functions.insert("textureQueryLevels"); texture_functions.insert("texelFetch"); } diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 839f5b8eea..81e4d5e217 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -2732,6 +2732,18 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { { "textureGrad", TYPE_VEC4, { TYPE_SAMPLERCUBE, TYPE_VEC3, TYPE_VEC3, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, { "textureGrad", TYPE_VEC4, { TYPE_SAMPLERCUBEARRAY, TYPE_VEC4, TYPE_VEC3, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + // textureProjGrad + + { "textureProjGrad", TYPE_VEC4, { TYPE_SAMPLER2D, TYPE_VEC3, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_VEC4, { TYPE_SAMPLER2D, TYPE_VEC4, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_IVEC4, { TYPE_ISAMPLER2D, TYPE_VEC3, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_IVEC4, { TYPE_ISAMPLER2D, TYPE_VEC4, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_UVEC4, { TYPE_USAMPLER2D, TYPE_VEC3, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_UVEC4, { TYPE_USAMPLER2D, TYPE_VEC4, TYPE_VEC2, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_VEC4, { TYPE_SAMPLER3D, TYPE_VEC4, TYPE_VEC3, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_IVEC4, { TYPE_ISAMPLER3D, TYPE_VEC4, TYPE_VEC3, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + { "textureProjGrad", TYPE_UVEC4, { TYPE_USAMPLER3D, TYPE_VEC4, TYPE_VEC3, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords", "dPdx", "dPdy" }, TAG_GLOBAL, false }, + // textureGather { "textureGather", TYPE_VEC4, { TYPE_SAMPLER2D, TYPE_VEC2, TYPE_VOID }, { "sampler", "coords" }, TAG_GLOBAL, false }, @@ -2749,6 +2761,32 @@ const ShaderLanguage::BuiltinFuncDef ShaderLanguage::builtin_func_defs[] = { { "textureGather", TYPE_VEC4, { TYPE_SAMPLERCUBE, TYPE_VEC3, TYPE_VOID }, { "sampler", "coords" }, TAG_GLOBAL, false }, { "textureGather", TYPE_VEC4, { TYPE_SAMPLERCUBE, TYPE_VEC3, TYPE_INT, TYPE_VOID }, { "sampler", "coords", "comp" }, TAG_GLOBAL, false }, + // textureQueryLod + + { "textureQueryLod", TYPE_VEC2, { TYPE_SAMPLER2D, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_ISAMPLER2D, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_USAMPLER2D, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_SAMPLER2DARRAY, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_ISAMPLER2DARRAY, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_USAMPLER2DARRAY, TYPE_VEC2 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_SAMPLER3D, TYPE_VEC3 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_ISAMPLER3D, TYPE_VEC3 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_USAMPLER3D, TYPE_VEC3 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + { "textureQueryLod", TYPE_VEC2, { TYPE_SAMPLERCUBE, TYPE_VEC3 }, { "sampler", "coords" }, TAG_GLOBAL, true }, + + // textureQueryLevels + + { "textureQueryLevels", TYPE_INT, { TYPE_SAMPLER2D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_ISAMPLER2D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_USAMPLER2D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_SAMPLER2DARRAY }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_ISAMPLER2DARRAY }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_USAMPLER2DARRAY }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_SAMPLER3D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_ISAMPLER3D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_USAMPLER3D }, { "sampler" }, TAG_GLOBAL, true }, + { "textureQueryLevels", TYPE_INT, { TYPE_SAMPLERCUBE }, { "sampler" }, TAG_GLOBAL, true }, + // dFdx { "dFdx", TYPE_FLOAT, { TYPE_FLOAT, TYPE_VOID }, { "p" }, TAG_GLOBAL, false }, diff --git a/servers/rendering/shader_preprocessor.cpp b/servers/rendering/shader_preprocessor.cpp index a7b274b3e2..d118c73c4a 100644 --- a/servers/rendering/shader_preprocessor.cpp +++ b/servers/rendering/shader_preprocessor.cpp @@ -416,16 +416,22 @@ void ShaderPreprocessor::process_define(Tokenizer *p_tokenizer) { } void ShaderPreprocessor::process_else(Tokenizer *p_tokenizer) { + const int line = p_tokenizer->get_line(); + if (state->skip_stack_else.is_empty()) { - set_error(RTR("Unmatched else."), p_tokenizer->get_line()); + set_error(RTR("Unmatched else."), line); return; } + if (state->previous_region != nullptr) { + state->previous_region->to_line = line - 1; + } + p_tokenizer->advance('\n'); bool skip = state->skip_stack_else[state->skip_stack_else.size() - 1]; state->skip_stack_else.remove_at(state->skip_stack_else.size() - 1); - Vector<SkippedCondition *> vec = state->skipped_conditions[state->current_include]; + Vector<SkippedCondition *> vec = state->skipped_conditions[state->current_filename]; int index = vec.size() - 1; if (index >= 0) { SkippedCondition *cond = vec[index]; @@ -434,6 +440,10 @@ void ShaderPreprocessor::process_else(Tokenizer *p_tokenizer) { } } + if (state->save_regions) { + add_region(line + 1, !skip, state->previous_region->parent); + } + if (skip) { Vector<String> ends; ends.push_back("endif"); @@ -447,8 +457,12 @@ void ShaderPreprocessor::process_endif(Tokenizer *p_tokenizer) { set_error(RTR("Unmatched endif."), p_tokenizer->get_line()); return; } + if (state->previous_region != nullptr) { + state->previous_region->to_line = p_tokenizer->get_line() - 1; + state->previous_region = state->previous_region->parent; + } - Vector<SkippedCondition *> vec = state->skipped_conditions[state->current_include]; + Vector<SkippedCondition *> vec = state->skipped_conditions[state->current_filename]; int index = vec.size() - 1; if (index >= 0) { SkippedCondition *cond = vec[index]; @@ -461,7 +475,7 @@ void ShaderPreprocessor::process_endif(Tokenizer *p_tokenizer) { } void ShaderPreprocessor::process_if(Tokenizer *p_tokenizer) { - int line = p_tokenizer->get_line(); + const int line = p_tokenizer->get_line(); String body = tokens_to_string(p_tokenizer->advance('\n')).strip_edges(); if (body.is_empty()) { @@ -490,6 +504,10 @@ void ShaderPreprocessor::process_if(Tokenizer *p_tokenizer) { bool success = v.booleanize(); start_branch_condition(p_tokenizer, success); + + if (state->save_regions) { + add_region(line + 1, success, state->previous_region); + } } void ShaderPreprocessor::process_ifdef(Tokenizer *p_tokenizer) { @@ -510,6 +528,10 @@ void ShaderPreprocessor::process_ifdef(Tokenizer *p_tokenizer) { bool success = state->defines.has(label); start_branch_condition(p_tokenizer, success); + + if (state->save_regions) { + add_region(line + 1, success, state->previous_region); + } } void ShaderPreprocessor::process_ifndef(Tokenizer *p_tokenizer) { @@ -530,6 +552,10 @@ void ShaderPreprocessor::process_ifndef(Tokenizer *p_tokenizer) { bool success = !state->defines.has(label); start_branch_condition(p_tokenizer, success); + + if (state->save_regions) { + add_region(line + 1, success, state->previous_region); + } } void ShaderPreprocessor::process_include(Tokenizer *p_tokenizer) { @@ -594,15 +620,15 @@ void ShaderPreprocessor::process_include(Tokenizer *p_tokenizer) { return; } - String old_include = state->current_include; - state->current_include = real_path; + String old_filename = state->current_filename; + state->current_filename = real_path; ShaderPreprocessor processor; int prev_condition_depth = state->condition_depth; state->condition_depth = 0; FilePosition fp; - fp.file = state->current_include; + fp.file = state->current_filename; fp.line = line; state->include_positions.push_back(fp); @@ -614,7 +640,7 @@ void ShaderPreprocessor::process_include(Tokenizer *p_tokenizer) { // Reset to last include if there are no errors. We want to use this as context. if (state->error.is_empty()) { - state->current_include = old_include; + state->current_filename = old_filename; state->include_positions.pop_back(); } else { return; @@ -668,6 +694,15 @@ void ShaderPreprocessor::process_undef(Tokenizer *p_tokenizer) { state->defines.erase(label); } +void ShaderPreprocessor::add_region(int p_line, bool p_enabled, Region *p_parent_region) { + Region region; + region.file = state->current_filename; + region.enabled = p_enabled; + region.from_line = p_line; + region.parent = p_parent_region; + state->previous_region = &state->regions[region.file].push_back(region)->get(); +} + void ShaderPreprocessor::start_branch_condition(Tokenizer *p_tokenizer, bool p_success) { state->condition_depth++; @@ -676,7 +711,7 @@ void ShaderPreprocessor::start_branch_condition(Tokenizer *p_tokenizer, bool p_s } else { SkippedCondition *cond = memnew(SkippedCondition()); cond->start_line = p_tokenizer->get_line(); - state->skipped_conditions[state->current_include].push_back(cond); + state->skipped_conditions[state->current_filename].push_back(cond); Vector<String> ends; ends.push_back("else"); @@ -969,8 +1004,12 @@ Error ShaderPreprocessor::preprocess(State *p_state, const String &p_code, Strin return OK; } -Error ShaderPreprocessor::preprocess(const String &p_code, String &r_result, String *r_error_text, List<FilePosition> *r_error_position, HashSet<Ref<ShaderInclude>> *r_includes, List<ScriptLanguage::CodeCompletionOption> *r_completion_options, IncludeCompletionFunction p_include_completion_func) { +Error ShaderPreprocessor::preprocess(const String &p_code, const String &p_filename, String &r_result, String *r_error_text, List<FilePosition> *r_error_position, List<Region> *r_regions, HashSet<Ref<ShaderInclude>> *r_includes, List<ScriptLanguage::CodeCompletionOption> *r_completion_options, IncludeCompletionFunction p_include_completion_func) { State pp_state; + if (!p_filename.is_empty()) { + pp_state.current_filename = p_filename; + pp_state.save_regions = r_regions != nullptr; + } Error err = preprocess(&pp_state, p_code, r_result); if (err != OK) { if (r_error_text) { @@ -980,6 +1019,9 @@ Error ShaderPreprocessor::preprocess(const String &p_code, String &r_result, Str *r_error_position = pp_state.include_positions; } } + if (r_regions) { + *r_regions = pp_state.regions[p_filename]; + } if (r_includes) { *r_includes = pp_state.shader_includes; } diff --git a/servers/rendering/shader_preprocessor.h b/servers/rendering/shader_preprocessor.h index a93fb680dd..41b574298d 100644 --- a/servers/rendering/shader_preprocessor.h +++ b/servers/rendering/shader_preprocessor.h @@ -58,6 +58,14 @@ public: int line = 0; }; + struct Region { + String file; + int from_line = -1; + int to_line = -1; + bool enabled = false; + Region *parent = nullptr; + }; + private: struct Token { char32_t text; @@ -134,10 +142,13 @@ private: RBSet<String> includes; List<uint64_t> cyclic_include_hashes; // Holds code hash of includes. int include_depth = 0; - String current_include; + String current_filename; String current_shader_type; String error; List<FilePosition> include_positions; + bool save_regions = false; + RBMap<String, List<Region>> regions; + Region *previous_region = nullptr; RBMap<String, Vector<SkippedCondition *>> skipped_conditions; bool disabled = false; CompletionType completion_type = COMPLETION_TYPE_NONE; @@ -167,6 +178,7 @@ private: void process_pragma(Tokenizer *p_tokenizer); void process_undef(Tokenizer *p_tokenizer); + void add_region(int p_line, bool p_enabled, Region *p_parent_region); void start_branch_condition(Tokenizer *p_tokenizer, bool p_success); void expand_output_macros(int p_start, int p_line); @@ -188,7 +200,7 @@ private: public: typedef void (*IncludeCompletionFunction)(List<ScriptLanguage::CodeCompletionOption> *); - Error preprocess(const String &p_code, String &r_result, String *r_error_text = nullptr, List<FilePosition> *r_error_position = nullptr, HashSet<Ref<ShaderInclude>> *r_includes = nullptr, List<ScriptLanguage::CodeCompletionOption> *r_completion_options = nullptr, IncludeCompletionFunction p_include_completion_func = nullptr); + Error preprocess(const String &p_code, const String &p_filename, String &r_result, String *r_error_text = nullptr, List<FilePosition> *r_error_position = nullptr, List<Region> *r_regions = nullptr, HashSet<Ref<ShaderInclude>> *r_includes = nullptr, List<ScriptLanguage::CodeCompletionOption> *r_completion_options = nullptr, IncludeCompletionFunction p_include_completion_func = nullptr); static void get_keyword_list(List<String> *r_keywords, bool p_include_shader_keywords); static void get_pragma_list(List<String> *r_pragmas); |