diff options
Diffstat (limited to 'doc/classes')
62 files changed, 3544 insertions, 810 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 2b1770f12b..ee65bbc07e 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1594,43 +1594,40 @@ <constant name="OP_MODULE" value="12" enum="Variant.Operator"> Remainder/modulo operator ([code]%[/code]). </constant> - <constant name="OP_STRING_CONCAT" value="13" enum="Variant.Operator"> - String concatenation operator ([code]+[/code]). - </constant> - <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator"> + <constant name="OP_SHIFT_LEFT" value="13" enum="Variant.Operator"> Left shift operator ([code]<<[/code]). </constant> - <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator"> + <constant name="OP_SHIFT_RIGHT" value="14" enum="Variant.Operator"> Right shift operator ([code]>>[/code]). </constant> - <constant name="OP_BIT_AND" value="16" enum="Variant.Operator"> + <constant name="OP_BIT_AND" value="15" enum="Variant.Operator"> Bitwise AND operator ([code]&[/code]). </constant> - <constant name="OP_BIT_OR" value="17" enum="Variant.Operator"> + <constant name="OP_BIT_OR" value="16" enum="Variant.Operator"> Bitwise OR operator ([code]|[/code]). </constant> - <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator"> + <constant name="OP_BIT_XOR" value="17" enum="Variant.Operator"> Bitwise XOR operator ([code]^[/code]). </constant> - <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator"> + <constant name="OP_BIT_NEGATE" value="18" enum="Variant.Operator"> Bitwise NOT operator ([code]~[/code]). </constant> - <constant name="OP_AND" value="20" enum="Variant.Operator"> + <constant name="OP_AND" value="19" enum="Variant.Operator"> Logical AND operator ([code]and[/code] or [code]&&[/code]). </constant> - <constant name="OP_OR" value="21" enum="Variant.Operator"> + <constant name="OP_OR" value="20" enum="Variant.Operator"> Logical OR operator ([code]or[/code] or [code]||[/code]). </constant> - <constant name="OP_XOR" value="22" enum="Variant.Operator"> + <constant name="OP_XOR" value="21" enum="Variant.Operator"> Logical XOR operator (not implemented in GDScript). </constant> - <constant name="OP_NOT" value="23" enum="Variant.Operator"> + <constant name="OP_NOT" value="22" enum="Variant.Operator"> Logical NOT operator ([code]not[/code] or [code]![/code]). </constant> - <constant name="OP_IN" value="24" enum="Variant.Operator"> + <constant name="OP_IN" value="23" enum="Variant.Operator"> Logical IN operator ([code]in[/code]). </constant> - <constant name="OP_MAX" value="25" enum="Variant.Operator"> + <constant name="OP_MAX" value="24" enum="Variant.Operator"> Represents the size of the [enum Variant.Operator] enum. </constant> </constants> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 4f95b44f83..baea84df65 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -14,7 +14,23 @@ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> </tutorials> <methods> - <method name="AABB"> + <method name="AABB" qualifiers="constructor"> + <return type="AABB"> + </return> + <description> + Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="AABB" qualifiers="constructor"> + <return type="AABB"> + </return> + <argument index="0" name="from" type="AABB"> + </argument> + <description> + Constructs an [AABB] as a copy of the given [AABB]. + </description> + </method> + <method name="AABB" qualifiers="constructor"> <return type="AABB"> </return> <argument index="0" name="position" type="Vector3"> @@ -215,6 +231,30 @@ Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="AABB"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="AABB"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index d0f90f513d..6a9eb89602 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -38,48 +38,57 @@ GD.Print(array1 + array2); // Prints [One, 2, 3, Four] [/csharp] [/codeblocks] + [b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient. [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate]. + [b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. </description> <tutorials> </tutorials> <methods> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedColorArray"> + <description> + Constructs an empty [Array]. + </description> + </method> + <method name="Array" qualifiers="constructor"> + <return type="Array"> + </return> + <argument index="0" name="from" type="Array"> </argument> <description> - Constructs an array from a [PackedColorArray]. + Constructs an [Array] as a copy of the given [Array]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedVector3Array"> + <argument index="0" name="from" type="PackedByteArray"> </argument> <description> - Constructs an array from a [PackedVector3Array]. + Constructs an array from a [PackedByteArray]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedVector2Array"> + <argument index="0" name="from" type="PackedColorArray"> </argument> <description> - Constructs an array from a [PackedVector2Array]. + Constructs an array from a [PackedColorArray]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedStringArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs an array from a [PackedStringArray]. + Constructs an array from a [PackedFloat32Array]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> <argument index="0" name="from" type="PackedFloat64Array"> @@ -88,16 +97,16 @@ Constructs an array from a [PackedFloat64Array]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedFloat32Array"> + <argument index="0" name="from" type="PackedInt32Array"> </argument> <description> - Constructs an array from a [PackedFloat32Array]. + Constructs an array from a [PackedInt32Array]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> <argument index="0" name="from" type="PackedInt64Array"> @@ -106,22 +115,31 @@ Constructs an array from a [PackedInt64Array]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedInt32Array"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs an array from a [PackedInt32Array]. + Constructs an array from a [PackedStringArray]. </description> </method> - <method name="Array"> + <method name="Array" qualifiers="constructor"> <return type="Array"> </return> - <argument index="0" name="from" type="PackedByteArray"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs an array from a [PackedByteArray]. + Constructs an array from a [PackedVector2Array]. + </description> + </method> + <method name="Array" qualifiers="constructor"> + <return type="Array"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs an array from a [PackedVector3Array]. </description> </method> <method name="append"> @@ -133,6 +151,21 @@ Appends an element at the end of the array (alias of [method push_back]). </description> </method> + <method name="append_array"> + <return type="void"> + </return> + <argument index="0" name="array" type="Array"> + </argument> + <description> + Appends another array at the end of this array. + [codeblock] + var array1 = [1, 2, 3] + var array2 = [4, 5, 6] + array1.append_array(array2) + print(array1) # Prints [1, 2, 3, 4, 5, 6]. + [/codeblock] + </description> + </method> <method name="back"> <return type="Variant"> </return> @@ -320,6 +353,70 @@ Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Array"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="pop_back"> <return type="Variant"> </return> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 4201a31402..877d3ca85a 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -19,26 +19,23 @@ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> - <method name="Basis"> + <method name="Basis" qualifiers="constructor"> <return type="Basis"> </return> - <argument index="0" name="from" type="Quat"> - </argument> <description> - Constructs a pure rotation basis matrix from the given quaternion. + Constructs a default-initialized [Basis] set to [constant IDENTITY]. </description> </method> - <method name="Basis"> + <method name="Basis" qualifiers="constructor"> <return type="Basis"> </return> - <argument index="0" name="from" type="Vector3"> + <argument index="0" name="from" type="Basis"> </argument> <description> - Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). - Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + Constructs a [Basis] as a copy of the given [Basis]. </description> </method> - <method name="Basis"> + <method name="Basis" qualifiers="constructor"> <return type="Basis"> </return> <argument index="0" name="axis" type="Vector3"> @@ -49,7 +46,26 @@ Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. </description> </method> - <method name="Basis"> + <method name="Basis" qualifiers="constructor"> + <return type="Basis"> + </return> + <argument index="0" name="euler" type="Vector3"> + </argument> + <description> + Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). + Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + </description> + </method> + <method name="Basis" qualifiers="constructor"> + <return type="Basis"> + </return> + <argument index="0" name="from" type="Quat"> + </argument> + <description> + Constructs a pure rotation basis matrix from the given quaternion. + </description> + </method> + <method name="Basis" qualifiers="constructor"> <return type="Basis"> </return> <argument index="0" name="x_axis" type="Vector3"> @@ -115,6 +131,46 @@ Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Basis"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Basis"> + </return> + <argument index="0" name="right" type="Basis"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Basis"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="orthonormalized"> <return type="Basis"> </return> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 7aaf087540..f137ede90f 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -36,15 +36,31 @@ <tutorials> </tutorials> <methods> - <method name="Callable"> + <method name="Callable" qualifiers="constructor"> + <return type="Callable"> + </return> + <description> + Constructs a null [Callable] with no object nor method bound. + </description> + </method> + <method name="Callable" qualifiers="constructor"> + <return type="Callable"> + </return> + <argument index="0" name="from" type="Callable"> + </argument> + <description> + Constructs a [Callable] as a copy of the given [Callable]. + </description> + </method> + <method name="Callable" qualifiers="constructor"> <return type="Callable"> </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="method_name" type="StringName"> + <argument index="1" name="method" type="StringName"> </argument> <description> - Creates a new [Callable] for the method called [code]method_name[/code] in the specified [code]object[/code]. + Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code]. </description> </method> <method name="bind" qualifiers="vararg"> @@ -112,6 +128,22 @@ <description> </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Callable"> + </argument> + <description> + </description> + </method> <method name="unbind"> <return type="Callable"> </return> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ca52d27a52..9705a196ed 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -16,74 +16,31 @@ <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link> </tutorials> <methods> - <method name="Color"> + <method name="Color" qualifiers="constructor"> <return type="Color"> </return> - <argument index="0" name="from" type="String"> - </argument> <description> - Constructs a color from an HTML hexadecimal color string in RGB or RGBA format. See also [method @GDScript.ColorN]. - [codeblocks] - [gdscript] - # Each of the following creates the same color RGBA(178, 217, 10, 255). - var c3 = Color("#b2d90a") # RGB format with "#". - var c4 = Color("b2d90a") # RGB format. - var c1 = Color("#b2d90aff") # RGBA format with "#". - var c2 = Color("b2d90aff") # RGBA format. - [/gdscript] - [csharp] - // Each of the following creates the same color RGBA(178, 217, 10, 255). - var c3 = new Color("#b2d90a"); - var c4 = new Color("b2d90a"); // RGB format. - var c1 = new Color("#b2d90aff"); - var c2 = new Color("b2d90aff"); // RGBA format. - [/csharp] - [/codeblocks] - You can also use the "web color" short-hand form by only using 3 or 4 digits. - [codeblocks] - [gdscript] - # Each of the following creates the same color RGBA(17, 34, 51, 255). - var c3 = Color("#123") # RGB format with "#". - var c4 = Color("123") # RGB format. - var c1 = Color("#123f") # RGBA format with "#". - var c2 = Color("123f") # RGBA format. - [/gdscript] - [csharp] - // Each of the following creates the same color RGBA(17, 34, 51, 255). - var c3 = new Color("#123"); - var c4 = new Color("123"); // RGB format. - var c1 = new Color("#123f"); - var c2 = new Color("123f"); // RGBA format. - [/csharp] - [/codeblocks] + Constructs a default-initialized [Color] with all components set to [code]0[/code]. </description> </method> - <method name="Color"> + <method name="Color" qualifiers="constructor"> <return type="Color"> </return> - <argument index="0" name="from" type="int"> + <argument index="0" name="from" type="Color"> </argument> <description> - Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). - [codeblocks] - [gdscript] - var c = Color(274) # Equivalent to RGBA(0, 0, 1, 18) - [/gdscript] - [csharp] - var c = new Color(274); // Equivalent to RGBA(0, 0, 1, 18) - [/csharp] - [/codeblocks] + Constructs a [Color] as a copy of the given [Color]. </description> </method> - <method name="Color"> + <method name="Color" qualifiers="constructor"> <return type="Color"> </return> - <argument index="0" name="c" type="Color"> + <argument index="0" name="from" type="Color"> </argument> - <argument index="1" name="a" type="float"> + <argument index="1" name="alpha" type="float"> </argument> <description> - Constructs a color from an existing color, but with a custom alpha value. + Constructs a [Color] from an existing color, but with a custom alpha value. [codeblocks] [gdscript] var red = Color(Color.red, 0.5) # 50% transparent red. @@ -94,7 +51,7 @@ [/codeblocks] </description> </method> - <method name="Color"> + <method name="Color" qualifiers="constructor"> <return type="Color"> </return> <argument index="0" name="r" type="float"> @@ -103,19 +60,21 @@ </argument> <argument index="2" name="b" type="float"> </argument> + <argument index="3" name="a" type="float"> + </argument> <description> - Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1. + Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255) + var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Equivalent to RGBA(51, 255, 178, 255) + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` [/csharp] [/codeblocks] </description> </method> - <method name="Color"> + <method name="Color" qualifiers="constructor"> <return type="Color"> </return> <argument index="0" name="r" type="float"> @@ -124,16 +83,14 @@ </argument> <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="float"> - </argument> <description> - Constructs a color from an RGBA profile using values between 0 and 1. + Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204) + var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Equivalent to RGBA(51, 255, 178, 255, 204) + var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` [/csharp] [/codeblocks] </description> @@ -186,11 +143,11 @@ [codeblocks] [gdscript] var color = Color(0.3, 0.4, 0.9) - var inverted_color = color.inverted() # A color of an RGBA(178, 153, 26, 255) + var inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, 0.1)` [/gdscript] [csharp] var color = new Color(0.3f, 0.4f, 0.9f); - Color invertedColor = color.Inverted(); // A color of an RGBA(178, 153, 26, 255) + Color invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, 0.6f, 0.1f)` [/csharp] [/codeblocks] </description> @@ -217,12 +174,12 @@ [gdscript] var c1 = Color(1.0, 0.0, 0.0) var c2 = Color(0.0, 1.0, 0.0) - var lerp_color = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) + var lerp_color = c1.lerp(c2, 0.5) # Equivalent to `Color(0.5, 0.5, 0.0)` [/gdscript] [csharp] var c1 = new Color(1.0f, 0.0f, 0.0f); var c2 = new Color(0.0f, 1.0f, 0.0f); - Color lerpColor = c1.Lerp(c2, 0.5f); // A color of an RGBA(128, 128, 0, 255) + Color lerpColor = c1.Lerp(c2, 0.5f); // Equivalent to `new Color(0.5f, 0.5f, 0.0f)` [/csharp] [/codeblocks] </description> @@ -246,11 +203,103 @@ [/codeblocks] </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="to_abgr32"> <return type="int"> </return> <description> - Returns the color's 32-bit integer in ABGR format (each byte represents a component of the ABGR profile). ABGR is the reversed version of the default format. + Returns the color converted to a 32-bit integer in ABGR format (each byte represents a color channel). ABGR is the reversed version of the default format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) @@ -267,7 +316,7 @@ <return type="int"> </return> <description> - Returns the color's 64-bit integer in ABGR format (each word represents a component of the ABGR profile). ABGR is the reversed version of the default format. + Returns the color converted to a 64-bit integer in ABGR format (each word represents a color channel). ABGR is the reversed version of the default format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) @@ -284,7 +333,7 @@ <return type="int"> </return> <description> - Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). ARGB is more compatible with DirectX. + Returns the color converted to a 32-bit integer in ARGB format (each byte represents a color channel). ARGB is more compatible with DirectX. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) @@ -301,7 +350,7 @@ <return type="int"> </return> <description> - Returns the color's 64-bit integer in ARGB format (each word represents a component of the ARGB profile). ARGB is more compatible with DirectX. + Returns the color converted to a 64-bit integer in ARGB format (each word represents a color channel). ARGB is more compatible with DirectX. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) @@ -320,7 +369,7 @@ <argument index="0" name="with_alpha" type="bool" default="true"> </argument> <description> - Returns the color's HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]). + 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). [codeblocks] [gdscript] @@ -340,7 +389,7 @@ <return type="int"> </return> <description> - Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is Godot's default format. + Returns the color converted to a 32-bit integer in RGBA format (each byte represents a color channel). RGBA is Godot's default format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) @@ -357,7 +406,7 @@ <return type="int"> </return> <description> - Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is Godot's default format. + Returns the color converted to a 64-bit integer in RGBA format (each word represents a color channel). RGBA is Godot's default format. [codeblocks] [gdscript] var color = Color(1, 0.5, 0.2) diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 6ea7b79dff..eb0b941da5 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -446,7 +446,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. [codeblocks] [gdscript] func _ready(): @@ -469,7 +469,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -480,7 +480,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -491,7 +491,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -502,7 +502,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code]. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -566,7 +566,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_color_override" qualifiers="const"> @@ -586,7 +586,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> @@ -606,7 +606,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_font_override" qualifiers="const"> @@ -626,7 +626,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> @@ -655,7 +655,7 @@ <argument index="1" name="type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme]. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 8ac6258e97..2d50d98a74 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -80,7 +80,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns 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, and returns [code](0, 0)[/code]. + 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]. </description> </method> <method name="get_point_out" qualifiers="const"> @@ -89,7 +89,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns 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, and returns [code](0, 0)[/code]. + 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]. </description> </method> <method name="get_point_position" qualifiers="const"> @@ -152,7 +152,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <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. + 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. </description> </method> <method name="set_point_out"> @@ -163,7 +163,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <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. + 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. </description> </method> <method name="set_point_position"> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index fe454d90cc..a6a0e0c33d 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -95,7 +95,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns 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, and returns [code](0, 0, 0)[/code]. + 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]. </description> </method> <method name="get_point_out" qualifiers="const"> @@ -104,7 +104,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns 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, and returns [code](0, 0, 0)[/code]. + 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]. </description> </method> <method name="get_point_position" qualifiers="const"> @@ -189,7 +189,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <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. + 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. </description> </method> <method name="set_point_out"> @@ -200,7 +200,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <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. + 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. </description> </method> <method name="set_point_position"> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 8bdaeb9211..91a04b1f28 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -132,7 +132,7 @@ // Try to contact server Dtls.PutPacket("The Answer Is..42!".ToUTF8()); } - while (Dtls.GetAvailablePacketCount() > 0) + while (Dtls.GetAvailablePacketCount() > 0) { GD.Print("Connected: " + Dtls.GetPacket().GetStringFromUTF8()); Connected = true; diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 8095d95551..cd0b5ac027 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -11,17 +11,28 @@ Creating a dictionary: [codeblocks] [gdscript] - var my_dir = {} # Creates an empty dictionary. - var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - var another_dir = { - key1: value1, - key2: value2, - key3: value3, + var my_dict = {} # Creates an empty dictionary. + + var dict_variable_key = "Another key name" + var dict_variable_value = "value2" + var another_dict = { + "Some key name": "value1", + dict_variable_key: dict_variable_value, + } + + var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} + + # Alternative Lua-style syntax. + # Doesn't require quotes around keys, but only string constants can be used as key names. + # Additionally, key names must start with a letter or an underscore. + # Here, `some_key` is a string literal, not a variable! + another_dict = { + some_key = 42, } [/gdscript] [csharp] - var myDir = new Godot.Collections.Dictionary(); // Creates an empty dictionary. - var pointsDir = new Godot.Collections.Dictionary + var myDict = new Godot.Collections.Dictionary(); // Creates an empty dictionary. + var pointsDict = new Godot.Collections.Dictionary { {"White", 50}, {"Yellow", 75}, @@ -33,15 +44,15 @@ [codeblocks] [gdscript] export(string, "White", "Yellow", "Orange") var my_color - var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} + var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): # We can't use dot syntax here as `my_color` is a variable. - var points = points_dir[my_color] + var points = points_dict[my_color] [/gdscript] [csharp] [Export(PropertyHint.Enum, "White,Yellow,Orange")] public string MyColor { get; set; } - public Godot.Collections.Dictionary pointsDir = new Godot.Collections.Dictionary + public Godot.Collections.Dictionary pointsDict = new Godot.Collections.Dictionary { {"White", 50}, {"Yellow", 75}, @@ -50,7 +61,7 @@ public override void _Ready() { - int points = (int)pointsDir[MyColor]; + int points = (int)pointsDict[MyColor]; } [/csharp] [/codeblocks] @@ -58,7 +69,7 @@ Dictionaries can contain more complex data: [codeblocks] [gdscript] - my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. + my_dict = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key. [/gdscript] [csharp] var myDir = new Godot.Collections.Dictionary @@ -70,8 +81,8 @@ To add a key to an existing dictionary, access it like an existing key and assign to it: [codeblocks] [gdscript] - var points_dir = {"White": 50, "Yellow": 75, "Orange": 100} - points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. + var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} + points_dict["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. [/gdscript] [csharp] var pointsDir = new Godot.Collections.Dictionary @@ -80,7 +91,7 @@ {"Yellow", 75}, {"Orange", 100} }; - pointsDir["blue"] = 150; // Add "Blue" as a key and assign 150 as its value. + pointsDict["blue"] = 150; // Add "Blue" as a key and assign 150 as its value. [/csharp] [/codeblocks] Finally, dictionaries can contain different types of keys and values in the same dictionary: @@ -89,22 +100,22 @@ # This is a valid dictionary. # To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`. # Indexing styles can be mixed and matched depending on your needs. - var my_dir = { + var my_dict = { "String Key": 5, 4: [1, 2, 3], 7: "Hello", - "sub_dir": {"sub_key": "Nested value"}, + "sub_dict": {"sub_key": "Nested value"}, } [/gdscript] [csharp] // This is a valid dictionary. // To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`. // Indexing styles can be mixed and matched depending on your needs. - var myDir = new Godot.Collections.Dictionary { + var myDict = new Godot.Collections.Dictionary { {"String Key", 5}, {4, new Godot.Collections.Array{1,2,3}}, {7, "Hello"}, - {"sub_dir", new Godot.Collections.Dictionary{{"sub_key", "Nested value"}}} + {"sub_dict", new Godot.Collections.Dictionary{{"sub_key", "Nested value"}}} }; [/csharp] [/codeblocks] @@ -117,11 +128,11 @@ func compare_arrays(): print(array1 == array2) # Will print true. - var dir1 = {"a": 1, "b": 2, "c": 3} - var dir2 = {"a": 1, "b": 2, "c": 3} + var dict1 = {"a": 1, "b": 2, "c": 3} + var dict2 = {"a": 1, "b": 2, "c": 3} func compare_dictionaries(): - print(dir1 == dir2) # Will NOT print true. + print(dict1 == dict2) # Will NOT print true. [/gdscript] [csharp] // You have to use GD.Hash(). @@ -135,35 +146,36 @@ GD.Print(GD.Hash(array1) == GD.Hash(array2)); // Will print true. } - public Godot.Collections.Dictionary dir1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - public Godot.Collections.Dictionary dir2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; + public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; + public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; public void CompareDictionaries() { - GD.Print(dir1 == dir2); // Will NOT print true. + GD.Print(dict1 == dict2); // Will NOT print true. } [/csharp] [/codeblocks] You need to first calculate the dictionary's hash with [method hash] before you can compare them: [codeblocks] [gdscript] - var dir1 = {"a": 1, "b": 2, "c": 3} - var dir2 = {"a": 1, "b": 2, "c": 3} + var dict1 = {"a": 1, "b": 2, "c": 3} + var dict2 = {"a": 1, "b": 2, "c": 3} func compare_dictionaries(): - print(dir1.hash() == dir2.hash()) # Will print true. + print(dict1.hash() == dict2.hash()) # Will print true. [/gdscript] [csharp] // You have to use GD.Hash(). - public Godot.Collections.Dictionary dir1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; - public Godot.Collections.Dictionary dir2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; + public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; + public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}}; public void CompareDictionaries() { - GD.Print(GD.Hash(dir1) == GD.Hash(dir2)); // Will print true. + GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Will print true. } [/csharp] [/codeblocks] + [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary itself can still be mutated by defining the values of individual keys. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. </description> <tutorials> <link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link> @@ -171,6 +183,22 @@ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> + <method name="Dictionary" qualifiers="constructor"> + <return type="Dictionary"> + </return> + <description> + Constructs an empty [Dictionary]. + </description> + </method> + <method name="Dictionary" qualifiers="constructor"> + <return type="Dictionary"> + </return> + <argument index="0" name="from" type="Dictionary"> + </argument> + <description> + Constructs a [Dictionary] as a copy of the given [Dictionary]. + </description> + </method> <method name="clear"> <return type="void"> </return> @@ -278,11 +306,35 @@ Returns the list of keys in the [Dictionary]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Dictionary"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Dictionary"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Variant"> + </return> + <argument index="0" name="key" type="Variant"> + </argument> + <description> + </description> + </method> <method name="size"> <return type="int"> </return> <description> - Returns the size of the dictionary (in pairs). + Returns the number of keys in the dictionary. </description> </method> <method name="values"> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 4dea1bb645..adaaed4f1c 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -59,8 +59,11 @@ </argument> <argument index="1" name="billboard" type="bool" default="false"> </argument> + <argument index="2" name="texture" type="Texture2D" default="null"> + </argument> <description> Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden. + You can optionally provide a texture to use instead of the default icon. </description> </method> <method name="create_icon_material"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 3613c408b2..ca011abb36 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -210,6 +210,38 @@ <argument index="0" name="overlay" type="Control"> </argument> <description> + Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + [codeblocks] + [gdscript] + func forward_canvas_draw_over_viewport(overlay): + # Draw a circle at cursor position. + overlay.draw_circle(overlay.get_local_mouse_position(), 64) + + func forward_canvas_gui_input(event): + if event is InputEventMouseMotion: + # Redraw viewport when cursor is moved. + update_overlays() + return true + return false + [/gdscript] + [csharp] + public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) + { + // Draw a circle at cursor position. + overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); + } + + public override bool ForwardCanvasGuiInput(InputEvent @event) + { + if (@event is InputEventMouseMotion) + { + // Redraw viewport when cursor is moved. + UpdateOverlays(); + return true; + } + return false; + [/csharp] + [/codeblocks] </description> </method> <method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual"> @@ -218,6 +250,8 @@ <argument index="0" name="overlay" type="Control"> </argument> <description> + This method is the same as [method forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. </description> </method> <method name="forward_canvas_gui_input" qualifiers="virtual"> @@ -258,6 +292,56 @@ [/codeblocks] </description> </method> + <method name="forward_spatial_draw_over_viewport" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="overlay" type="Control"> + </argument> + <description> + Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + [codeblocks] + [gdscript] + func forward_spatial_draw_over_viewport(overlay): + # Draw a circle at cursor position. + overlay.draw_circle(overlay.get_local_mouse_position(), 64) + + func forward_spatial_gui_input(camera, event): + if event is InputEventMouseMotion: + # Redraw viewport when cursor is moved. + update_overlays() + return true + return false + [/gdscript] + [csharp] + public override void ForwardSpatialDrawOverViewport(Godot.Control overlay) + { + // Draw a circle at cursor position. + overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); + } + + public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event) + { + if (@event is InputEventMouseMotion) + { + // Redraw viewport when cursor is moved. + UpdateOverlays(); + return true; + } + return false; + [/csharp] + [/codeblocks] + </description> + </method> + <method name="forward_spatial_force_draw_over_viewport" qualifiers="virtual"> + <return type="void"> + </return> + <argument index="0" name="overlay" type="Control"> + </argument> + <description> + This method is the same as [method forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. + </description> + </method> <method name="forward_spatial_gui_input" qualifiers="virtual"> <return type="bool"> </return> @@ -550,6 +634,7 @@ <return type="void"> </return> <description> + Enables calling of [method forward_canvas_force_draw_over_viewport] for the 2D editor and [method forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. </description> </method> <method name="set_input_event_forwarding_always_enabled"> @@ -581,7 +666,7 @@ <return type="int"> </return> <description> - Updates the overlays of the editor (2D/3D) viewport. + Updates the overlays of the 2D and 3D editor viewport. Causes methods [method forward_canvas_draw_over_viewport], [method forward_canvas_force_draw_over_viewport], [method forward_spatial_draw_over_viewport] and [method forward_spatial_force_draw_over_viewport] to be called. </description> </method> </methods> diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml deleted file mode 100644 index dc9246ad35..0000000000 --- a/doc/classes/FuncRef.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="FuncRef" inherits="Reference" version="4.0"> - <brief_description> - Reference to a function in an object. - </brief_description> - <description> - In GDScript, functions are not [i]first-class objects[/i]. This means it is impossible to store them directly as variables, return them from another function, or pass them as arguments. - However, by creating a [FuncRef] using the [method @GDScript.funcref] function, a reference to a function in a given object can be created, passed around and called. - </description> - <tutorials> - </tutorials> - <methods> - <method name="call_func" qualifiers="vararg"> - <return type="Variant"> - </return> - <description> - Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. - </description> - </method> - <method name="call_funcv"> - <return type="Variant"> - </return> - <argument index="0" name="arg_array" type="Array"> - </argument> - <description> - Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array]. - </description> - </method> - <method name="is_valid" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns whether the object still exists and has the function assigned. - </description> - </method> - <method name="set_instance"> - <return type="void"> - </return> - <argument index="0" name="instance" type="Object"> - </argument> - <description> - The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary]. - </description> - </method> - </methods> - <members> - <member name="function" type="StringName" setter="set_function" getter="get_function" default="@"""> - The name of the referenced function. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index fb0ed8ff62..eafae7310c 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -54,6 +54,15 @@ [b]Note:[/b] This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> + <method name="get_action_raw_strength" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="action" type="StringName"> + </argument> + <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. + </description> + </method> <method name="get_action_strength" qualifiers="const"> <return type="float"> </return> @@ -63,6 +72,18 @@ 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. </description> </method> + <method name="get_axis" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="negative_action" type="StringName"> + </argument> + <argument index="1" name="positive_action" type="StringName"> + </argument> + <description> + Get axis input by specifying two actions, one negative and one positive. + This is a horthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code]. + </description> + </method> <method name="get_connected_joypads"> <return type="Array"> </return> @@ -205,6 +226,25 @@ Returns the mouse mode. See the constants for more information. </description> </method> + <method name="get_vector" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="negative_x" type="StringName"> + </argument> + <argument index="1" name="positive_x" type="StringName"> + </argument> + <argument index="2" name="negative_y" type="StringName"> + </argument> + <argument index="3" name="positive_y" type="StringName"> + </argument> + <argument index="4" name="deadzone" type="float" default="-1.0"> + </argument> + <description> + Get vector input by specifying four actions, two for the X axis and two for the Y axis, negative and positive. + This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement. + By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1). + </description> + </method> <method name="is_action_just_pressed" qualifiers="const"> <return type="bool"> </return> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index 39827f6604..defd23afb1 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -18,13 +18,14 @@ <argument index="1" name="custom_scene" type="PackedScene" default="null"> </argument> <description> + Not thread-safe. Use [method Object.call_deferred] if calling from a thread. </description> </method> <method name="get_instance_path" qualifiers="const"> <return type="String"> </return> <description> - Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. + Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. Not thread-safe. Use [method Object.call_deferred] if calling from a thread. </description> </method> <method name="get_stored_values"> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index f08a15d873..5c2dffd538 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -78,6 +78,13 @@ Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]. </description> </method> + <method name="get_scroll_offset" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the scroll offset due to [member caret_position], as a number of characters. + </description> + </method> <method name="menu_option"> <return type="void"> </return> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index fb5f437239..c8eebd4677 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -6,13 +6,22 @@ <description> Adds a top, left, bottom, and right margin to all [Control] nodes that are direct children of the container. To control the [MarginContainer]'s margin, use the [code]margin_*[/code] theme properties listed below. [b]Note:[/b] Be careful, [Control] margin values are different than the constant margin values. If you want to change the custom margin values of the [MarginContainer] by code, you should use the following examples: - [codeblock] + [codeblocks] + [gdscript] var margin_value = 100 set("custom_constants/margin_top", margin_value) set("custom_constants/margin_left", margin_value) set("custom_constants/margin_bottom", margin_value) set("custom_constants/margin_right", margin_value) - [/codeblock] + [/gdscript] + [csharp] + int marginValue = 100; + Set("custom_constants/margin_top", marginValue); + Set("custom_constants/margin_left", marginValue); + Set("custom_constants/margin_bottom", marginValue); + Set("custom_constants/margin_right", marginValue); + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index dcc3bbf2a6..e107b1a108 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -7,16 +7,44 @@ MeshDataTool provides access to individual vertices in a [Mesh]. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. To use MeshDataTool, load a mesh with [method create_from_surface]. When you are finished editing the data commit the data to a mesh with [method commit_to_surface]. Below is an example of how MeshDataTool may be used. - [codeblock] + [codeblocks] + [gdscript] + var mesh = ArrayMesh.new() + mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, CubeMesh.new().get_mesh_arrays()) var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) for i in range(mdt.get_vertex_count()): var vertex = mdt.get_vertex(i) - ... + # In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded. + vertex += mdt.get_vertex_normal(i) + # Save your change. mdt.set_vertex(i, vertex) mesh.surface_remove(0) mdt.commit_to_surface(mesh) - [/codeblock] + var mi = MeshInstance.new() + mi.mesh = mesh + add_child(mi) + [/gdscript] + [csharp] + var mesh = new ArrayMesh(); + mesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, new CubeMesh().GetMeshArrays()); + var mdt = new MeshDataTool(); + mdt.CreateFromSurface(mesh, 0); + for (var i = 0; i < mdt.GetVertexCount(); i++) + { + Vector3 vertex = mdt.GetVertex(i); + // In this example we extend the mesh by one unit, which results in seperated faces as it is flat shaded. + vertex += mdt.GetVertexNormal(i); + // Save your change. + mdt.SetVertex(i, vertex); + } + mesh.SurfaceRemove(0); + mdt.CommitToSurface(mesh); + var mi = new MeshInstance(); + mi.Mesh = mesh; + AddChild(mi); + [/csharp] + [/codeblocks] See also [ArrayMesh], [ImmediateGeometry3D] and [SurfaceTool] for procedural geometry generation. [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index e75efa3b27..38921078d7 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -6,22 +6,41 @@ <description> There are two ways to create polygons. Either by using the [method add_outline] method, or using the [method add_polygon] method. Using [method add_outline]: - [codeblock] + [codeblocks] + [gdscript] var polygon = NavigationPolygon.new() var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) polygon.add_outline(outline) polygon.make_polygons_from_outlines() $NavigationRegion2D.navpoly = polygon - [/codeblock] + [/gdscript] + [csharp] + var polygon = new NavigationPolygon(); + var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + polygon.AddOutline(outline); + polygon.MakePolygonsFromOutlines(); + GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon; + [/csharp] + [/codeblocks] Using [method add_polygon] and indices of the vertices array. - [codeblock] + [codeblocks] + [gdscript] var polygon = NavigationPolygon.new() var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.set_vertices(vertices) + polygon.vertices = vertices var indices = PackedInt32Array(0, 3, 1) polygon.add_polygon(indices) $NavigationRegion2D.navpoly = polygon - [/codeblock] + [/gdscript] + [csharp] + var polygon = new NavigationPolygon(); + var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + polygon.Vertices = vertices; + var indices = new int[] { 0, 3, 1 }; + polygon.AddPolygon(indices); + GetNode<NavigationRegion2D>("NavigationRegion2D").Navpoly = polygon; + [/csharp] + [/codeblocks] </description> <tutorials> <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 2e8b76865d..3f212fa0f6 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -130,11 +130,22 @@ 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 an human-readable name based on the name of the node being instanced instead of its type. [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: - [codeblock] + [codeblocks] + [gdscript] + var child_node = get_child(0) if child_node.get_parent(): child_node.get_parent().remove_child(child_node) add_child(child_node) - [/codeblock] + [/gdscript] + [csharp] + Node childNode = GetChild(0); + if (childNode.GetParent() != null) + { + childNode.GetParent().RemoveChild(childNode); + } + AddChild(childNode); + [/csharp] + [/codeblocks] If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method. [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> @@ -275,12 +286,20 @@ /root/Swamp/Goblin [/codeblock] Possible paths are: - [codeblock] + [codeblocks] + [gdscript] get_node("Sword") get_node("Backpack/Dagger") get_node("../Swamp/Alligator") get_node("/root/MyGame") - [/codeblock] + [/gdscript] + [csharp] + GetNode("Sword"); + GetNode("Backpack/Dagger"); + GetNode("../Swamp/Alligator"); + GetNode("/root/MyGame"); + [/csharp] + [/codeblocks] </description> </method> <method name="get_node_and_resource"> @@ -292,11 +311,18 @@ Fetches a node and one of its resources as specified by the [NodePath]'s subname (e.g. [code]Area2D/CollisionShape2D:shape[/code]). If several nested resources are specified in the [NodePath], the last one will be fetched. The return value is an array of size 3: the first index points to the [Node] (or [code]null[/code] if not found), the second index points to the [Resource] (or [code]null[/code] if not found), and the third index is the remaining [NodePath], if any. For example, assuming that [code]Area2D/CollisionShape2D[/code] is a valid node and that its [code]shape[/code] property has been assigned a [RectangleShape2D] resource, one could have this kind of output: - [codeblock] + [codeblocks] + [gdscript] print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ] print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ] print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents] - [/codeblock] + [/gdscript] + [csharp] + GD.Print(GetNodeAndResource("Area2D/CollisionShape2D")); // [[CollisionShape2D:1161], Null, ] + GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], ] + GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape:extents")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents] + [/csharp] + [/codeblocks] </description> </method> <method name="get_node_or_null" qualifiers="const"> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index f711ba4d6b..36835d9e94 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -25,7 +25,23 @@ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> </tutorials> <methods> - <method name="NodePath"> + <method name="NodePath" qualifiers="constructor"> + <return type="NodePath"> + </return> + <description> + Constructs an empty [NodePath]. + </description> + </method> + <method name="NodePath" qualifiers="constructor"> + <return type="NodePath"> + </return> + <argument index="0" name="from" type="NodePath"> + </argument> + <description> + Constructs a [NodePath] as a copy of the given [NodePath]. + </description> + </method> + <method name="NodePath" qualifiers="constructor"> <return type="NodePath"> </return> <argument index="0" name="from" type="String"> @@ -35,7 +51,7 @@ The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties): [codeblock] - # Points to the Sprite2D node + # Points to the Sprite2D node. "Path2D/PathFollow2D/Sprite2D" # Points to the Sprite2D node and its "texture" resource. # get_node() would retrieve "Sprite2D", while get_node_and_resource() @@ -54,14 +70,23 @@ <return type="NodePath"> </return> <description> - Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). - [codeblock] - # This will be parsed as a node path to the "x" property in the "position" node + Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the from the current node). + [codeblocks] + [gdscript] + # This will be parsed as a node path to the "x" property in the "position" node. var node_path = NodePath("position:x") - # This will be parsed as a node path to the "x" component of the "position" property in the current node + # This will be parsed as a node path to the "x" component of the "position" property in the current node. var property_path = node_path.get_as_property_path() print(property_path) # :position:x - [/codeblock] + [/gdscript] + [csharp] + // This will be parsed as a node path to the "x" property in the "position" node. + var nodePath = new NodePath("position:x"); + // This will be parsed as a node path to the "x" component of the "position" property in the current node. + NodePath propertyPath = nodePath.GetAsPropertyPath(); + GD.Print(propertyPath); // :position:x + [/csharp] + [/codeblocks] </description> </method> <method name="get_concatenated_subnames"> @@ -69,10 +94,16 @@ </return> <description> Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path. - [codeblock] + [codeblocks] + [gdscript] var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") print(nodepath.get_concatenated_subnames()) # texture:load_path - [/codeblock] + [/gdscript] + [csharp] + var nodepath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); + GD.Print(nodepath.GetConcatenatedSubnames()); // texture:load_path + [/csharp] + [/codeblocks] </description> </method> <method name="get_name"> @@ -82,12 +113,20 @@ </argument> <description> Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). - [codeblock] + [codeblocks] + [gdscript] var node_path = NodePath("Path2D/PathFollow2D/Sprite2D") print(node_path.get_name(0)) # Path2D print(node_path.get_name(1)) # PathFollow2D print(node_path.get_name(2)) # Sprite - [/codeblock] + [/gdscript] + [csharp] + var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D"); + GD.Print(nodePath.GetName(0)); // Path2D + GD.Print(nodePath.GetName(1)); // PathFollow2D + GD.Print(nodePath.GetName(2)); // Sprite + [/csharp] + [/codeblocks] </description> </method> <method name="get_name_count"> @@ -105,11 +144,18 @@ </argument> <description> Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). - [codeblock] + [codeblocks] + [gdscript] var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") print(node_path.get_subname(0)) # texture print(node_path.get_subname(1)) # load_path - [/codeblock] + [/gdscript] + [csharp] + var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); + GD.Print(nodePath.GetSubname(0)); // texture + GD.Print(nodePath.GetSubname(1)); // load_path + [/csharp] + [/codeblocks] </description> </method> <method name="get_subname_count"> @@ -134,6 +180,22 @@ Returns [code]true[/code] if the node path is empty. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="NodePath"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 1487c9e078..1d80695798 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -85,18 +85,36 @@ If [code]blocking[/code] is [code]false[/code], the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty. The return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return [code]-1[/code] or another exit code. Example of blocking mode and retrieving the shell output: - [codeblock] + [codeblocks] + [gdscript] var output = [] var exit_code = OS.execute("ls", ["-l", "/tmp"], true, output) - [/codeblock] + [/gdscript] + [csharp] + var output = new Godot.Collections.Array(); + int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, true, output); + [/csharp] + [/codeblocks] Example of non-blocking mode, running another instance of the project and storing its process ID: - [codeblock] + [codeblocks] + [gdscript] var pid = OS.execute(OS.get_executable_path(), [], false) - [/codeblock] + [/gdscript] + [csharp] + var pid = OS.Execute(OS.GetExecutablePath(), new string[] {}, false); + [/csharp] + [/codeblocks] If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example: - [codeblock] + [codeblocks] + [gdscript] + var output = [] OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) - [/codeblock] + [/gdscript] + [csharp] + var output = new Godot.Collections.Array(); + OS.Execute("CMD.exe", new string[] {"/C", "cd %TEMP% && dir"}, true, output); + [/csharp] + [/codeblocks] [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> @@ -118,13 +136,26 @@ You can also incorporate environment variables using the [method get_environment] method. You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project. Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments: - [codeblock] + [codeblocks] + [gdscript] var arguments = {} for argument in OS.get_cmdline_args(): if argument.find("=") > -1: var key_value = argument.split("=") arguments[key_value[0].lstrip("--")] = key_value[1] - [/codeblock] + [/gdscript] + [csharp] + var arguments = new Godot.Collections.Dictionary(); + foreach (var argument in OS.GetCmdlineArgs()) + { + if (argument.Find("=") > -1) + { + string[] keyValue = argument.Split("="); + arguments[keyValue[0].LStrip("--")] = keyValue[1]; + } + } + [/csharp] + [/codeblocks] </description> </method> <method name="get_connected_midi_inputs"> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index 6b500d5ac3..e3c78e08f1 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -5,12 +5,20 @@ </brief_description> <description> The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack]. - [codeblock] + [codeblocks] + [gdscript] var packer = PCKPacker.new() packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") packer.flush() - [/codeblock] + [/gdscript] + [csharp] + var packer = new PCKPacker(); + packer.PckStart("test.pck"); + packer.AddFile("res://text.txt", "text.txt"); + packer.Flush(); + [/csharp] + [/codeblocks] The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package. </description> <tutorials> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 7c2d566466..91d066260b 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -10,7 +10,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedByteArray"> + <method name="PackedByteArray" qualifiers="constructor"> + <return type="PackedByteArray"> + </return> + <description> + Constructs an empty [PackedByteArray]. + </description> + </method> + <method name="PackedByteArray" qualifiers="constructor"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="from" type="PackedByteArray"> + </argument> + <description> + Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]. + </description> + </method> + <method name="PackedByteArray" qualifiers="constructor"> <return type="PackedByteArray"> </return> <argument index="0" name="from" type="Array"> @@ -119,10 +135,16 @@ </return> <description> Returns a hexadecimal representation of this array as a [String]. - [codeblock] + [codeblocks] + [gdscript] var array = PackedByteArray([11, 46, 255]) print(array.hex_encode()) # Prints: 0b2eff - [/codeblock] + [/gdscript] + [csharp] + var array = new byte[] {11, 46, 255}; + GD.Print(array.HexEncode()); // Prints: 0b2eff + [/csharp] + [/codeblocks] </description> </method> <method name="insert"> @@ -143,6 +165,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="right" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index c42d14c5bd..3065d16945 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -10,7 +10,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedColorArray"> + <method name="PackedColorArray" qualifiers="constructor"> + <return type="PackedColorArray"> + </return> + <description> + Constructs an empty [PackedColorArray]. + </description> + </method> + <method name="PackedColorArray" qualifiers="constructor"> + <return type="PackedColorArray"> + </return> + <argument index="0" name="from" type="PackedColorArray"> + </argument> + <description> + Constructs a [PackedColorArray] as a copy of the given [PackedColorArray]. + </description> + </method> + <method name="PackedColorArray" qualifiers="constructor"> <return type="PackedColorArray"> </return> <argument index="0" name="from" type="Array"> @@ -71,6 +87,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedColorArray"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedColorArray"> + </return> + <argument index="0" name="right" type="PackedColorArray"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedColorArray"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index dd84648251..ab9594d2e3 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -11,7 +11,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedFloat32Array"> + <method name="PackedFloat32Array" qualifiers="constructor"> + <return type="PackedFloat32Array"> + </return> + <description> + Constructs an empty [PackedFloat32Array]. + </description> + </method> + <method name="PackedFloat32Array" qualifiers="constructor"> + <return type="PackedFloat32Array"> + </return> + <argument index="0" name="from" type="PackedFloat32Array"> + </argument> + <description> + Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array]. + </description> + </method> + <method name="PackedFloat32Array" qualifiers="constructor"> <return type="PackedFloat32Array"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,30 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedFloat32Array"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedFloat32Array"> + </return> + <argument index="0" name="right" type="PackedFloat32Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedFloat32Array"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index 91c3f4874b..3088aee483 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -11,7 +11,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedFloat64Array"> + <method name="PackedFloat64Array" qualifiers="constructor"> + <return type="PackedFloat64Array"> + </return> + <description> + Constructs an empty [PackedFloat64Array]. + </description> + </method> + <method name="PackedFloat64Array" qualifiers="constructor"> + <return type="PackedFloat64Array"> + </return> + <argument index="0" name="from" type="PackedFloat64Array"> + </argument> + <description> + Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array]. + </description> + </method> + <method name="PackedFloat64Array" qualifiers="constructor"> <return type="PackedFloat64Array"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedFloat64Array"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedFloat64Array"> + </return> + <argument index="0" name="right" type="PackedFloat64Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedFloat64Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index a0a9922d0c..eded545de8 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -11,7 +11,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedInt32Array"> + <method name="PackedInt32Array" qualifiers="constructor"> + <return type="PackedInt32Array"> + </return> + <description> + Constructs an empty [PackedInt32Array]. + </description> + </method> + <method name="PackedInt32Array" qualifiers="constructor"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="from" type="PackedInt32Array"> + </argument> + <description> + Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array]. + </description> + </method> + <method name="PackedInt32Array" qualifiers="constructor"> <return type="PackedInt32Array"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="right" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 542dabcfa0..83731b1023 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -11,7 +11,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedInt64Array"> + <method name="PackedInt64Array" qualifiers="constructor"> + <return type="PackedInt64Array"> + </return> + <description> + Constructs an empty [PackedInt64Array]. + </description> + </method> + <method name="PackedInt64Array" qualifiers="constructor"> + <return type="PackedInt64Array"> + </return> + <argument index="0" name="from" type="PackedInt64Array"> + </argument> + <description> + Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array]. + </description> + </method> + <method name="PackedInt64Array" qualifiers="constructor"> <return type="PackedInt64Array"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedInt64Array"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedInt64Array"> + </return> + <argument index="0" name="right" type="PackedInt64Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedInt64Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index be40ab05de..d15bcfd114 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -8,14 +8,23 @@ Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). [b]Note:[/b] The node doesn't need to own itself. [b]Example of loading a saved scene:[/b] - [codeblock] - # Use `load()` instead of `preload()` if the path isn't known at compile-time. + [codeblocks] + [gdscript] + # Use load() instead of preload() if the path isn't known at compile-time. var scene = preload("res://scene.tscn").instance() # Add the node as a child of the node the script is attached to. add_child(scene) - [/codeblock] + [/gdscript] + [csharp] + // C# has no preload, so you have to always use ResourceLoader.Load<PackedScene>(). + var scene = ResourceLoader.Load<PackedScene>("res://scene.tscn").Instance(); + // Add the node as a child of the node the script is attached to. + AddChild(scene); + [/csharp] + [/codeblocks] [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. - [codeblock] + [codeblocks] + [gdscript] # Create the objects. var node = Node2D.new() var rigid = RigidBody2D.new() @@ -27,15 +36,41 @@ # Change owner of `rigid`, but not of `collision`. rigid.owner = node - var scene = PackedScene.new() + # Only `node` and `rigid` are now packed. var result = scene.pack(node) if result == OK: - var error = ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." + var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..." if error != OK: push_error("An error occurred while saving the scene to disk.") - [/codeblock] + [/gdscript] + [csharp] + // Create the objects. + var node = new Node2D(); + var rigid = new RigidBody2D(); + var collision = new CollisionShape2D(); + + // Create the object hierarchy. + rigid.AddChild(collision); + node.AddChild(rigid); + + // Change owner of `rigid`, but not of `collision`. + rigid.Owner = node; + var scene = new PackedScene(); + + // Only `node` and `rigid` are now packed. + Error result = scene.Pack(node); + if (result == Error.Ok) + { + Error error = ResourceSaver.Save("res://path/name.tscn", scene); // Or "user://..." + if (error != Error.Ok) + { + GD.PushError("An error occurred while saving the scene to disk."); + } + } + [/csharp] + [/codeblocks] </description> <tutorials> <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 7c710cf0fb..c71f5ffa7e 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -11,7 +11,23 @@ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> - <method name="PackedStringArray"> + <method name="PackedStringArray" qualifiers="constructor"> + <return type="PackedStringArray"> + </return> + <description> + Constructs an empty [PackedStringArray]. + </description> + </method> + <method name="PackedStringArray" qualifiers="constructor"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="from" type="PackedStringArray"> + </argument> + <description> + Constructs a [PackedStringArray] as a copy of the given [PackedStringArray]. + </description> + </method> + <method name="PackedStringArray" qualifiers="constructor"> <return type="PackedStringArray"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,38 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedStringArray"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="right" type="PackedStringArray"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedStringArray"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="String"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 98034afc93..5f68d9256d 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -11,7 +11,23 @@ <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link> </tutorials> <methods> - <method name="PackedVector2Array"> + <method name="PackedVector2Array" qualifiers="constructor"> + <return type="PackedVector2Array"> + </return> + <description> + Constructs an empty [PackedVector2Array]. + </description> + </method> + <method name="PackedVector2Array" qualifiers="constructor"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="from" type="PackedVector2Array"> + </argument> + <description> + Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array]. + </description> + </method> + <method name="PackedVector2Array" qualifiers="constructor"> <return type="PackedVector2Array"> </return> <argument index="0" name="from" type="Array"> @@ -72,6 +88,46 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedVector2Array"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="right" type="PackedVector2Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedVector2Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 3db33fbcd9..e681e1deb7 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -10,7 +10,23 @@ <tutorials> </tutorials> <methods> - <method name="PackedVector3Array"> + <method name="PackedVector3Array" qualifiers="constructor"> + <return type="PackedVector3Array"> + </return> + <description> + Constructs an empty [PackedVector3Array]. + </description> + </method> + <method name="PackedVector3Array" qualifiers="constructor"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array]. + </description> + </method> + <method name="PackedVector3Array" qualifiers="constructor"> <return type="PackedVector3Array"> </return> <argument index="0" name="from" type="Array"> @@ -71,6 +87,46 @@ Reverses the order of the elements in the array. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedVector3Array"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="right" type="PackedVector3Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="PackedVector3Array"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="push_back"> <return type="bool"> </return> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index cab821b4c0..d7cf6cc8c6 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -124,17 +124,36 @@ <description> Waits for a packet to arrive on the listening port. See [method listen]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: - [codeblock] - # Server - socket.set_dest_address("127.0.0.1", 789) - socket.put_packet("Time to stop".to_ascii()) + [codeblocks] + [gdscript] + socket = PacketPeerUDP.new() + # Server + socket.set_dest_address("127.0.0.1", 789) + socket.put_packet("Time to stop".to_ascii()) - # Client - while socket.wait() == OK: - var data = socket.get_packet().get_string_from_ascii() - if data == "Time to stop": - return - [/codeblock] + # Client + while socket.wait() == OK: + var data = socket.get_packet().get_string_from_ascii() + if data == "Time to stop": + return + [/gdscript] + [csharp] + var socket = new PacketPeerUDP(); + // Server + socket.SetDestAddress("127.0.0.1", 789); + socket.PutPacket("Time To Stop".ToAscii()); + + // Client + while (socket.Wait() == OK) + { + string data = socket.GetPacket().GetStringFromASCII(); + if (data == "Time to stop") + { + return; + } + } + [/csharp] + [/codeblocks] </description> </method> </methods> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 0a9079ce71..9e9c5063ae 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -24,14 +24,53 @@ </argument> <description> Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". - [codeblock] - Performance.add_custom_monitor("MyCategory/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "MyCategory" - Performance.add_custom_monitor("MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom" - # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so above code is valid - Performance.add_custom_monitor("Custom/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom" - # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so above code is valid - Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", some_callable) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom" - [/codeblock] + [codeblocks] + [gdscript] + func _ready(): + var monitor_value = Callable(self, "get_monitor_value") + + # Adds monitor with name "MyName" to category "MyCategory". + Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value) + + # Adds monitor with name "MyName" to category "Custom". + # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. + Performance.add_custom_monitor("MyMonitor", monitor_value) + + # Adds monitor with name "MyName" to category "Custom". + # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. + Performance.add_custom_monitor("Custom/MyMonitor", monitor_value) + + # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". + Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitor_value) + + func get_monitor_value(): + return randi() % 25 + [/gdscript] + [csharp] + public override void _Ready() + { + var monitorValue = new Callable(this, nameof(GetMonitorValue)); + + // Adds monitor with name "MyName" to category "MyCategory". + Performance.AddCustomMonitor("MyCategory/MyMonitor", monitorValue); + // Adds monitor with name "MyName" to category "Custom". + // Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid. + Performance.AddCustomMonitor("MyMonitor", monitorValue); + + // Adds monitor with name "MyName" to category "Custom". + // Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid. + Performance.AddCustomMonitor("Custom/MyMonitor", monitorValue); + + // Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom". + Performance.AddCustomMonitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitorValue); + } + + public int GetMonitorValue() + { + return GD.Randi() % 25; + } + [/csharp] + [/codeblocks] The debugger calls the callable to get the value of custom monitor. The callable must return a number. Callables are called with arguments supplied in argument array. [b]Note:[/b] It throws an error if given id is already present. @@ -61,9 +100,14 @@ </argument> <description> Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: - [codeblock] - print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console - [/codeblock] + [codeblocks] + [gdscript] + print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console. + [/gdscript] + [csharp] + GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console. + [/csharp] + [/codeblocks] </description> </method> <method name="get_monitor_modification_time"> diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 93ca684b95..4d7fc61517 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -34,19 +34,34 @@ </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: - [codeblock] - var shape_rid = PhysicsServer2D.circle_shape_create() - var radius = 64 - PhysicsServer2D.shape_set_data(shape_rid, radius) + [codeblocks] + [gdscript] + var shape_rid = PhysicsServer2D.circle_shape_create() + var radius = 64 + PhysicsServer2D.shape_set_data(shape_rid, radius) - var params = PhysicsShapeQueryParameters2D.new() - params.shape_rid = shape_rid + var params = PhysicsShapeQueryParameters2D.new() + params.shape_rid = shape_rid - # Execute physics queries here... + # Execute physics queries here... - # Release the shape when done with physics queries. - PhysicsServer2D.free_rid(shape_rid) - [/codeblock] + # Release the shape when done with physics queries. + PhysicsServer2D.free_rid(shape_rid) + [/gdscript] + [csharp] + RID shapeRid = PhysicsServer2D.CircleShapeCreate(); + int radius = 64; + PhysicsServer2D.ShapeSetData(shapeRid, radius); + + var params = new PhysicsShapeQueryParameters2D(); + params.ShapeRid = shapeRid; + + // Execute physics queries here... + + // Release the shape when done with physics queries. + PhysicsServer2D.FreeRid(shapeRid); + [/csharp] + [/codeblocks] </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> The queried shape's transform matrix. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 167fb31bb3..4b43ea66fc 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -31,19 +31,34 @@ </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: - [codeblock] - var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE) - var radius = 2.0 - PhysicsServer3D.shape_set_data(shape_rid, radius) + [codeblocks] + [gdscript] + var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE) + var radius = 2.0 + PhysicsServer3D.shape_set_data(shape_rid, radius) - var params = PhysicsShapeQueryParameters3D.new() - params.shape_rid = shape_rid + var params = PhysicsShapeQueryParameters3D.new() + params.shape_rid = shape_rid - # Execute physics queries here... + # Execute physics queries here... - # Release the shape when done with physics queries. - PhysicsServer3D.free_rid(shape_rid) - [/codeblock] + # Release the shape when done with physics queries. + PhysicsServer3D.free_rid(shape_rid) + [/gdscript] + [csharp] + RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere); + float radius = 2.0f; + PhysicsServer3D.ShapeSetData(shapeRid, radius); + + var params = new PhysicsShapeQueryParameters3D(); + params.ShapeRid = shapeRid; + + // Execute physics queries here... + + // Release the shape when done with physics queries. + PhysicsServer3D.FreeRid(shapeRid); + [/csharp] + [/codeblocks] </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> The queried shape's transform matrix. diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 9352eee1eb..e3242512c4 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -10,7 +10,23 @@ <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> </tutorials> <methods> - <method name="Plane"> + <method name="Plane" qualifiers="constructor"> + <return type="Plane"> + </return> + <description> + Constructs a default-initialized [Plane] with all components set to [code]0[/code]. + </description> + </method> + <method name="Plane" qualifiers="constructor"> + <return type="Plane"> + </return> + <argument index="0" name="from" type="Plane"> + </argument> + <description> + Constructs a [Plane] as a copy of the given [Plane]. + </description> + </method> + <method name="Plane" qualifiers="constructor"> <return type="Plane"> </return> <argument index="0" name="a" type="float"> @@ -25,28 +41,39 @@ 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. </description> </method> - <method name="Plane"> + <method name="Plane" qualifiers="constructor"> <return type="Plane"> </return> - <argument index="0" name="v1" type="Vector3"> + <argument index="0" name="normal" type="Vector3"> </argument> - <argument index="1" name="v2" type="Vector3"> + <argument index="1" name="d" type="float"> </argument> - <argument index="2" name="v3" type="Vector3"> + <description> + Creates a plane from the normal and the plane's distance to the origin. + </description> + </method> + <method name="Plane" qualifiers="constructor"> + <return type="Plane"> + </return> + <argument index="0" name="point" type="Vector3"> + </argument> + <argument index="1" name="normal" type="Vector3"> </argument> <description> - Creates a plane from the three points, given in clockwise order. + Creates a plane from the given position and a plane normal. </description> </method> - <method name="Plane"> + <method name="Plane" qualifiers="constructor"> <return type="Plane"> </return> - <argument index="0" name="normal" type="Vector3"> + <argument index="0" name="point1" type="Vector3"> </argument> - <argument index="1" name="d" type="float"> + <argument index="1" name="point2" type="Vector3"> + </argument> + <argument index="2" name="point3" type="Vector3"> </argument> <description> - Creates a plane from the normal and the plane's distance to the origin. + Creates a plane from the three points, given in clockwise order. </description> </method> <method name="center"> @@ -134,6 +161,34 @@ Returns a copy of the plane, normalized. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Plane"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Plane"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Plane"> + </return> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Plane"> + </argument> + <description> + </description> + </method> <method name="project"> <return type="Vector3"> </return> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 9e7f26ed4f..7e9bccc1d7 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -14,11 +14,18 @@ </return> <description> Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example: - [codeblock] - var c := CylinderMesh.new() - var arr_mesh := ArrayMesh.new() + [codeblocks] + [gdscript] + var c = CylinderMesh.new() + var arr_mesh = ArrayMesh.new() arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays()) - [/codeblock] + [/gdscript] + [csharp] + var c = new CylinderMesh(); + var arrMesh = new ArrayMesh(); + arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, c.GetMeshArrays()); + [/csharp] + [/codeblocks] </description> </method> </methods> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7ca2dae4d7..96d71db383 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -25,7 +25,8 @@ - [code]type[/code]: [int] (see [enum Variant.Type]) - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] ProjectSettings.set("category/property_name", 0) var property_info = { @@ -36,7 +37,21 @@ } ProjectSettings.add_property_info(property_info) - [/codeblock] + [/gdscript] + [csharp] + ProjectSettings.Singleton.Set("category/property_name", 0); + + var propertyInfo = new Godot.Collections.Dictionary + { + {"name", "category/propertyName"}, + {"type", Variant.Type.Int}, + {"hint", PropertyHint.Enum}, + {"hint_string", "one,two,three"}, + }; + + ProjectSettings.AddPropertyInfo(propertyInfo); + [/csharp] + [/codeblocks] </description> </method> <method name="clear"> @@ -65,9 +80,14 @@ <description> Returns the value of a setting. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] print(ProjectSettings.get_setting("application/config/name")) - [/codeblock] + [/gdscript] + [csharp] + GD.Print(ProjectSettings.GetSetting("application/config/name")); + [/csharp] + [/codeblocks] </description> </method> <method name="globalize_path" qualifiers="const"> @@ -178,9 +198,14 @@ <description> Sets the value of a setting. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] ProjectSettings.set_setting("application/config/name", "Example") - [/codeblock] + [/gdscript] + [csharp] + ProjectSettings.SetSetting("application/config/name", "Example"); + [/csharp] + [/codeblocks] </description> </method> </methods> @@ -858,7 +883,7 @@ 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. </member> <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16"> - Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped. + Default size of packet peer stream for deserializing Godot data (in bytes, specified as a power of two). The default value [code]16[/code] is equal to 65,536 bytes. Over this size, data is dropped. </member> <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30"> Timeout (in seconds) for connection attempts using TCP. @@ -895,18 +920,30 @@ <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> The default gravity strength in 2D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: - [codeblock] + [codeblocks] + [gdscript] # Set the default gravity strength to 98. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY, 98) - [/codeblock] + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98) + [/gdscript] + [csharp] + // Set the default gravity strength to 98. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98); + [/csharp] + [/codeblocks] </member> <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> The default gravity direction in 2D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: - [codeblock] + [codeblocks] + [gdscript] # Set the default gravity direction to `Vector2(0, 1)`. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1)) - [/codeblock] + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2.DOWN) + [/gdscript] + [csharp] + // Set the default gravity direction to `Vector2(0, 1)`. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.GravityVector, Vector2.Down) + [/csharp] + [/codeblocks] </member> <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 2D. @@ -942,18 +979,30 @@ <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> The default gravity strength in 3D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: - [codeblock] + [codeblocks] + [gdscript] # Set the default gravity strength to 9.8. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) - [/codeblock] + PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) + [/gdscript] + [csharp] + // Set the default gravity strength to 9.8. + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); + [/csharp] + [/codeblocks] </member> <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )"> The default gravity direction in 3D. [b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: - [codeblock] + [codeblocks] + [gdscript] # Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)) - [/codeblock] + PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) + [/gdscript] + [csharp] + // Set the default gravity direction to `Vector3(0, -1, 0)`. + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) + [/csharp] + [/codeblocks] </member> <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 3D. diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 76cfa0d99d..5932a624f2 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -13,22 +13,33 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> - <method name="Quat"> + <method name="Quat" qualifiers="constructor"> <return type="Quat"> </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> + <description> + Constructs a default-initialized quaternion with all components set to [code]0[/code]. + </description> + </method> + <method name="Quat" qualifiers="constructor"> + <return type="Quat"> + </return> + <argument index="0" name="from" type="Quat"> </argument> - <argument index="2" name="z" type="float"> + <description> + Constructs a [Quat] as a copy of the given [Quat]. + </description> + </method> + <method name="Quat" qualifiers="constructor"> + <return type="Quat"> + </return> + <argument index="0" name="arc_from" type="Vector3"> </argument> - <argument index="3" name="w" type="float"> + <argument index="1" name="arc_to" type="Vector3"> </argument> <description> - Constructs a quaternion defined by the given values. </description> </method> - <method name="Quat"> + <method name="Quat" qualifiers="constructor"> <return type="Quat"> </return> <argument index="0" name="axis" type="Vector3"> @@ -39,7 +50,7 @@ Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. </description> </method> - <method name="Quat"> + <method name="Quat" qualifiers="constructor"> <return type="Quat"> </return> <argument index="0" name="euler" type="Vector3"> @@ -48,7 +59,7 @@ Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> - <method name="Quat"> + <method name="Quat" qualifiers="constructor"> <return type="Quat"> </return> <argument index="0" name="from" type="Basis"> @@ -57,6 +68,21 @@ Constructs a quaternion from the given [Basis]. </description> </method> + <method name="Quat" qualifiers="constructor"> + <return type="Quat"> + </return> + <argument index="0" name="x" type="float"> + </argument> + <argument index="1" name="y" type="float"> + </argument> + <argument index="2" name="z" type="float"> + </argument> + <argument index="3" name="w" type="float"> + </argument> + <description> + Constructs a quaternion defined by the given values. + </description> + </method> <method name="cubic_slerp"> <return type="Quat"> </return> @@ -132,6 +158,98 @@ Returns a copy of the quaternion, normalized to unit length. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Quat"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Quat"> + </return> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="slerp"> <return type="Quat"> </return> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 644c427120..0ee34d4194 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -9,13 +9,20 @@ <tutorials> </tutorials> <methods> - <method name="RID"> + <method name="RID" qualifiers="constructor"> <return type="RID"> </return> - <argument index="0" name="from" type="Object"> + <description> + Constructs an empty [RID] with the invalid ID [code]0[/code]. + </description> + </method> + <method name="RID" qualifiers="constructor"> + <return type="RID"> + </return> + <argument index="0" name="from" type="RID"> </argument> <description> - Creates a new RID instance with the ID of a given resource. When not handed a valid resource, silently stores the unused ID 0. + Constructs a [RID] as a copy of the given [RID]. </description> </method> <method name="get_id"> @@ -25,6 +32,54 @@ Returns the ID of the referenced resource. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="RID"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index a72ba35a98..02a77a0e24 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -14,7 +14,32 @@ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link> </tutorials> <methods> - <method name="Rect2"> + <method name="Rect2" qualifiers="constructor"> + <return type="Rect2"> + </return> + <description> + Constructs a default-initialized [Rect2] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="Rect2" qualifiers="constructor"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a [Rect2] as a copy of the given [Rect2]. + </description> + </method> + <method name="Rect2" qualifiers="constructor"> + <return type="Rect2"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2] from a [Rect2i]. + </description> + </method> + <method name="Rect2" qualifiers="constructor"> <return type="Rect2"> </return> <argument index="0" name="position" type="Vector2"> @@ -25,7 +50,7 @@ Constructs a [Rect2] by position and size. </description> </method> - <method name="Rect2"> + <method name="Rect2" qualifiers="constructor"> <return type="Rect2"> </return> <argument index="0" name="x" type="float"> @@ -40,15 +65,6 @@ Constructs a [Rect2] by x, y, width, and height. </description> </method> - <method name="Rect2"> - <return type="Rect2"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> - <description> - Constructs a [Rect2] from a [Rect2i]. - </description> - </method> <method name="abs"> <return type="Rect2"> </return> @@ -171,6 +187,30 @@ Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Rect2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Rect2"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Rect2"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index de2932e816..e8b75a6ac6 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -12,7 +12,32 @@ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link> </tutorials> <methods> - <method name="Rect2i"> + <method name="Rect2i" qualifiers="constructor"> + <return type="Rect2i"> + </return> + <description> + Constructs a default-initialized [Rect2i] with default (zero) values of [member position] and [member size]. + </description> + </method> + <method name="Rect2i" qualifiers="constructor"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a [Rect2i] as a copy of the given [Rect2i]. + </description> + </method> + <method name="Rect2i" qualifiers="constructor"> + <return type="Rect2i"> + </return> + <argument index="0" name="from" type="Rect2"> + </argument> + <description> + Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. + </description> + </method> + <method name="Rect2i" qualifiers="constructor"> <return type="Rect2i"> </return> <argument index="0" name="position" type="Vector2i"> @@ -23,7 +48,7 @@ Constructs a [Rect2i] by position and size. </description> </method> - <method name="Rect2i"> + <method name="Rect2i" qualifiers="constructor"> <return type="Rect2i"> </return> <argument index="0" name="x" type="int"> @@ -38,15 +63,6 @@ Constructs a [Rect2i] by x, y, width, and height. </description> </method> - <method name="Rect2i"> - <return type="Rect2i"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> - <description> - Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. - </description> - </method> <method name="abs"> <return type="Rect2i"> </return> @@ -158,6 +174,22 @@ Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Rect2i"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Rect2i"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="end" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )"> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 51490caf6f..b7a2258fc1 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -8,15 +8,31 @@ <tutorials> </tutorials> <methods> - <method name="Signal"> + <method name="Signal" qualifiers="constructor"> + <return type="Signal"> + </return> + <description> + Constructs a null [Signal] with no object nor signal name bound. + </description> + </method> + <method name="Signal" qualifiers="constructor"> + <return type="Signal"> + </return> + <argument index="0" name="from" type="Signal"> + </argument> + <description> + Constructs a [Signal] as a copy of the given [Signal]. + </description> + </method> + <method name="Signal" qualifiers="constructor"> <return type="Signal"> </return> <argument index="0" name="object" type="Object"> </argument> - <argument index="1" name="signal_name" type="StringName"> + <argument index="1" name="signal" type="StringName"> </argument> <description> - Creates a new signal named [code]signal_name[/code] in the given object. + Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code]. </description> </method> <method name="connect"> @@ -91,6 +107,22 @@ <description> </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Signal"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Signal"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index fcd8f57cd1..4ee9dbf1f9 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -10,160 +10,23 @@ <link title="GDScript format strings">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html</link> </tutorials> <methods> - <method name="String"> + <method name="String" qualifiers="constructor"> <return type="String"> </return> - <argument index="0" name="from" type="bool"> - </argument> - <description> - Constructs a new String from the given [bool]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <description> - Constructs a new String from the given [int]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <description> - Constructs a new String from the given [float]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> <description> - Constructs a new String from the given [Vector2]. + Constructs an empty [String] ([code]""[/code]). </description> </method> - <method name="String"> + <method name="String" qualifiers="constructor"> <return type="String"> </return> - <argument index="0" name="from" type="Vector2i"> + <argument index="0" name="from" type="String"> </argument> <description> - Constructs a new String from the given [Vector2i]. + Constructs a [String] as a copy of the given [String]. </description> </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> - <description> - Constructs a new String from the given [Rect2]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> - <description> - Constructs a new String from the given [Rect2i]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <description> - Constructs a new String from the given [Vector3]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Vector3i"> - </argument> - <description> - Constructs a new String from the given [Vector3i]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Transform2D"> - </argument> - <description> - Constructs a new String from the given [Transform2D]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Plane"> - </argument> - <description> - Constructs a new String from the given [Plane]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Quat"> - </argument> - <description> - Constructs a new String from the given [Quat]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="AABB"> - </argument> - <description> - Constructs a new String from the given [AABB]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Basis"> - </argument> - <description> - Constructs a new String from the given [Basis]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Transform"> - </argument> - <description> - Constructs a new String from the given [Transform]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Color"> - </argument> - <description> - Constructs a new String from the given [Color]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <description> - Constructs a new String from the given [StringName]. - </description> - </method> - <method name="String"> + <method name="String" qualifiers="constructor"> <return type="String"> </return> <argument index="0" name="from" type="NodePath"> @@ -172,130 +35,13 @@ Constructs a new String from the given [NodePath]. </description> </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="RID"> - </argument> - <description> - Constructs a new String from the given [RID]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Callable"> - </argument> - <description> - Constructs a new String from the given [Callable]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Signal"> - </argument> - <description> - Constructs a new String from the given [Signal]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Dictionary"> - </argument> - <description> - Constructs a new String from the given [Dictionary]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="Array"> - </argument> - <description> - Constructs a new String from the given [Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedByteArray"> - </argument> - <description> - Constructs a new String from the given [PackedByteArray]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedInt32Array"> - </argument> - <description> - Constructs a new String from the given [PackedInt32Array]. - </description> - </method> - <method name="String"> + <method name="String" qualifiers="constructor"> <return type="String"> </return> - <argument index="0" name="from" type="PackedInt64Array"> - </argument> - <description> - Constructs a new String from the given [PackedInt64Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedFloat32Array"> - </argument> - <description> - Constructs a new String from the given [PackedFloat32Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedFloat64Array"> - </argument> - <description> - Constructs a new String from the given [PackedFloat64Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedStringArray"> - </argument> - <description> - Constructs a new String from the given [PackedStringArray]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedVector2Array"> - </argument> - <description> - Constructs a new String from the given [PackedVector2Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedVector3Array"> - </argument> - <description> - Constructs a new String from the given [PackedVector3Array]. - </description> - </method> - <method name="String"> - <return type="String"> - </return> - <argument index="0" name="from" type="PackedColorArray"> + <argument index="0" name="from" type="StringName"> </argument> <description> - Constructs a new String from the given [PackedColorArray]. + Constructs a new String from the given [StringName]. </description> </method> <method name="begins_with"> @@ -720,6 +466,86 @@ 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> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="String"> + </return> + <argument index="0" name="right" type="Variant"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="String"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> <method name="ord_at"> <return type="int"> </return> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 5d8ac6fdcc..af0074f080 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -9,7 +9,23 @@ <tutorials> </tutorials> <methods> - <method name="StringName"> + <method name="StringName" qualifiers="constructor"> + <return type="StringName"> + </return> + <description> + Constructs an empty [StringName]. + </description> + </method> + <method name="StringName" qualifiers="constructor"> + <return type="StringName"> + </return> + <argument index="0" name="from" type="StringName"> + </argument> + <description> + Constructs a [StringName] as a copy of the given [StringName]. + </description> + </method> + <method name="StringName" qualifiers="constructor"> <return type="StringName"> </return> <argument index="0" name="from" type="String"> @@ -18,6 +34,38 @@ Creates a new [StringName] from the given [String]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="StringName"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="String"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="StringName"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 53d706db2d..168cc8a1c3 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -270,7 +270,7 @@ <return type="String"> </return> <description> - Returns a [String] text with the word under the mouse cursor location. + Returns a [String] text with the word under the caret (text cursor) location. </description> </method> <method name="insert_text_at_cursor"> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 2824159f0e..783614c4af 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -23,10 +23,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="clear_constant"> @@ -34,10 +34,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Clears the constant at [code]name[/code] if the theme has [code]type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="clear_font"> @@ -45,10 +45,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="clear_icon"> @@ -56,10 +56,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Clears the icon at [code]name[/code] if the theme has [code]type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="clear_stylebox"> @@ -67,10 +67,10 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="copy_default_theme"> @@ -94,19 +94,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. + Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]node_type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> @@ -114,19 +114,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the constant at [code]name[/code] if the theme has [code]type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. + Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_type[/code]. </description> </method> <method name="get_font" qualifiers="const"> @@ -134,19 +134,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. + Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]node_type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> @@ -154,19 +154,19 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code]. + Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code]. + Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> @@ -174,35 +174,35 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. + Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> <return type="PackedStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]node_type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> <return type="PackedStringArray"> </return> - <argument index="0" name="type" type="String"> + <argument index="0" name="node_type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. + Returns all the types in [code]node_type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]node_type[/code]. </description> </method> <method name="has_color" qualifiers="const"> @@ -210,11 +210,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]node_type[/code]. + Returns [code]false[/code] if the theme does not have [code]node_type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -222,11 +222,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if constant with [code]name[/code] is in [code]node_type[/code]. + Returns [code]false[/code] if the theme does not have [code]node_type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -234,11 +234,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]node_type[/code]. + Returns [code]false[/code] if the theme does not have [code]node_type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -246,11 +246,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]node_type[/code]. + Returns [code]false[/code] if the theme does not have [code]node_type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -258,11 +258,11 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the theme does not have [code]type[/code]. + Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]node_type[/code]. + Returns [code]false[/code] if the theme does not have [code]node_type[/code]. </description> </method> <method name="set_color"> @@ -270,13 +270,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <argument index="2" name="color" type="Color"> </argument> <description> - Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the theme does not have [code]type[/code]. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code]. + Does nothing if the theme does not have [code]node_type[/code]. </description> </method> <method name="set_constant"> @@ -284,13 +284,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <argument index="2" name="constant" type="int"> </argument> <description> - Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the theme does not have [code]type[/code]. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code]. + Does nothing if the theme does not have [code]node_type[/code]. </description> </method> <method name="set_font"> @@ -298,13 +298,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <argument index="2" name="font" type="Font"> </argument> <description> - Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the theme does not have [code]type[/code]. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code]. + Does nothing if the theme does not have [code]node_type[/code]. </description> </method> <method name="set_icon"> @@ -312,13 +312,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <argument index="2" name="texture" type="Texture2D"> </argument> <description> - Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the theme does not have [code]type[/code]. + Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code]. + Does nothing if the theme does not have [code]node_type[/code]. </description> </method> <method name="set_stylebox"> @@ -326,13 +326,13 @@ </return> <argument index="0" name="name" type="StringName"> </argument> - <argument index="1" name="type" type="StringName"> + <argument index="1" name="node_type" type="StringName"> </argument> <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the theme does not have [code]type[/code]. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code]. + Does nothing if the theme does not have [code]node_type[/code]. </description> </method> </methods> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 8e539e64f7..cda69f6a64 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -16,57 +16,46 @@ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> - <method name="Transform"> + <method name="Transform" qualifiers="constructor"> <return type="Transform"> </return> - <argument index="0" name="x_axis" type="Vector3"> - </argument> - <argument index="1" name="y_axis" type="Vector3"> - </argument> - <argument index="2" name="z_axis" type="Vector3"> - </argument> - <argument index="3" name="origin" type="Vector3"> - </argument> <description> - Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). + Constructs a default-initialized [Transform] set to [constant IDENTITY]. </description> </method> - <method name="Transform"> + <method name="Transform" qualifiers="constructor"> <return type="Transform"> </return> - <argument index="0" name="basis" type="Basis"> - </argument> - <argument index="1" name="origin" type="Vector3"> + <argument index="0" name="from" type="Transform"> </argument> <description> - Constructs a Transform from a [Basis] and [Vector3]. + Constructs a [Transform] as a copy of the given [Transform]. </description> </method> - <method name="Transform"> + <method name="Transform" qualifiers="constructor"> <return type="Transform"> </return> - <argument index="0" name="from" type="Transform2D"> + <argument index="0" name="basis" type="Basis"> </argument> - <description> - Constructs a Transform from a [Transform2D]. - </description> - </method> - <method name="Transform"> - <return type="Transform"> - </return> - <argument index="0" name="from" type="Quat"> + <argument index="1" name="origin" type="Vector3"> </argument> <description> - Constructs a Transform from a [Quat]. The origin will be [code]Vector3(0, 0, 0)[/code]. + Constructs a Transform from a [Basis] and [Vector3]. </description> </method> - <method name="Transform"> + <method name="Transform" qualifiers="constructor"> <return type="Transform"> </return> - <argument index="0" name="from" type="Basis"> + <argument index="0" name="x_axis" type="Vector3"> + </argument> + <argument index="1" name="y_axis" type="Vector3"> + </argument> + <argument index="2" name="z_axis" type="Vector3"> + </argument> + <argument index="3" name="origin" type="Vector3"> </argument> <description> - Constructs the Transform from a [Basis]. The origin will be Vector3(0, 0, 0). + Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="affine_inverse"> @@ -116,6 +105,54 @@ Operations take place in global space. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="right" type="PackedVector3Array"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Transform"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="AABB"> + </return> + <argument index="0" name="right" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> <method name="orthonormalized"> <return type="Transform"> </return> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 66adeab3a6..ff291663fa 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -14,7 +14,23 @@ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link> </tutorials> <methods> - <method name="Transform2D"> + <method name="Transform2D" qualifiers="constructor"> + <return type="Transform2D"> + </return> + <description> + Constructs a default-initialized [Transform] set to [constant IDENTITY]. + </description> + </method> + <method name="Transform2D" qualifiers="constructor"> + <return type="Transform2D"> + </return> + <argument index="0" name="from" type="Transform2D"> + </argument> + <description> + Constructs a [Transform2D] as a copy of the given [Transform2D]. + </description> + </method> + <method name="Transform2D" qualifiers="constructor"> <return type="Transform2D"> </return> <argument index="0" name="rotation" type="float"> @@ -25,7 +41,7 @@ Constructs the transform from a given angle (in radians) and position. </description> </method> - <method name="Transform2D"> + <method name="Transform2D" qualifiers="constructor"> <return type="Transform2D"> </return> <argument index="0" name="x_axis" type="Vector2"> @@ -38,15 +54,6 @@ Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors). </description> </method> - <method name="Transform2D"> - <return type="Transform2D"> - </return> - <argument index="0" name="from" type="Transform"> - </argument> - <description> - Constructs the transform from a 3D [Transform]. - </description> - </method> <method name="affine_inverse"> <return type="Transform2D"> </return> @@ -122,6 +129,62 @@ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Rect2"> + </return> + <argument index="0" name="right" type="Rect2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Transform2D"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="right" type="PackedVector2Array"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="orthonormalized"> <return type="Transform2D"> </return> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 0b2fb80480..73575b4309 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -106,14 +106,21 @@ <return type="TreeItem"> </return> <description> - Returns the currently edited item. This is only available for custom cell mode. + Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified. + [codeblock] + func _ready(): + $Tree.item_edited.connect(on_Tree_item_edited) + + func on_Tree_item_edited(): + print($Tree.get_edited()) # This item just got edited (e.g. checked). + [/codeblock] </description> </method> <method name="get_edited_column" qualifiers="const"> <return type="int"> </return> <description> - Returns the column for the currently edited item. This is only available for custom cell mode. + Returns the column for the currently edited item. </description> </method> <method name="get_item_area_rect" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 231e0ed06a..f99231de39 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -17,7 +17,23 @@ <link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link> </tutorials> <methods> - <method name="Vector2"> + <method name="Vector2" qualifiers="constructor"> + <return type="Vector2"> + </return> + <description> + Constructs a default-initialized [Vector2] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector2" qualifiers="constructor"> + <return type="Vector2"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <description> + Constructs a [Vector2] as a copy of the given [Vector2]. + </description> + </method> + <method name="Vector2" qualifiers="constructor"> <return type="Vector2"> </return> <argument index="0" name="from" type="Vector2i"> @@ -26,7 +42,7 @@ Constructs a new [Vector2] from [Vector2i]. </description> </method> - <method name="Vector2"> + <method name="Vector2" qualifiers="constructor"> <return type="Vector2"> </return> <argument index="0" name="x" type="float"> @@ -234,6 +250,146 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="posmod"> <return type="Vector2"> </return> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 75ddc46dab..a4ea5c2742 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -14,18 +14,23 @@ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> </tutorials> <methods> - <method name="Vector2i"> + <method name="Vector2i" qualifiers="constructor"> <return type="Vector2i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> + <description> + Constructs a default-initialized [Vector2i] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector2i" qualifiers="constructor"> + <return type="Vector2i"> + </return> + <argument index="0" name="from" type="Vector2i"> </argument> <description> - Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + Constructs a [Vector2i] as a copy of the given [Vector2i]. </description> </method> - <method name="Vector2i"> + <method name="Vector2i" qualifiers="constructor"> <return type="Vector2i"> </return> <argument index="0" name="from" type="Vector2"> @@ -34,6 +39,17 @@ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. </description> </method> + <method name="Vector2i" qualifiers="constructor"> + <return type="Vector2i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <description> + Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. + </description> + </method> <method name="abs"> <return type="Vector2i"> </return> @@ -48,6 +64,154 @@ Returns the ratio of [member x] to [member y]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="sign"> <return type="Vector2i"> </return> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 7e47f768b4..6ba0d6ab8d 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -17,7 +17,23 @@ <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link> </tutorials> <methods> - <method name="Vector3"> + <method name="Vector3" qualifiers="constructor"> + <return type="Vector3"> + </return> + <description> + Constructs a default-initialized [Vector3] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector3" qualifiers="constructor"> + <return type="Vector3"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <description> + Constructs a [Vector3] as a copy of the given [Vector3]. + </description> + </method> + <method name="Vector3" qualifiers="constructor"> <return type="Vector3"> </return> <argument index="0" name="from" type="Vector3i"> @@ -26,7 +42,7 @@ Constructs a new [Vector3] from [Vector3i]. </description> </method> - <method name="Vector3"> + <method name="Vector3" qualifiers="constructor"> <return type="Vector3"> </return> <argument index="0" name="x" type="float"> @@ -223,6 +239,162 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Basis"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="outer"> <return type="Basis"> </return> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 45e237fb23..a1ae2aceab 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -14,20 +14,23 @@ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link> </tutorials> <methods> - <method name="Vector3i"> + <method name="Vector3i" qualifiers="constructor"> <return type="Vector3i"> </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="z" type="int"> + <description> + Constructs a default-initialized [Vector3i] with all components set to [code]0[/code]. + </description> + </method> + <method name="Vector3i" qualifiers="constructor"> + <return type="Vector3i"> + </return> + <argument index="0" name="from" type="Vector3i"> </argument> <description> - Returns a [Vector3i] with the given components. + Constructs a [Vector3i] as a copy of the given [Vector3i]. </description> </method> - <method name="Vector3i"> + <method name="Vector3i" qualifiers="constructor"> <return type="Vector3i"> </return> <argument index="0" name="from" type="Vector3"> @@ -36,6 +39,19 @@ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. </description> </method> + <method name="Vector3i" qualifiers="constructor"> + <return type="Vector3i"> + </return> + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="z" type="int"> + </argument> + <description> + Returns a [Vector3i] with the given components. + </description> + </method> <method name="abs"> <return type="Vector3i"> </return> @@ -56,6 +72,154 @@ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector3i"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector3i"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator []" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </method> <method name="sign"> <return type="Vector3i"> </return> diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index b0bfd7f418..25033cdb09 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -16,7 +16,7 @@ The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing. </member> <member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state"> - Direct access to the world's physics 2D space state. Used for querying current and potential collisions. Must only be accessed from the main thread within [code]_physics_process(delta)[/code]. + Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread. </member> <member name="space" type="RID" setter="" getter="get_space"> The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area. diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml index d804485d4e..fe92077432 100644 --- a/doc/classes/World3D.xml +++ b/doc/classes/World3D.xml @@ -15,7 +15,7 @@ <member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects"> </member> <member name="direct_space_state" type="PhysicsDirectSpaceState3D" setter="" getter="get_direct_space_state"> - Direct access to the world's physics 3D space state. Used for querying current and potential collisions. Must only be accessed from within [code]_physics_process(delta)[/code]. + Direct access to the world's physics 3D space state. Used for querying current and potential collisions. </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The World3D's [Environment]. diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index ce4d000a9b..03e8bee7d5 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -91,16 +91,23 @@ <tutorials> </tutorials> <methods> - <method name="bool"> + <method name="bool" qualifiers="constructor"> <return type="bool"> </return> - <argument index="0" name="from" type="int"> + <description> + Constructs a default-initialized [bool] set to [code]false[/code]. + </description> + </method> + <method name="bool" qualifiers="constructor"> + <return type="bool"> + </return> + <argument index="0" name="from" type="bool"> </argument> <description> - Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. + Constructs a [bool] as a copy of the given [bool]. </description> </method> - <method name="bool"> + <method name="bool" qualifiers="constructor"> <return type="bool"> </return> <argument index="0" name="from" type="float"> @@ -109,14 +116,45 @@ Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats. </description> </method> - <method name="bool"> + <method name="bool" qualifiers="constructor"> + <return type="bool"> + </return> + <argument index="0" name="from" type="int"> + </argument> + <description> + Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="bool"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="bool"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="bool"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> <return type="bool"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="right" type="bool"> </argument> <description> - Cast a [String] value to a boolean value, this method will return [code]false[/code] if [code]""[/code] is passed in, and [code]true[/code] for all non-empty strings. - Examples: [code]bool("False")[/code] returns [code]true[/code], [code]bool("")[/code] returns [code]false[/code]. </description> </method> </methods> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 16a696f959..85fe31eec8 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -9,7 +9,23 @@ <tutorials> </tutorials> <methods> - <method name="float"> + <method name="float" qualifiers="constructor"> + <return type="float"> + </return> + <description> + Constructs a default-initialized [float] set to [code]0.0[/code]. + </description> + </method> + <method name="float" qualifiers="constructor"> + <return type="float"> + </return> + <argument index="0" name="from" type="float"> + </argument> + <description> + Constructs a [float] as a copy of the given [float]. + </description> + </method> + <method name="float" qualifiers="constructor"> <return type="float"> </return> <argument index="0" name="from" type="bool"> @@ -18,22 +34,233 @@ Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. </description> </method> - <method name="float"> + <method name="float" qualifiers="constructor"> <return type="float"> </return> <argument index="0" name="from" type="int"> </argument> <description> - Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to 1.0. + Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code]. + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> </description> </method> - <method name="float"> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> <return type="float"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> </argument> <description> - Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 2c9f0ad371..5ac9f8405a 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -23,7 +23,23 @@ <tutorials> </tutorials> <methods> - <method name="int"> + <method name="int" qualifiers="constructor"> + <return type="int"> + </return> + <description> + Constructs a default-initialized [int] set to [code]0[/code]. + </description> + </method> + <method name="int" qualifiers="constructor"> + <return type="int"> + </return> + <argument index="0" name="from" type="int"> + </argument> + <description> + Constructs an [int] as a copy of the given [int]. + </description> + </method> + <method name="int" qualifiers="constructor"> <return type="int"> </return> <argument index="0" name="from" type="bool"> @@ -32,7 +48,7 @@ Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. </description> </method> - <method name="int"> + <method name="int" qualifiers="constructor"> <return type="int"> </return> <argument index="0" name="from" type="float"> @@ -41,13 +57,278 @@ Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. </description> </method> - <method name="int"> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator !=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator %" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator &" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2"> + </return> + <argument index="0" name="right" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector2i"> + </return> + <argument index="0" name="right" type="Vector2i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3"> + </return> + <argument index="0" name="right" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Vector3i"> + </return> + <argument index="0" name="right" type="Vector3i"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Quat"> + </return> + <argument index="0" name="right" type="Quat"> + </argument> + <description> + </description> + </method> + <method name="operator *" qualifiers="operator"> + <return type="Color"> + </return> + <argument index="0" name="right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator +" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator -" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="float"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator /" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator <" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <<" qualifiers="operator"> <return type="int"> </return> - <argument index="0" name="from" type="String"> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator <=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> </argument> <description> - Cast a [String] value to an integer value, this method is an integer parser from a string, so calling this method with an invalid integer string will return 0, a valid string will be something like [code]'1.7'[/code]. This method will ignore all non-number characters, so calling [code]int('1e3')[/code] will return 13. + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator >" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="float"> + </argument> + <description> + </description> + </method> + <method name="operator >=" qualifiers="operator"> + <return type="bool"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator >>" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator ^" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator |" qualifiers="operator"> + <return type="int"> + </return> + <argument index="0" name="right" type="int"> + </argument> + <description> + </description> + </method> + <method name="operator ~" qualifiers="operator"> + <return type="int"> + </return> + <description> </description> </method> </methods> |