diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 3 | ||||
-rw-r--r-- | doc/classes/Color.xml | 30 | ||||
-rw-r--r-- | doc/classes/Input.xml | 14 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 1 | ||||
-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 |
8 files changed, 47 insertions, 21 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/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/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/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/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> |