diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-08 22:50:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 22:50:35 +0200 |
commit | 682dbe5d00aa7730659771b16704eba83f166a7b (patch) | |
tree | 8555e07c3bfb3b2892d530bc93fbf47d14519e35 /doc/classes/OS.xml | |
parent | d9d5990c517b63f41881de05cb4644c36e0c77e0 (diff) | |
parent | c5d7115038de5f83cb83e08748615a84fc26bee2 (diff) |
Merge pull request #64008 from YuriSizov/doctool-add-param-reference-syntax
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r-- | doc/classes/OS.xml | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 75cd52787a..a1f1e9f0d6 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -12,8 +12,8 @@ <methods> <method name="alert"> <return type="void" /> - <argument index="0" name="text" type="String" /> - <argument index="1" name="title" type="String" default=""Alert!"" /> + <param index="0" name="text" type="String" /> + <param index="1" name="title" type="String" default=""Alert!"" /> <description> Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. </description> @@ -33,14 +33,14 @@ </method> <method name="crash"> <return type="void" /> - <argument index="0" name="message" type="String" /> + <param index="0" name="message" type="String" /> <description> Crashes the engine (or the editor if called within a [code]@tool[/code] script). This should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error] or [method alert]. See also [method kill]. </description> </method> <method name="create_instance"> <return type="int" /> - <argument index="0" name="arguments" type="PackedStringArray" /> + <param index="0" name="arguments" type="PackedStringArray" /> <description> Creates a new instance of Godot that runs independently. The [code]arguments[/code] are used in the given order and separated by a space. If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code]. @@ -49,9 +49,9 @@ </method> <method name="create_process"> <return type="int" /> - <argument index="0" name="path" type="String" /> - <argument index="1" name="arguments" type="PackedStringArray" /> - <argument index="2" name="open_console" type="bool" default="false" /> + <param index="0" name="path" type="String" /> + <param index="1" name="arguments" type="PackedStringArray" /> + <param index="2" name="open_console" type="bool" default="false" /> <description> Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in [code]path[/code] must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. @@ -72,7 +72,7 @@ </method> <method name="delay_msec" qualifiers="const"> <return type="void" /> - <argument index="0" name="msec" type="int" /> + <param index="0" name="msec" type="int" /> <description> Delays execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. [b]Note:[/b] [method delay_msec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). @@ -81,7 +81,7 @@ </method> <method name="delay_usec" qualifiers="const"> <return type="void" /> - <argument index="0" name="usec" type="int" /> + <param index="0" name="usec" type="int" /> <description> Delays execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. [b]Note:[/b] [method delay_usec] is a [i]blocking[/i] way to delay code execution. To delay code execution in a non-blocking way, see [method SceneTree.create_timer]. Awaiting with [method SceneTree.create_timer] will delay the execution of code placed below the [code]await[/code] without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). @@ -90,7 +90,7 @@ </method> <method name="dump_memory_to_file"> <return type="void" /> - <argument index="0" name="file" type="String" /> + <param index="0" name="file" type="String" /> <description> Dumps the memory allocation ringlist to a file (only works in debug). Entry format per line: "Address - Size - Description". @@ -98,7 +98,7 @@ </method> <method name="dump_resources_to_file"> <return type="void" /> - <argument index="0" name="file" type="String" /> + <param index="0" name="file" type="String" /> <description> Dumps all used resources to file (only works in debug). Entry format per line: "Resource Type : Resource Location". @@ -107,11 +107,11 @@ </method> <method name="execute"> <return type="int" /> - <argument index="0" name="path" type="String" /> - <argument index="1" name="arguments" type="PackedStringArray" /> - <argument index="2" name="output" type="Array" default="[]" /> - <argument index="3" name="read_stderr" type="bool" default="false" /> - <argument index="4" name="open_console" type="bool" default="false" /> + <param index="0" name="path" type="String" /> + <param index="1" name="arguments" type="PackedStringArray" /> + <param index="2" name="output" type="Array" default="[]" /> + <param index="3" name="read_stderr" type="bool" default="false" /> + <param index="4" name="open_console" type="bool" default="false" /> <description> Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too. On Windows, if [code]open_console[/code] is [code]true[/code] and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. @@ -148,7 +148,7 @@ </method> <method name="find_keycode_from_string" qualifiers="const"> <return type="int" enum="Key" /> - <argument index="0" name="string" type="String" /> + <param index="0" name="string" type="String" /> <description> Returns the keycode of the given string (e.g. "Escape"). </description> @@ -235,7 +235,7 @@ </method> <method name="get_environment" qualifiers="const"> <return type="String" /> - <argument index="0" name="variable" type="String" /> + <param index="0" name="variable" type="String" /> <description> Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. @@ -257,7 +257,7 @@ </method> <method name="get_keycode_string" qualifiers="const"> <return type="String" /> - <argument index="0" name="code" type="int" enum="Key" /> + <param index="0" name="code" type="int" enum="Key" /> <description> Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers]. @@ -394,8 +394,8 @@ </method> <method name="get_system_dir" qualifiers="const"> <return type="String" /> - <argument index="0" name="dir" type="int" enum="OS.SystemDir" /> - <argument index="1" name="shared_storage" type="bool" default="true" /> + <param index="0" name="dir" type="int" enum="OS.SystemDir" /> + <param index="1" name="shared_storage" type="bool" default="true" /> <description> Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir]. [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. @@ -404,9 +404,9 @@ </method> <method name="get_system_font_path" qualifiers="const"> <return type="String" /> - <argument index="0" name="font_name" type="String" /> - <argument index="1" name="bold" type="bool" default="false" /> - <argument index="2" name="italic" type="bool" default="false" /> + <param index="0" name="font_name" type="String" /> + <param index="1" name="bold" type="bool" default="false" /> + <param index="2" name="italic" type="bool" default="false" /> <description> Returns path to the system font file with [code]font_name[/code] and style. Return empty string if no matching fonts found. [b]Note:[/b] This method is implemented on iOS, Linux, macOS and Windows. @@ -449,7 +449,7 @@ </method> <method name="has_environment" qualifiers="const"> <return type="bool" /> - <argument index="0" name="variable" type="String" /> + <param index="0" name="variable" type="String" /> <description> Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. @@ -457,7 +457,7 @@ </method> <method name="has_feature" qualifiers="const"> <return type="bool" /> - <argument index="0" name="tag_name" type="String" /> + <param index="0" name="tag_name" type="String" /> <description> Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] Tag names are case-sensitive. @@ -473,14 +473,14 @@ </method> <method name="is_keycode_unicode" qualifiers="const"> <return type="bool" /> - <argument index="0" name="code" type="int" /> + <param index="0" name="code" type="int" /> <description> Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> <method name="is_process_running" qualifiers="const"> <return type="bool" /> - <argument index="0" name="pid" type="int" /> + <param index="0" name="pid" type="int" /> <description> Returns [code]true[/code] if the child process ID ([code]pid[/code]) is still running or [code]false[/code] if it has terminated. Must be a valid ID generated from [method create_process]. @@ -507,7 +507,7 @@ </method> <method name="kill"> <return type="int" enum="Error" /> - <argument index="0" name="pid" type="int" /> + <param index="0" name="pid" type="int" /> <description> Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash]. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. @@ -516,7 +516,7 @@ </method> <method name="move_to_trash" qualifiers="const"> <return type="int" enum="Error" /> - <argument index="0" name="path" type="String" /> + <param index="0" name="path" type="String" /> <description> Moves the file or directory to the system's recycle bin. See also [method Directory.remove]. The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in [code]res://[/code] as it will not work in exported project. @@ -536,7 +536,7 @@ </method> <method name="print_all_resources"> <return type="void" /> - <argument index="0" name="tofile" type="String" default="""" /> + <param index="0" name="tofile" type="String" default="""" /> <description> Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [code]tofile[/code]. </description> @@ -549,21 +549,21 @@ </method> <method name="print_resources_by_type"> <return type="void" /> - <argument index="0" name="types" type="PackedStringArray" /> + <param index="0" name="types" type="PackedStringArray" /> <description> Shows the number of resources loaded by the game of the given types. </description> </method> <method name="print_resources_in_use"> <return type="void" /> - <argument index="0" name="short" type="bool" default="false" /> + <param index="0" name="short" type="bool" default="false" /> <description> Shows all resources currently used by the game. </description> </method> <method name="request_permission"> <return type="bool" /> - <argument index="0" name="name" type="String" /> + <param index="0" name="name" type="String" /> <description> At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android. </description> @@ -577,8 +577,8 @@ </method> <method name="set_environment" qualifiers="const"> <return type="bool" /> - <argument index="0" name="variable" type="String" /> - <argument index="1" name="value" type="String" /> + <param index="0" name="variable" type="String" /> + <param index="1" name="value" type="String" /> <description> Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. @@ -586,8 +586,8 @@ </method> <method name="set_restart_on_exit"> <return type="void" /> - <argument index="0" name="restart" type="bool" /> - <argument index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" /> + <param index="0" name="restart" type="bool" /> + <param index="1" name="arguments" type="PackedStringArray" default="PackedStringArray()" /> <description> If [code]restart[/code] is [code]true[/code], restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command line [code]arguments[/code] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [code]arguments[/code]. [method set_restart_on_exit] can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments]. @@ -597,21 +597,21 @@ </method> <method name="set_thread_name"> <return type="int" enum="Error" /> - <argument index="0" name="name" type="String" /> + <param index="0" name="name" type="String" /> <description> Sets the name of the current thread. </description> </method> <method name="set_use_file_access_save_and_swap"> <return type="void" /> - <argument index="0" name="enabled" type="bool" /> + <param index="0" name="enabled" type="bool" /> <description> Enables backup saves if [code]enabled[/code] is [code]true[/code]. </description> </method> <method name="shell_open"> <return type="int" enum="Error" /> - <argument index="0" name="uri" type="String" /> + <param index="0" name="uri" type="String" /> <description> Requests the OS to open a resource with the most appropriate program. For example: - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. |