diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Array.xml | 21 | ||||
-rw-r--r-- | doc/classes/PackedByteArray.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedColorArray.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedFloat32Array.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedFloat64Array.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedInt32Array.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedInt64Array.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedStringArray.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedVector2Array.xml | 9 | ||||
-rw-r--r-- | doc/classes/PackedVector3Array.xml | 9 |
10 files changed, 102 insertions, 0 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 54bbe7a94b..38b74cb436 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -237,6 +237,27 @@ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Variant"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements: + [codeblocks] + [gdscript] + var array = [] + array.resize(10) + array.fill(0) # Initialize the 10 elements to 0. + [/gdscript] + [csharp] + var array = new Godot.Collections.Array{}; + array.Resize(10); + array.Fill(0); // Initialize the 10 elements to 0. + [/csharp] + [/codeblocks] + </description> + </method> <method name="find" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 24178c3ff6..0652cf0aa1 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -322,6 +322,15 @@ <description> </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="get_string_from_ascii" qualifiers="const"> <return type="String"> </return> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 38240b3154..19cfcd7c87 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -59,6 +59,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Color"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 5e0008852c..ab97c9a695 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index fb7817cb41..ad20801b01 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="float"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index 4ee428dfbc..ff4729082e 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 51948fcbc8..195b12b129 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="int"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 9748301dae..22458832da 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="String"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 1b3201b072..6c8791f988 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -60,6 +60,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Vector2"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 25d854016a..85d41d7519 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -59,6 +59,15 @@ Creates a copy of the array, and returns it. </description> </method> + <method name="fill"> + <return type="void"> + </return> + <argument index="0" name="value" type="Vector3"> + </argument> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> <method name="has"> <return type="bool"> </return> |