diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index 6d92aaf13..22f0ed208 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -36,7 +36,7 @@ Member Functions Description ----------- -Damped spring constraint for 2D physics. This resembles a spring joint that always want to go back to a given length. +Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length. Member Function Description --------------------------- @@ -69,24 +69,24 @@ Return the resting length of the spring joint. The joint will always try to go t - void **set_stiffness** **(** :ref:`float` stiffness **)** -Set the stiffness of the spring joint. +Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. .. _class_DampedSpringJoint2D_get_stiffness: - :ref:`float` **get_stiffness** **(** **)** const -Return the stiffness of the spring joint. +Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. .. _class_DampedSpringJoint2D_set_damping: - void **set_damping** **(** :ref:`float` damping **)** -Set the damping of the spring joint. +Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). .. _class_DampedSpringJoint2D_get_damping: - :ref:`float` **get_damping** **(** **)** const -Return the damping of the spring joint. +Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). diff --git a/classes/class_directory.rst b/classes/class_directory.rst index 4303ae9ea..4b7eeec65 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -10,7 +10,7 @@ Directory Brief Description ----------------- - +Type used to handle the filesystem. Member Functions ---------------- @@ -51,6 +51,29 @@ Member Functions | Error | :ref:`remove` **(** :ref:`String` file **)** | +------------------------------+----------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +Directory type. Is used to manage directories and their content (not restricted to the project folder). + +Example for how to iterate through the files of a directory: + +:: + + func dir(path): + var d = Directory.new() + if d.open( path )==0: + d.list_dir_begin() + var file_name = d.get_next() + while(file_name!=""): + if d.current_is_dir(): + print("Found directory: " + file_name) + else: + print("Found file:" + file_name) + file_name = d.get_next() + else: + print("Some open Error, maybe directory not found?") + Member Function Description --------------------------- @@ -58,22 +81,34 @@ Member Function Description - Error **open** **(** :ref:`String` path **)** +Opens a directory to work with. Needs a path, example "res://folder" + .. _class_Directory_list_dir_begin: - :ref:`bool` **list_dir_begin** **(** **)** +Loads all file names of the current directory (prepares the get_next() function). + .. _class_Directory_get_next: - :ref:`String` **get_next** **(** **)** +Is used to iterate through the files of the current directory. Returns the name(no path) of the current file/directory, it also contains "." and ".." . + +Returns an empty String "" at the end of the list. + .. _class_Directory_current_is_dir: - :ref:`bool` **current_is_dir** **(** **)** const +Returns true if the current file you are looking at with get_next() is a directory or "." or ".." otherwise false. + .. _class_Directory_list_dir_end: - void **list_dir_end** **(** **)** +Run this to empty the list of remaining files in get_next(). You can use it to end the iteration, as soon as your goal is reached. + .. _class_Directory_get_drive_count: - :ref:`int` **get_drive_count** **(** **)** @@ -86,10 +121,14 @@ Member Function Description - Error **change_dir** **(** :ref:`String` todir **)** +Needs a path or name to the next directory. When the target directory is in the current directory you can use "newfolder" otherwise you need the full path "res://currentfolder/newfolder" + .. _class_Directory_get_current_dir: - :ref:`String` **get_current_dir** **(** **)** +Returns a path to the current directory, example: "res://folder" + .. _class_Directory_make_dir: - Error **make_dir** **(** :ref:`String` name **)** @@ -106,6 +145,8 @@ Member Function Description - :ref:`bool` **dir_exists** **(** :ref:`String` name **)** +Returns true if directory exists otherwise false. Needs a path, example: "res://folder" + .. _class_Directory_get_space_left: - :ref:`int` **get_space_left** **(** **)** diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index 7003d3907..8b5d22920 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -138,8 +138,6 @@ Connect to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. - - verify_host will check the SSL identity of the host if set to true. .. _class_HTTPClient_set_connection: @@ -154,14 +152,13 @@ Sends a request to the connected host. The url is what is normally behind the ho Headers are HTTP request headers. -To create a POST request with query strings to push to the server, do:: +To create a POST request with query strings to push to the server, do: + +:: var fields = {"username" : "user", "password" : "pass"} - var queryString = httpClient.query_string_from_dict(fields) - var headers = :ref:`"Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())` - var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) .. _class_HTTPClient_send_body_text: @@ -200,6 +197,8 @@ Stub function - :ref:`Dictionary` **get_response_headers_as_dictionary** **(** **)** +Returns all response headers as dictionary where the keys and values are transformed to lower case. A key with more than one value is a simple string with "; " as separator. example: (content-length:12), (content-type:application/json; charset=utf-8) + .. _class_HTTPClient_get_response_body_length: - :ref:`int` **get_response_body_length** **(** **)** const @@ -240,12 +239,12 @@ This needs to be called in order to have any request processed. Check results wi - :ref:`String` **query_string_from_dict** **(** :ref:`Dictionary` fields **)** -Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:: +Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: + +:: var fields = {"username": "user", "password": "pass"} - String queryString = httpClient.query_string_from_dict(fields) - returns:= "username=user&password=pass" diff --git a/classes/class_inputeventjoybutton.rst b/classes/class_inputeventjoystickbutton.rst similarity index 61% rename from classes/class_inputeventjoybutton.rst rename to classes/class_inputeventjoystickbutton.rst index 16a50c179..60d730100 100644 --- a/classes/class_inputeventjoybutton.rst +++ b/classes/class_inputeventjoystickbutton.rst @@ -1,7 +1,7 @@ -.. _class_InputEventJoyButton: +.. _class_InputEventJoystickButton: -InputEventJoyButton -=================== +InputEventJoystickButton +======================== **Category:** Built-In Types @@ -13,19 +13,19 @@ Brief Description Member Functions ---------------- -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_echo` **(** **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pressed` **(** **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- @@ -53,27 +53,27 @@ Numeric Constants Member Function Description --------------------------- -.. _class_InputEventJoyButton_is_action: +.. _class_InputEventJoystickButton_is_action: - :ref:`bool` **is_action** **(** :ref:`String` action **)** -.. _class_InputEventJoyButton_is_action_pressed: +.. _class_InputEventJoystickButton_is_action_pressed: - :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** -.. _class_InputEventJoyButton_is_action_released: +.. _class_InputEventJoystickButton_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** -.. _class_InputEventJoyButton_is_echo: +.. _class_InputEventJoystickButton_is_echo: - :ref:`bool` **is_echo** **(** **)** -.. _class_InputEventJoyButton_is_pressed: +.. _class_InputEventJoystickButton_is_pressed: - :ref:`bool` **is_pressed** **(** **)** -.. _class_InputEventJoyButton_set_as_action: +.. _class_InputEventJoystickButton_set_as_action: - void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** diff --git a/classes/class_inputeventjoymotion.rst b/classes/class_inputeventjoystickmotion.rst similarity index 61% rename from classes/class_inputeventjoymotion.rst rename to classes/class_inputeventjoystickmotion.rst index 09061029a..00784c13a 100644 --- a/classes/class_inputeventjoymotion.rst +++ b/classes/class_inputeventjoystickmotion.rst @@ -1,7 +1,7 @@ -.. _class_InputEventJoyMotion: +.. _class_InputEventJoystickMotion: -InputEventJoyMotion -=================== +InputEventJoystickMotion +======================== **Category:** Built-In Types @@ -13,19 +13,19 @@ Brief Description Member Functions ---------------- -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_echo` **(** **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_pressed` **(** **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | -+--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action` **(** :ref:`String` action **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_pressed` **(** :ref:`String` is_action_pressed **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_action_released` **(** :ref:`String` is_action_released **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_echo` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_pressed` **(** **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_as_action` **(** :ref:`String` action, :ref:`bool` pressed **)** | ++--------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- @@ -52,27 +52,27 @@ Numeric Constants Member Function Description --------------------------- -.. _class_InputEventJoyMotion_is_action: +.. _class_InputEventJoystickMotion_is_action: - :ref:`bool` **is_action** **(** :ref:`String` action **)** -.. _class_InputEventJoyMotion_is_action_pressed: +.. _class_InputEventJoystickMotion_is_action_pressed: - :ref:`bool` **is_action_pressed** **(** :ref:`String` is_action_pressed **)** -.. _class_InputEventJoyMotion_is_action_released: +.. _class_InputEventJoystickMotion_is_action_released: - :ref:`bool` **is_action_released** **(** :ref:`String` is_action_released **)** -.. _class_InputEventJoyMotion_is_echo: +.. _class_InputEventJoystickMotion_is_echo: - :ref:`bool` **is_echo** **(** **)** -.. _class_InputEventJoyMotion_is_pressed: +.. _class_InputEventJoystickMotion_is_pressed: - :ref:`bool` **is_pressed** **(** **)** -.. _class_InputEventJoyMotion_set_as_action: +.. _class_InputEventJoystickMotion_set_as_action: - void **set_as_action** **(** :ref:`String` action, :ref:`bool` pressed **)** diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 403485ba3..7556f9053 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -46,7 +46,7 @@ MultiMesh provides low level mesh instancing. If the amount of :ref:`Mesh`. diff --git a/classes/class_navigationpolygoninstance.rst b/classes/class_navigationpolygoninstance.rst index 0cfd5b336..158c9ab7a 100644 --- a/classes/class_navigationpolygoninstance.rst +++ b/classes/class_navigationpolygoninstance.rst @@ -15,26 +15,26 @@ Brief Description Member Functions ---------------- -+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_navigation_polygon` **(** :ref:`Object` navpoly **)** | -+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`get_navigation_polygon` **(** **)** const | -+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | -+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_enabled` **(** **)** const | -+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_navigation_polygon` **(** :ref:`NavigationPolygon` navpoly **)** | ++----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NavigationPolygon` | :ref:`get_navigation_polygon` **(** **)** const | ++----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | ++----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_enabled` **(** **)** const | ++----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_NavigationPolygonInstance_set_navigation_polygon: -- void **set_navigation_polygon** **(** :ref:`Object` navpoly **)** +- void **set_navigation_polygon** **(** :ref:`NavigationPolygon` navpoly **)** .. _class_NavigationPolygonInstance_get_navigation_polygon: -- :ref:`Object` **get_navigation_polygon** **(** **)** const +- :ref:`NavigationPolygon` **get_navigation_polygon** **(** **)** const .. _class_NavigationPolygonInstance_set_enabled: diff --git a/classes/class_os.rst b/classes/class_os.rst index ce8b3491c..30e70a1a4 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -485,7 +485,7 @@ Return true if an environment variable exists. - :ref:`String` **get_name** **(** **)** const -Return the name of the host OS. +Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "WinRT", "X11" .. _class_OS_get_cmdline_args: diff --git a/classes/class_regex.rst b/classes/class_regex.rst index bf41e2759..aca183cc3 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -28,6 +28,8 @@ Member Functions +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_capture` **(** :ref:`int` capture **)** const | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_capture_start` **(** :ref:`int` capture **)** const | ++----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringArray` | :ref:`get_captures` **(** **)** const | +----------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -109,6 +111,10 @@ Returns the number of capturing groups. A captured group is the part of a string Returns a captured group. A captured group is the part of a string that matches a part of the pattern delimited by parentheses (unless they are non-capturing parentheses *(?:)*). +.. _class_RegEx_get_capture_start: + +- :ref:`int` **get_capture_start** **(** :ref:`int` capture **)** const + .. _class_RegEx_get_captures: - :ref:`StringArray` **get_captures** **(** **)** const diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 870c12e46..38d82794e 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -92,6 +92,8 @@ Member Functions +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_cell_y_flipped` **(** :ref:`int` x, :ref:`int` y **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_cell_transposed` **(** :ref:`int` x, :ref:`int` y **)** const | ++----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_used_cells` **(** **)** const | @@ -375,6 +377,12 @@ Return whether the referenced cell is flipped over the X axis. Return whether the referenced cell is flipped over the Y axis. +.. _class_TileMap_is_cell_transposed: + +- :ref:`bool` **is_cell_transposed** **(** :ref:`int` x, :ref:`int` y **)** const + +Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector). + .. _class_TileMap_clear: - void **clear** **(** **)**