diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 3 | ||||
-rw-r--r-- | doc/classes/AStarGrid2D.xml | 9 | ||||
-rw-r--r-- | doc/classes/Color.xml | 30 | ||||
-rw-r--r-- | doc/classes/Curve3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 2 | ||||
-rw-r--r-- | doc/classes/GeometryInstance3D.xml | 10 | ||||
-rw-r--r-- | doc/classes/Input.xml | 14 | ||||
-rw-r--r-- | doc/classes/Object.xml | 2 | ||||
-rw-r--r-- | doc/classes/PathFollow3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/RenderingDevice.xml | 4 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 2 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 1 | ||||
-rw-r--r-- | doc/classes/String.xml | 8 | ||||
-rw-r--r-- | doc/classes/StringName.xml | 8 | ||||
-rw-r--r-- | doc/classes/TextLine.xml | 2 | ||||
-rw-r--r-- | doc/classes/TextParagraph.xml | 2 | ||||
-rw-r--r-- | doc/classes/TextServer.xml | 13 | ||||
-rw-r--r-- | doc/classes/TextServerExtension.xml | 3 | ||||
-rw-r--r-- | doc/classes/TileMap.xml | 3 |
19 files changed, 73 insertions, 47 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 50c1ed847a..6b0dccd7fc 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1479,6 +1479,9 @@ <constant name="INLINE_ALIGNMENT_CENTER_TO" value="1" enum="InlineAlignment"> Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. </constant> + <constant name="INLINE_ALIGNMENT_BASELINE_TO" value="3" enum="InlineAlignment"> + Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. + </constant> <constant name="INLINE_ALIGNMENT_BOTTOM_TO" value="2" enum="InlineAlignment"> Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant. </constant> diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index 8dde3748d7..bffa395770 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -103,6 +103,7 @@ <param index="1" name="solid" type="bool" default="true" /> <description> Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. + [b]Note:[/b] Calling [method update] is not needed after the call of this function. </description> </method> <method name="update"> @@ -134,20 +135,22 @@ </members> <constants> <constant name="HEURISTIC_EUCLIDEAN" value="0" enum="Heuristic"> - The Euclidean heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) result = sqrt(dx * dx + dy * dy) [/codeblock] + [b]Note:[/b] This is also the internal heuristic used in [AStar3D] and [AStar2D] by default (with the inclusion of possible z-axis coordinate). </constant> <constant name="HEURISTIC_MANHATTAN" value="1" enum="Heuristic"> - The Manhattan heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) result = dx + dy [/codeblock] + [b]Note:[/b] This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the [member diagonal_mode] to [constant DIAGONAL_MODE_NEVER]. </constant> <constant name="HEURISTIC_OCTILE" value="2" enum="Heuristic"> The Octile heuristic to be used for the pathfinding using the following formula: @@ -159,7 +162,7 @@ [/codeblock] </constant> <constant name="HEURISTIC_CHEBYSHEV" value="3" enum="Heuristic"> - The Chebyshev heuristic to be used for the pathfinding using the following formula: + The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev heuristic[/url] to be used for the pathfinding using the following formula: [codeblock] dx = abs(to_id.x - from_id.x) dy = abs(to_id.y - from_id.y) diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 4d78433915..d1387d088d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -205,11 +205,18 @@ <description> Returns the [Color] associated with the provided [param hex] integer in 32-bit ARGB format (8 bits per channel, alpha channel first). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix). - [codeblock] + [codeblocks] + [gdscript] var red = Color.hex(0xffff0000) var dark_cyan = Color.hex(0xff008b8b) var my_color = Color.hex(0xa4bbefd2) - [/codeblock] + [/gdscript] + [csharp] + var red = new Color(0xffff0000); + var dark_cyan = new Color(0xff008b8b); + var my_color = new Color(0xa4bbefd2); + [/csharp] + [/codeblocks] </description> </method> <method name="hex64" qualifiers="static"> @@ -234,9 +241,9 @@ var col = Color.html("663399cc") # col is Color(0.4, 0.2, 0.6, 0.8) [/gdscript] [csharp] - var blue = new Color("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) - var green = new Color("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) - var col = new Color("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) + var blue = Color.FromHtml("#0000ff"); // blue is Color(0.0, 0.0, 1.0, 1.0) + var green = Color.FromHtml("#0F0"); // green is Color(0.0, 1.0, 0.0, 1.0) + var col = Color.FromHtml("663399cc"); // col is Color(0.4, 0.2, 0.6, 0.8) [/csharp] [/codeblocks] </description> @@ -257,14 +264,13 @@ Color.html_is_valid("#55aaFF5") # Returns false [/gdscript] [csharp] - // This method is not available in C#. Use `StringExtensions.IsValidHtmlColor()`, instead. - "#55AAFF".IsValidHtmlColor(); // Returns true - "#55AAFF20".IsValidHtmlColor(); // Returns true - "55AAFF".IsValidHtmlColor(); // Returns true - "#F2C".IsValidHtmlColor(); // Returns true + Color.IsHtmlValid("#55AAFF"); // Returns true + Color.IsHtmlValid("#55AAFF20"); // Returns true + Color.IsHtmlValid("55AAFF"); // Returns true + Color.IsHtmlValid("#F2C"); // Returns true - "#AABBC".IsValidHtmlColor(); // Returns false - "#55aaFF5".IsValidHtmlColor(); // Returns false + Color.IsHtmlValid("#AABBC"); // Returns false + Color.IsHtmlValid("#55aaFF5"); // Returns false [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index cfe2036499..362d792b39 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -138,7 +138,7 @@ <param index="1" name="cubic" type="bool" default="false" /> <param index="2" name="apply_tilt" type="bool" default="false" /> <description> - Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to caculate the rotation, all vectors aligned with global space axes. + Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. </description> </method> <method name="samplef" qualifiers="const"> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 92225b816f..5f99ba82b8 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -135,7 +135,7 @@ [/csharp] [/codeblocks] [b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior. - [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overriden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values. + [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values. </description> <tutorials> <link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 90a983d28b..1ae4718536 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -16,13 +16,6 @@ Get the value of a shader parameter as set on this instance. </description> </method> - <method name="set_custom_aabb"> - <return type="void" /> - <param index="0" name="aabb" type="AABB" /> - <description> - Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. - </description> - </method> <method name="set_instance_shader_parameter"> <return type="void" /> <param index="0" name="name" type="StringName" /> @@ -36,6 +29,9 @@ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1"> The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. </member> + <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> + Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive [AABB] recalculation that happens when a skeleton is used with a [MeshInstance3D] or to have fine control over the [MeshInstance3D]'s bounding box. To remove this, set value to an [AABB] with all fields set to zero. + </member> <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0"> The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box. </member> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index d246e64251..be8c8ff83f 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -339,7 +339,7 @@ <param index="2" name="strong_magnitude" type="float" /> <param index="3" name="duration" type="float" default="0" /> <description> - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling [method stop_joy_vibration]. [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. </description> </method> @@ -347,18 +347,18 @@ <return type="void" /> <param index="0" name="device" type="int" /> <description> - Stops the vibration of the joypad. + Stops the vibration of the joypad started with [method start_joy_vibration]. </description> </method> <method name="vibrate_handheld"> <return type="void" /> <param index="0" name="duration_ms" type="int" default="500" /> <description> - Vibrate handheld devices. - [b]Note:[/b] This method is implemented on Android, iOS, and Web. - [b]Note:[/b] For Android, it requires enabling the [code]VIBRATE[/code] permission in the export preset. - [b]Note:[/b] For iOS, specifying the duration is supported in iOS 13 and later. - [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support this method. + Vibrate the handheld device for the specified duration in milliseconds. + [b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms. + [b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the [code]VIBRATE[/code] permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect. + [b]Note:[/b] For iOS, specifying the duration is only supported in iOS 13 and later. + [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld]. </description> </method> <method name="warp_mouse"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 5e834b3d91..e015bec134 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -8,7 +8,7 @@ You can create new instances, using [code]Object.new()[/code] in GDScript, or [code]new Object[/code] in C#. To delete an Object instance, call [method free]. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, [RefCounted] (and by extension [Resource]) deletes itself when no longer referenced, and [Node] deletes its children when freed. Objects can have a [Script] attached to them. Once the [Script] is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. - Inside a [Script], [method _get_property_list] may be overriden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the [annotation @GDScript.@export] annotation. + Inside a [Script], [method _get_property_list] may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the [annotation @GDScript.@export] annotation. Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as [method set], [method get], [method call], [method has_method], [method has_signal], etc. Note that these methods are [b]much[/b] slower than direct references. In GDScript, you can also check if a given property, method, or signal name exists in an object with the [code]in[/code] operator: [codeblock] diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml index fa7580b7b6..01275471d0 100644 --- a/doc/classes/PathFollow3D.xml +++ b/doc/classes/PathFollow3D.xml @@ -15,7 +15,7 @@ <param index="0" name="transform" type="Transform3D" /> <param index="1" name="rotation_mode" type="int" enum="PathFollow3D.RotationMode" /> <description> - Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is caculated. + Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is calculated. </description> </method> </methods> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 797231ac5e..f318430611 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -504,7 +504,7 @@ <return type="RID" /> <param index="0" name="size_bytes" type="int" /> <param index="1" name="data" type="PackedByteArray" default="PackedByteArray()" /> - <param index="2" name="usage" type="int" default="0" /> + <param index="2" name="usage" type="int" enum="RenderingDevice.StorageBufferUsage" default="0" /> <description> </description> </method> @@ -1273,7 +1273,7 @@ </constant> <constant name="INDEX_BUFFER_FORMAT_UINT32" value="1" enum="IndexBufferFormat"> </constant> - <constant name="STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT" value="1" enum="StorageBufferUsage"> + <constant name="STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT" value="1" enum="StorageBufferUsage" is_bitfield="true"> </constant> <constant name="UNIFORM_TYPE_SAMPLER" value="0" enum="UniformType"> </constant> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 7a9a380032..d9b83f2acd 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1559,7 +1559,7 @@ <param index="0" name="instance" type="RID" /> <param index="1" name="aabb" type="AABB" /> <description> - Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb]. + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting [member GeometryInstance3D.custom_aabb]. </description> </method> <method name="instance_set_extra_visibility_margin"> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index e222894647..f587ababfe 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -367,6 +367,7 @@ <return type="void" /> <param index="0" name="columns" type="int" /> <param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" /> + <param index="2" name="align_to_row" type="int" default="-1" /> <description> Adds a [code][table=columns,inline_align][/code] tag to the tag stack. </description> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 653d53607e..97466e7860 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -973,11 +973,11 @@ [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - print(url.uri_decode()) # Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] </description> @@ -988,13 +988,13 @@ Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. [codeblocks] [gdscript] - var prefix = "$DOCS_URL/?hightlight=" + var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode() print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] - var prefix = "$DOCS_URL/?hightlight="; + var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode(); GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index 44d78a46fb..b46e39b8d7 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -880,11 +880,11 @@ [codeblocks] [gdscript] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - print(url.uri_decode()) # Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + print(url.uri_decode()) # Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/gdscript] [csharp] var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs" - GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?hightlight=Godot Engine:docs" + GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?highlight=Godot Engine:docs" [/csharp] [/codeblocks] </description> @@ -895,13 +895,13 @@ Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. [codeblocks] [gdscript] - var prefix = "$DOCS_URL/?hightlight=" + var prefix = "$DOCS_URL/?highlight=" var url = prefix + "Godot Engine:docs".uri_encode() print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" [/gdscript] [csharp] - var prefix = "$DOCS_URL/?hightlight="; + var prefix = "$DOCS_URL/?highlight="; var url = prefix + "Godot Engine:docs".URIEncode(); GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs" diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index d1dfdecbd2..1ebae9889d 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -15,6 +15,7 @@ <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="3" name="length" type="int" default="1" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -122,6 +123,7 @@ <param index="0" name="key" type="Variant" /> <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="3" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index e0729ba844..38afd9b5f8 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -15,6 +15,7 @@ <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="3" name="length" type="int" default="1" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -228,6 +229,7 @@ <param index="0" name="key" type="Variant" /> <param index="1" name="size" type="Vector2" /> <param index="2" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="3" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 4fc6ee3312..637e502d49 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1097,6 +1097,7 @@ <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" /> <param index="4" name="length" type="int" default="1" /> + <param index="5" name="baseline" type="float" default="0.0" /> <description> Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. </description> @@ -1438,6 +1439,7 @@ <param index="1" name="key" type="Variant" /> <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" default="5" /> + <param index="4" name="baseline" type="float" default="0.0" /> <description> Sets new size and alignment of embedded object. </description> @@ -1546,8 +1548,15 @@ <return type="PackedInt32Array" /> <param index="0" name="string" type="String" /> <param index="1" name="language" type="String" default="""" /> - <description> - Returns array of the word break character offsets. + <param index="2" name="chars_per_line" type="int" default="0" /> + <description> + Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. + When [param chars_per_line] is greater than zero, line break boundaries are returned instead. + [codeblock] + var ts = TextServerManager.get_primary_interface() + print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12] + print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12] + [/codeblock] </description> </method> <method name="string_to_lower" qualifiers="const"> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 4c9817fcd4..e144b09eb6 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -945,6 +945,7 @@ <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" /> <param index="4" name="length" type="int" /> + <param index="5" name="baseline" type="float" /> <description> </description> </method> @@ -1242,6 +1243,7 @@ <param index="1" name="key" type="Variant" /> <param index="2" name="size" type="Vector2" /> <param index="3" name="inline_align" type="int" enum="InlineAlignment" /> + <param index="4" name="baseline" type="float" /> <description> </description> </method> @@ -1344,6 +1346,7 @@ <return type="PackedInt32Array" /> <param index="0" name="string" type="String" /> <param index="1" name="language" type="String" /> + <param index="2" name="chars_per_line" type="int" /> <description> </description> </method> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index e9e2a738d3..8b537545bc 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -257,8 +257,9 @@ <description> Sets the tile indentifiers for the cell on layer [param layer] at coordinates [param coords]. Each tile of the [TileSet] is identified using three parts: - The source identifier [param source_id] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], - - The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0), + - The atlas coordinates identifier [param atlas_coords] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should always be [code]Vector2i(0, 0)[/code]), - The alternative tile identifier [param alternative_tile] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource]. + If [param source_id] is set to [code]-1[/code], [param atlas_coords] to [code]Vector2i(-1, -1)[/code] or [param alternative_tile] to [code]-1[/code], the cell will be erased. An erased cell gets [b]all[/b] its identifiers automatically set to their respective invalid values, namely [code]-1[/code], [code]Vector2i(-1, -1)[/code] and [code]-1[/code]. </description> </method> <method name="set_cells_terrain_connect"> |