From ee513aba440e740ee48f1ab25c0a161323a20418 Mon Sep 17 00:00:00 2001 From: David Saltares Date: Sun, 8 Oct 2017 18:33:17 +0100 Subject: [PATCH] [DOCS] - Completes the docs for the OS class --- doc/classes/OS.xml | 84 ++++++++++++++++++++++++++++++---------------- 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index d411d07979..f78821e158 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -26,14 +26,14 @@ - Return true if the host OS allows drawing. + Returns [code]true[/code] if the host OS allows drawing. - Returns if the current host platform is using multiple threads. + Returns [code]true[/code] if the current host platform is using multiple threads. @@ -117,7 +117,7 @@ - Return the commandline passed to the engine. + Returns the command line arguments passed to the engine. @@ -131,7 +131,7 @@ - Return the absolute directory path of user data path([user://]). + Returns the absolute directory path of user data path([user://]). @@ -166,7 +166,7 @@ - Return the total amount of dynamic memory used (only works in debug). + Returns the total amount of dynamic memory used (only works in debug). @@ -175,14 +175,14 @@ - Return an environment variable. + Returns an environment variable. - Return the path to the current engine executable. + Returns the path to the current engine executable. @@ -203,7 +203,7 @@ - Return the host OS locale. + Returns the host OS locale. @@ -217,25 +217,28 @@ - Return the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". + Returns the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". + Returns the amount of battery left in the device as a percentage. + Returns the time in seconds before the device runs out of battery. + Returns the current state of the device regarding battery and power. See [code]POWERSTATE_*[/code] constants. @@ -265,7 +268,7 @@ - Returns the number of displays attached to the host machine + Returns the number of displays attached to the host machine. @@ -298,6 +301,7 @@ + Returns the position of the specified screen by index. If no screen index is provided, the current screen will be used. @@ -319,7 +323,7 @@ - Return the max amount of static memory used (only works in debug). + Returns the max amount of static memory used (only works in debug). @@ -335,6 +339,7 @@ + Returns the actual path to commonly used folders across different platforms. Available locations are specified in [OS.SystemDir]. @@ -348,7 +353,7 @@ - Return the amount of time passed in milliseconds since the engine started. + Returns the amount of time passed in milliseconds since the engine started. @@ -357,19 +362,21 @@ - Returns current time as a dictionary of keys: hour, minute, second + Returns current time as a dictionary of keys: hour, minute, second. + Returns the current time zone as a dictionary with the keys: bias and name. + Returns a unique string. @@ -410,20 +417,21 @@ - Return true if an environment variable exists. + Returns [code]true[/code] if an environment variable exists. + Returns [code]true[/code] if the device has a touchscreen or emulates one. - Returns true if the platform has a virtual keyboard, false otherwise. + Returns [code]true[/code] if the platform has a virtual keyboard, [code]false[/code] otherwise. @@ -446,20 +454,21 @@ - Return true if low cpu usage mode is enabled. + Returns [code]true[/code] if low cpu usage mode is enabled. - Returns whether the screen is being kept on or not. + Returns [code]true[/code] if the screen is being kept on. + Returns [code]true[/code] if the "Okay" button should appear on the left and "Cancel" on the right. @@ -468,13 +477,14 @@ + Returns [code]true[/code] if the input code has a unicode character. - Return true if the engine was executed with -v (verbose stdout). + Returns [code]true[/code] if the engine was executed with -v (verbose stdout). @@ -495,28 +505,28 @@ - Returns whether the window is in fullscreen mode or not. + Returns [code]true[/code] if the window is in fullscreen mode. - Return true if the window is maximized. + Returns [code]true[/code] if the window is maximized. - Return true if the window is minimized. + Returns [code]true[/code] if the window is minimized. - Returns whether the window is resizable or not. + Returns [code]true[/code] if the window is resizable. @@ -532,12 +542,14 @@ + Returns [code]true[/code] if native video is playing. + Pauses native video playback. @@ -552,18 +564,21 @@ + Plays native video from the specified path, at the given volume and with audio and subtitle tracks. + Stops native video playback. + Resumes native video playback. @@ -572,12 +587,14 @@ + Shows all resources in the game. Optionally the list can be written to a file. + Shows the list of loaded textures sorted by size in memory. @@ -586,6 +603,7 @@ + Shows the number of resources loaded by the game of the given types. @@ -594,6 +612,7 @@ + Shows all resources currently used by the game. @@ -609,6 +628,7 @@ + Removes the window frame. @@ -617,7 +637,7 @@ - Set clipboard to the OS. + Sets clipboard to the OS. @@ -626,6 +646,7 @@ + Sets the current screen by index. @@ -634,6 +655,7 @@ + Sets the exit code that will be returned by the game. @@ -642,6 +664,7 @@ + Sets the game's icon. @@ -658,7 +681,7 @@ - Set keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) + Sets keep screen on if true, or goes to sleep by device setting if false. (for Android/iOS) @@ -667,7 +690,7 @@ - Set to true to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. This way, editors using the engine UI only use very little cpu. + Set to [code]true[/code] to enable the low cpu usage mode. In this mode, the screen only redraws when there are changes, and a considerable sleep time is inserted between frames. Use this in tool mode to reduce CPU usage. @@ -685,6 +708,7 @@ + Sets the name of the current thread. @@ -693,6 +717,7 @@ + Enables backup saves if [code]enabled[/code] is [code]true[/code]. @@ -719,7 +744,7 @@ - Set the window size to maximized. + Set [code]true[/code] to maximize the window. @@ -728,7 +753,7 @@ - Set whether the window is minimized. + Set [code]true[/code] to minimize the window. @@ -746,7 +771,7 @@ - Set the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. + Sets the window resizable state, if the window is not resizable it will preserve the dimensions specified in the project settings. @@ -773,6 +798,9 @@ + 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 downloads folders of the user. + [code]OS.shell_open("http://godotengine.org")[/code] opens the default web browser on the official Godot website.