Skip to content

Commit

Permalink
[doc] Use "param" instead of "code" to refer to parameters (5)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaloney authored and YuriSizov committed Aug 15, 2022
1 parent 9145420 commit ef94271
Show file tree
Hide file tree
Showing 37 changed files with 235 additions and 235 deletions.
14 changes: 7 additions & 7 deletions doc/classes/IP.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<return type="void" />
<param index="0" name="hostname" type="String" default="&quot;&quot;" />
<description>
Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed.
Removes all of a [param hostname]'s cached references. If no [param hostname] is given, all cached IP addresses are removed.
</description>
</method>
<method name="erase_resolve_item">
<return type="void" />
<param index="0" name="id" type="int" />
<description>
Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
Removes a given item [param id] from the queue. This should be used to free a queue after it has completed to enable more queries to happen.
</description>
</method>
<method name="get_local_addresses" qualifiers="const">
Expand Down Expand Up @@ -48,7 +48,7 @@
<return type="String" />
<param index="0" name="id" type="int" />
<description>
Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).
Returns a queued hostname's IP address, given its queue [param id]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]).
</description>
</method>
<method name="get_resolve_item_addresses" qualifiers="const">
Expand All @@ -62,31 +62,31 @@
<return type="int" enum="IP.ResolverStatus" />
<param index="0" name="id" type="int" />
<description>
Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code].
Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [param id].
</description>
</method>
<method name="resolve_hostname">
<return type="String" />
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>
Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code].
Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [param ip_type].
</description>
</method>
<method name="resolve_hostname_addresses">
<return type="Array" />
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>
Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code].
Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [param ip_type].
</description>
</method>
<method name="resolve_hostname_queue_item">
<return type="int" />
<param index="0" name="host" type="String" />
<param index="1" name="ip_type" type="int" enum="IP.Type" default="3" />
<description>
Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [param ip_type]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error.
</description>
</method>
</methods>
Expand Down
18 changes: 9 additions & 9 deletions doc/classes/ItemList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<param index="2" name="selectable" type="bool" default="true" />
<description>
Adds an item to the item list with specified text. Returns the index of an added item.
Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon.
Specify an [param icon], or use [code]null[/code] as the [param icon] for a list item with no icon.
If selectable is [code]true[/code], the list item will be selectable.
</description>
</method>
Expand Down Expand Up @@ -62,22 +62,22 @@
<param index="0" name="position" type="Vector2" />
<param index="1" name="exact" type="bool" default="false" />
<description>
Returns the item index at the given [code]position[/code].
When there is no item at that point, -1 will be returned if [code]exact[/code] is [code]true[/code], and the closest item index will be returned otherwise.
Returns the item index at the given [param position].
When there is no item at that point, -1 will be returned if [param exact] is [code]true[/code], and the closest item index will be returned otherwise.
</description>
</method>
<method name="get_item_custom_bg_color" qualifiers="const">
<return type="Color" />
<param index="0" name="idx" type="int" />
<description>
Returns the custom background color of the item specified by [code]idx[/code] index.
Returns the custom background color of the item specified by [param idx] index.
</description>
</method>
<method name="get_item_custom_fg_color" qualifiers="const">
<return type="Color" />
<param index="0" name="idx" type="int" />
<description>
Returns the custom foreground color of the item specified by [code]idx[/code] index.
Returns the custom foreground color of the item specified by [param idx] index.
</description>
</method>
<method name="get_item_icon" qualifiers="const">
Expand Down Expand Up @@ -195,14 +195,14 @@
<param index="0" name="from_idx" type="int" />
<param index="1" name="to_idx" type="int" />
<description>
Moves item from index [code]from_idx[/code] to [code]to_idx[/code].
Moves item from index [param from_idx] to [param to_idx].
</description>
</method>
<method name="remove_item">
<return type="void" />
<param index="0" name="idx" type="int" />
<description>
Removes the item specified by [code]idx[/code] index from the list.
Removes the item specified by [param idx] index from the list.
</description>
</method>
<method name="select">
Expand All @@ -219,15 +219,15 @@
<param index="0" name="idx" type="int" />
<param index="1" name="custom_bg_color" type="Color" />
<description>
Sets the background color of the item specified by [code]idx[/code] index to the specified [Color].
Sets the background color of the item specified by [param idx] index to the specified [Color].
</description>
</method>
<method name="set_item_custom_fg_color">
<return type="void" />
<param index="0" name="idx" type="int" />
<param index="1" name="custom_fg_color" type="Color" />
<description>
Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color].
Sets the foreground color of the item specified by [param idx] index to the specified [Color].
</description>
</method>
<method name="set_item_disabled">
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/JSON.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<return type="int" enum="Error" />
<param index="0" name="json_string" type="String" />
<description>
Attempts to parse the [code]json_string[/code] provided.
Attempts to parse the [param json_string] provided.
Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
</description>
</method>
Expand All @@ -65,8 +65,8 @@
<description>
Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types.
[b]Note:[/b] If [code]full_precision[/code] is true, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
The [code]indent[/code] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Note:[/b] If [param full_precision] is [code]true[/code], when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding.
The [param indent] parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like [code]" "[/code] will work. [code]\t[/code] and [code]\n[/code] can also be used for a tab indent, or to make a newline for each indent respectively.
[b]Example output:[/b]
[codeblock]
## JSON.stringify(my_dictionary)
Expand Down
22 changes: 11 additions & 11 deletions doc/classes/JSONRPC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<param index="1" name="params" type="Variant" />
<description>
Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response.
- [code]method[/code]: Name of the method being called.
- [code]params[/code]: An array or dictionary of parameters being passed to the method.
- [param method]: Name of the method being called.
- [param params]: An array or dictionary of parameters being passed to the method.
</description>
</method>
<method name="make_request">
Expand All @@ -26,9 +26,9 @@
<param index="2" name="id" type="Variant" />
<description>
Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to.
- [code]method[/code]: Name of the method being called.
- [code]params[/code]: An array or dictionary of parameters being passed to the method.
- [code]id[/code]: Uniquely identifies this request. The server is expected to send a response with the same ID.
- [param method]: Name of the method being called.
- [param params]: An array or dictionary of parameters being passed to the method.
- [param id]: Uniquely identifies this request. The server is expected to send a response with the same ID.
</description>
</method>
<method name="make_response">
Expand All @@ -37,8 +37,8 @@
<param index="1" name="id" type="Variant" />
<description>
When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead.
- [code]result[/code]: The return value of the function which was called.
- [code]id[/code]: The ID of the request this response is targeted to.
- [param result]: The return value of the function which was called.
- [param id]: The ID of the request this response is targeted to.
</description>
</method>
<method name="make_response_error" qualifiers="const">
Expand All @@ -48,9 +48,9 @@
<param index="2" name="id" type="Variant" default="null" />
<description>
Creates a response which indicates a previous reply has failed in some way.
- [code]code[/code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants.
- [code]message[/code]: A custom message about this error.
- [code]id[/code]: The request this error is a response to.
- [param code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants.
- [param message]: A custom message about this error.
- [param id]: The request this error is a response to.
</description>
</method>
<method name="process_action">
Expand All @@ -60,7 +60,7 @@
<description>
Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called.
To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass.
[code]action[/code]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.
[param action]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.
</description>
</method>
<method name="process_string">
Expand Down
12 changes: 6 additions & 6 deletions doc/classes/JavaScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<return type="Variant" />
<param index="0" name="object" type="String" />
<description>
Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
Creates a new JavaScript object using the [code]new[/code] constructor. The [param object] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage.
</description>
</method>
<method name="download_buffer">
Expand All @@ -31,8 +31,8 @@
<param index="1" name="name" type="String" />
<param index="2" name="mime" type="String" default="&quot;application/octet-stream&quot;" />
<description>
Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type.
[b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension.
Prompts the user to download a file containing the specified [param buffer]. The file will have the given [param name] and [param mime] type.
[b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [param name]'s extension.
[b]Note:[/b] Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click).
[b]Note:[/b] Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.
</description>
Expand All @@ -42,15 +42,15 @@
<param index="0" name="code" type="String" />
<param index="1" name="use_global_execution_context" type="bool" default="false" />
<description>
Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.
Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
If [param use_global_execution_context] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.
</description>
</method>
<method name="get_interface">
<return type="JavaScriptObject" />
<param index="0" name="interface" type="String" />
<description>
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.
Returns an interface to a JavaScript object that can be used by scripts. The [param interface] 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">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/KinematicCollision2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<return type="float" />
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
<description>
Returns the collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive.
Returns the collision angle according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive.
</description>
</method>
<method name="get_collider" qualifiers="const">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/KinematicCollision3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<param index="0" name="collision_index" type="int" default="0" />
<param index="1" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
<description>
Returns the collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive.
Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive.
</description>
</method>
<method name="get_collider" qualifiers="const">
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/Label.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<return type="int" />
<param index="0" name="line" type="int" default="-1" />
<description>
Returns the height of the line [code]line[/code].
If [code]line[/code] is set to [code]-1[/code], returns the biggest line height.
If there're no lines returns font size in pixels.
Returns the height of the line [param line].
If [param line] is set to [code]-1[/code], returns the biggest line height.
If there are no lines, returns font size in pixels.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/LightmapGIData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<return type="NodePath" />
<param index="0" name="user_idx" type="int" />
<description>
Returns the [NodePath] of the baked object at index [code]user_idx[/code].
Returns the [NodePath] of the baked object at index [param user_idx].
</description>
</method>
<method name="is_using_spherical_harmonics" qualifiers="const">
Expand All @@ -48,7 +48,7 @@
<return type="void" />
<param index="0" name="uses_spherical_harmonics" type="bool" />
<description>
If [code]uses_spherical_harmonics[/code] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
If [param uses_spherical_harmonics] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
[b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper.
</description>
</method>
Expand Down
Loading

0 comments on commit ef94271

Please sign in to comment.