diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 6 | ||||
-rw-r--r-- | doc/classes/Color.xml | 33 | ||||
-rw-r--r-- | doc/classes/EditorPlugin.xml | 6 | ||||
-rw-r--r-- | doc/classes/JavaScript.xml | 22 | ||||
-rw-r--r-- | doc/classes/Panel.xml | 10 | ||||
-rw-r--r-- | doc/classes/RID.xml | 6 | ||||
-rw-r--r-- | doc/classes/String.xml | 16 | ||||
-rw-r--r-- | doc/classes/StringName.xml | 24 | ||||
-rw-r--r-- | doc/classes/TranslationServer.xml | 7 | ||||
-rw-r--r-- | doc/classes/Tree.xml | 1 | ||||
-rw-r--r-- | doc/classes/Vector2i.xml | 10 | ||||
-rw-r--r-- | doc/classes/Vector3i.xml | 11 | ||||
-rw-r--r-- | doc/classes/VisualShaderNode.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeParticleRandomness.xml | 10 | ||||
-rw-r--r-- | doc/classes/float.xml | 12 | ||||
-rw-r--r-- | doc/classes/int.xml | 7 |
16 files changed, 154 insertions, 29 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index d8c9ca08e8..4c0f89f14d 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1267,6 +1267,12 @@ <constant name="INLINE_ALIGNMENT_BOTTOM" value="14" enum="InlineAlignment"> Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]. </constant> + <constant name="INLINE_ALIGNMENT_IMAGE_MASK" value="3" enum="InlineAlignment"> + A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants. + </constant> + <constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment"> + A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants. + </constant> <constant name="KEY_SPECIAL" value="16777216" enum="Key"> Keycodes with this bit applied are non-printable. </constant> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index f3fcd90f51..4e73d4d9d8 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -218,12 +218,45 @@ <return type="Color" /> <argument index="0" name="rgba" type="String" /> <description> + Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character. + [code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. + If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned. + [codeblocks] + [gdscript] + var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0) + var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0) + [/gdscript] + [csharp] + var green = Color.Html("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0) + var blue = Color.Html("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0) + [/csharp] + [/codeblocks] </description> </method> <method name="html_is_valid" qualifiers="static"> <return type="bool" /> <argument index="0" name="color" type="String" /> <description> + Returns [code]true[/code] if [code]color[/code] is a valid HTML hexadecimal color string. [code]color[/code] is not case sensitive, and may be prefixed with a '#' character. + For a string to be valid it must be three-digit or six-digit hexadecimal, and may contain an alpha channel value. + [codeblocks] + [gdscript] + var result = Color.html_is_valid("#55aaFF") # result is true + result = Color.html_is_valid("#55AAFF20") # result is true + result = Color.html_is_valid("55AAFF") # result is true + result = Color.html_is_valid("#F2C") # result is true + result = Color.html_is_valid("#AABBC) # result is false + result = Color.html_is_valid("#55aaFF5") # result is false + [/gdscript] + [csharp] + var result = Color.HtmlIsValid("#55AAFF"); // result is true + result = Color.HtmlIsValid("#55AAFF20"); // result is true + result = Color.HtmlIsValid("55AAFF); // result is true + result = Color.HtmlIsValid("#F2C"); // result is true + result = Color.HtmlIsValid("#AABBC"); // result is false + result = Color.HtmlIsValid("#55aaFF5"); // result is false + [/csharp] + [/codeblocks] </description> </method> <method name="inverted" qualifiers="const"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index cc1243898f..b9267bc577 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -379,8 +379,10 @@ <method name="add_import_plugin"> <return type="void" /> <argument index="0" name="importer" type="EditorImportPlugin" /> + <argument index="1" name="first_priority" type="bool" default="false" /> <description> Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. + If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead. See [method add_inspector_plugin] for an example of how to register a plugin. </description> @@ -408,15 +410,19 @@ <method name="add_scene_format_importer_plugin"> <return type="void" /> <argument index="0" name="scene_format_importer" type="EditorSceneFormatImporter" /> + <argument index="1" name="first_priority" type="bool" default="false" /> <description> Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes. + If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. </description> </method> <method name="add_scene_post_import_plugin"> <return type="void" /> <argument index="0" name="scene_import_plugin" type="EditorScenePostImportPlugin" /> + <argument index="1" name="first_priority" type="bool" default="false" /> <description> Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. + If [code]first_priority[/code] is [code]true[/code], the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. </description> </method> <method name="add_spatial_gizmo_plugin"> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index aeaf8ac1f5..4ea60ad867 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -53,5 +53,27 @@ Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. </description> </method> + <method name="pwa_needs_update" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if a new version of the progressive web app is waiting to be activated. + [b]Note:[/b] Only relevant when exported as a Progressive Web App. + </description> + </method> + <method name="pwa_update"> + <return type="int" enum="Error" /> + <description> + Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. + [b]Note:[/b] Your application will be [b]reloaded in all browser tabs[/b]. + [b]Note:[/b] Only relevant when exported as a Progressive Web App and [method pwa_needs_update] returns [code]true[/code]. + </description> + </method> </methods> + <signals> + <signal name="pwa_update_available"> + <description> + Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See [method pwa_update] to force the update to take place immediately. + </description> + </signal> + </signals> </class> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index 21ac7dfac1..3246fa7eba 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -11,16 +11,6 @@ <link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link> <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link> </tutorials> - <members> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0"> - </member> - </members> - <constants> - <constant name="MODE_BACKGROUND" value="0" enum="Mode"> - </constant> - <constant name="MODE_FOREGROUND" value="1" enum="Mode"> - </constant> - </constants> <theme_items> <theme_item name="panel" data_type="style" type="StyleBox"> The style of this [Panel]. diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 695b0933fa..990e82593e 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -30,6 +30,12 @@ Returns the ID of the referenced resource. </description> </method> + <method name="is_valid" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if [RID] is valid. + </description> + </method> </methods> <operators> <operator name="operator !="> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index eeb17c24c0..a6182f5dab 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -222,6 +222,22 @@ [/codeblock] </description> </method> + <method name="get_slice_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="delimiter" type="String" /> + <description> + Splits a string using a [code]delimiter[/code] and returns a number of slices. + </description> + </method> + <method name="get_slicec" qualifiers="const"> + <return type="String" /> + <argument index="0" name="delimiter" type="int" /> + <argument index="1" name="slice" type="int" /> + <description> + Splits a string using a Unicode character with code [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist. + This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. + </description> + </method> <method name="hash" qualifiers="const"> <return type="int" /> <description> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index b32665a09f..85c4d7593e 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -48,6 +48,18 @@ <description> </description> </operator> + <operator name="operator <"> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> + <description> + </description> + </operator> + <operator name="operator <="> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> + <description> + </description> + </operator> <operator name="operator =="> <return type="bool" /> <description> @@ -65,5 +77,17 @@ <description> </description> </operator> + <operator name="operator >"> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> + <description> + </description> + </operator> + <operator name="operator >="> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> + <description> + </description> + </operator> </operators> </class> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index c90cb2987c..6ece42da6b 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -91,6 +91,13 @@ Returns readable script name for the [code]script[/code] code. </description> </method> + <method name="get_tool_locale"> + <return type="String" /> + <description> + Returns the current locale of the editor. + [b]Note:[/b] When called from an exported project returns the same value as [method get_locale]. + </description> + </method> <method name="get_translation_object"> <return type="Translation" /> <argument index="0" name="locale" type="String" /> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 766c740a2c..4b051c4938 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -240,6 +240,7 @@ <method name="scroll_to_item"> <return type="void" /> <argument index="0" name="item" type="TreeItem" /> + <argument index="1" name="center_on_item" type="bool" default="false" /> <description> Causes the [Tree] to jump to the specified [TreeItem]. </description> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 721c73d603..d7e010cc53 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -174,12 +174,12 @@ </description> </operator> <operator name="operator *"> - <return type="Vector2i" /> + <return type="Vector2" /> <argument index="0" name="right" type="float" /> <description> - Multiplies each component of the [Vector2i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2]. [codeblock] - print(Vector2i(10, 20) * 0.9) # Prints "(0, 0)" + print(Vector2i(10, 15) * 0.9) # Prints "(9, 13.5)" [/codeblock] </description> </operator> @@ -221,10 +221,10 @@ </description> </operator> <operator name="operator /"> - <return type="Vector2i" /> + <return type="Vector2" /> <argument index="0" name="right" type="float" /> <description> - Divides each component of the [Vector2i] by the given [float] truncated to an integer. + Divides each component of the [Vector2i] by the given [float]. Returns a [Vector2]. [codeblock] print(Vector2i(10, 20) / 2.9) # Prints "(5, 10)" [/codeblock] diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index da729e1ec2..e0b8a53a3c 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -48,6 +48,7 @@ <method name="abs" qualifiers="const"> <return type="Vector3i" /> <description> + Returns a new vector with all components in absolute values (i.e. positive). </description> </method> <method name="clamp" qualifiers="const"> @@ -180,12 +181,12 @@ </description> </operator> <operator name="operator *"> - <return type="Vector3i" /> + <return type="Vector3" /> <argument index="0" name="right" type="float" /> <description> - Multiplies each component of the [Vector3i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3]. [codeblock] - print(Vector3i(10, 20, 30) * 0.9) # Prints "(0, 0, 0)" + print(Vector3i(10, 15, 20) * 0.9) # Prints "(9, 13.5, 18)" [/codeblock] </description> </operator> @@ -227,10 +228,10 @@ </description> </operator> <operator name="operator /"> - <return type="Vector3i" /> + <return type="Vector3" /> <argument index="0" name="right" type="float" /> <description> - Divides each component of the [Vector3i] by the given [float] truncated to an integer. + Divides each component of the [Vector3i] by the given [float]. Returns a [Vector3]. [codeblock] print(Vector3i(10, 20, 30) / 2.9) # Prints "(5, 10, 15)" [/codeblock] diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 0067240820..332620f915 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -75,7 +75,7 @@ <constant name="PORT_TYPE_VECTOR_2D" value="2" enum="PortType"> 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR" value="3" enum="PortType"> + <constant name="PORT_TYPE_VECTOR_3D" value="3" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> <constant name="PORT_TYPE_BOOLEAN" value="4" enum="PortType"> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index 2dec41105c..880208b136 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -8,14 +8,20 @@ </tutorials> <members> <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeParticleRandomness.OpType" default="0"> + A type of operands and returned value. </member> </members> <constants> <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> + A floating-point scalar. </constant> - <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> + <constant name="OP_TYPE_VECTOR_2D" value="1" enum="OpType"> + A 2D vector type. </constant> - <constant name="OP_TYPE_MAX" value="2" enum="OpType"> + <constant name="OP_TYPE_VECTOR_3D" value="2" enum="OpType"> + A 3D vector type. + </constant> + <constant name="OP_TYPE_MAX" value="3" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 9effe9d5bf..2dae7275b5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -89,12 +89,12 @@ </description> </operator> <operator name="operator *"> - <return type="Vector2i" /> + <return type="Vector2" /> <argument index="0" name="right" type="Vector2i" /> <description> - Multiplies each component of the [Vector2i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2]. [codeblock] - print(0.9 * Vector2i(10, 20)) # Prints "(0, 0)" + print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)" [/codeblock] </description> </operator> @@ -106,12 +106,12 @@ </description> </operator> <operator name="operator *"> - <return type="Vector3i" /> + <return type="Vector3" /> <argument index="0" name="right" type="Vector3i" /> <description> - Multiplies each component of the [Vector3i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3]. [codeblock] - print(0.9 * Vector3i(10, 20, 30)) # Prints "(0, 0, 0)" + print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)" [/codeblock] </description> </operator> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index d212fe42bf..006dc7eb29 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -177,6 +177,13 @@ </description> </operator> <operator name="operator +"> + <return type="String" /> + <argument index="0" name="right" type="String" /> + <description> + Adds Unicode character with code [int] to the [String]. + </description> + </operator> + <operator name="operator +"> <return type="float" /> <argument index="0" name="right" type="float" /> <description> |