mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
This commit is contained in:
@@ -33,18 +33,15 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_get" qualifiers="virtual">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="property" type="StringName">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="property" type="StringName" />
|
||||
<description>
|
||||
Virtual method which can be overridden to customize the return value of [method get].
|
||||
Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_get_property_list" qualifiers="virtual">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Virtual method which can be overridden to customize the return value of [method get_property_list].
|
||||
Returns the object's property list as an [Array] of dictionaries.
|
||||
@@ -52,57 +49,45 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="_init" qualifiers="virtual">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Called when the object is initialized.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_notification" qualifiers="virtual">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="what" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="what" type="int" />
|
||||
<description>
|
||||
Called whenever the object receives a notification, which is identified in [code]what[/code] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_set" qualifiers="virtual">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="property" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="property" type="StringName" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Virtual method which can be overridden to customize the return value of [method set].
|
||||
Sets a property. Returns [code]true[/code] if the [code]property[/code] exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_to_string" qualifiers="virtual">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Virtual method which can be overridden to customize the return value of [method to_string], and thus the object's representation where it is converted to a string, e.g. with [code]print(obj)[/code].
|
||||
Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_user_signal">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="arguments" type="Array" default="[]">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="signal" type="String" />
|
||||
<argument index="1" name="arguments" type="Array" default="[]" />
|
||||
<description>
|
||||
Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries.
|
||||
</description>
|
||||
</method>
|
||||
<method name="call" qualifiers="vararg">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="method" type="StringName">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="method" type="StringName" />
|
||||
<description>
|
||||
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
|
||||
[codeblocks]
|
||||
@@ -119,10 +104,8 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="call_deferred" qualifiers="vararg">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="method" type="StringName">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="method" type="StringName" />
|
||||
<description>
|
||||
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
|
||||
[codeblocks]
|
||||
@@ -139,12 +122,9 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="callv">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="method" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="arg_array" type="Array">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="method" type="StringName" />
|
||||
<argument index="1" name="arg_array" type="Array" />
|
||||
<description>
|
||||
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
|
||||
[codeblocks]
|
||||
@@ -160,23 +140,17 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="can_translate_messages" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the object can translate strings. See [method set_message_translation] and [method tr].
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="callable" type="Callable">
|
||||
</argument>
|
||||
<argument index="2" name="binds" type="Array" default="[]">
|
||||
</argument>
|
||||
<argument index="3" name="flags" type="int" default="0">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<argument index="1" name="callable" type="Callable" />
|
||||
<argument index="2" name="binds" type="Array" default="[]" />
|
||||
<argument index="3" name="flags" type="int" default="0" />
|
||||
<description>
|
||||
Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
|
||||
[b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
|
||||
@@ -315,22 +289,17 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="callable" type="Callable">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<argument index="1" name="callable" type="Callable" />
|
||||
<description>
|
||||
Disconnects a [code]signal[/code] from a given [code]callable[/code].
|
||||
If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="emit_signal" qualifiers="vararg">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<description>
|
||||
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
|
||||
[codeblocks]
|
||||
@@ -346,32 +315,27 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="free">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Deletes the object from memory. Any pre-existing reference to the freed object will become invalid, e.g. [code]is_instance_valid(object)[/code] will return [code]false[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="property" type="String">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="property" type="String" />
|
||||
<description>
|
||||
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
|
||||
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_class" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the object's class as a [String].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_incoming_connections" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns an [Array] of dictionaries with information about signals that are connected to the object.
|
||||
Each [Dictionary] contains three String entries:
|
||||
@@ -381,214 +345,170 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_indexed" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="property" type="NodePath">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="property" type="NodePath" />
|
||||
<description>
|
||||
Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_instance_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the object's unique instance ID.
|
||||
This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GlobalScope.instance_from_id].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_meta" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="name" type="StringName">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
Returns the object's metadata entry for the given [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_meta_list" qualifiers="const">
|
||||
<return type="PackedStringArray">
|
||||
</return>
|
||||
<return type="PackedStringArray" />
|
||||
<description>
|
||||
Returns the object's metadata as a [PackedStringArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_method_list" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the object's methods and their signatures as an [Array].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_property_list" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the object's property list as an [Array] of dictionaries.
|
||||
Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum PropertyUsageFlags]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_script" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Returns the object's [Script] instance, or [code]null[/code] if none is assigned.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_signal_connection_list" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="String">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="signal" type="String" />
|
||||
<description>
|
||||
Returns an [Array] of connections for the given [code]signal[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_signal_list" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the list of signals as an [Array] of dictionaries.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_meta" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="name" type="StringName">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
Returns [code]true[/code] if a metadata entry is found with the given [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_method" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="method" type="StringName">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="method" type="StringName" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the object contains the given [code]method[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_signal" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given [code]signal[/code] exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_user_signal" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. Only signals added using [method add_user_signal] are taken into account.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_blocking_signals" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if signal emission blocking is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_class" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="class" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="class" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the object inherits from the given [code]class[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_connected" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="signal" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="callable" type="Callable">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="signal" type="StringName" />
|
||||
<argument index="1" name="callable" type="Callable" />
|
||||
<description>
|
||||
Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_queued_for_deletion" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [method Node.queue_free] method was called for the object.
|
||||
</description>
|
||||
</method>
|
||||
<method name="notification">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="what" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="reversed" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="what" type="int" />
|
||||
<argument index="1" name="reversed" type="bool" default="false" />
|
||||
<description>
|
||||
Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from.
|
||||
If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="notify_property_list_changed">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Notify the editor that the property list has changed by emitting the [signal property_list_changed] signal, so that editor plugins can take the new values into account.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_meta">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="StringName">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<description>
|
||||
Removes a given entry from the object's metadata. See also [method set_meta].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="property" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="property" type="String" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
|
||||
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_block_signals">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="enable" type="bool" />
|
||||
<description>
|
||||
If set to [code]true[/code], signal emission is blocked.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_deferred">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="property" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="property" type="StringName" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
|
||||
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_indexed">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="property" type="NodePath">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="property" type="NodePath" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
|
||||
[codeblocks]
|
||||
@@ -608,51 +528,40 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_message_translation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="enable" type="bool" />
|
||||
<description>
|
||||
Defines whether the object can translate strings (with calls to [method tr]). Enabled by default.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_meta">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="StringName" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value.
|
||||
To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_script">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="script" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="script" type="Variant" />
|
||||
<description>
|
||||
Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.
|
||||
If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called.
|
||||
</description>
|
||||
</method>
|
||||
<method name="to_string">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code].
|
||||
Override the method [method _to_string] to customize the [String] representation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="tr" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="message" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="context" type="StringName" default="""">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="message" type="StringName" />
|
||||
<argument index="1" name="context" type="StringName" default="""" />
|
||||
<description>
|
||||
Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
|
||||
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation].
|
||||
@@ -660,16 +569,11 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="tr_n" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="message" type="StringName">
|
||||
</argument>
|
||||
<argument index="1" name="plural_message" type="StringName">
|
||||
</argument>
|
||||
<argument index="2" name="n" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="context" type="StringName" default="""">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="message" type="StringName" />
|
||||
<argument index="1" name="plural_message" type="StringName" />
|
||||
<argument index="2" name="n" type="int" />
|
||||
<argument index="3" name="context" type="StringName" default="""" />
|
||||
<description>
|
||||
Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context.
|
||||
Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation].
|
||||
|
||||
Reference in New Issue
Block a user