Skip to content

Commit

Permalink
Sync classes with 2.0 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Mar 1, 2016
1 parent 7978760 commit f8b677e
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 29 deletions.
6 changes: 5 additions & 1 deletion classes/class_httpclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ Stub function

- :ref:`Dictionary<class_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)
Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator.

Structure: ("key":"value1; value2")

Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)

.. _class_HTTPClient_get_response_body_length:

Expand Down
20 changes: 13 additions & 7 deletions classes/class_nodepath.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NodePath
Brief Description
-----------------

Built-in type optimized for path traversing.
Pre-parsed scene tree path.

Member Functions
----------------
Expand All @@ -37,7 +37,11 @@ Member Functions
Description
-----------

Built-in type optimized for path traversing. A Node path is an optimized compiled path used for traversing the scene tree. It references nodes and can reference properties in that node, or even reference properties inside the resources of the node.
A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node<class_Node_get_node>` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, ``"Path2D/PathFollow2D/Sprite:texture:size"`` would refer to the size property of the texture resource on the node named "Sprite" which is a child of the other named nodes in the path. Note that if you want to get a resource, you must end the path with a colon, otherwise the last element will be used as a property name.

You will usually just pass a string to :ref:`Node.get_node<class_Node_get_node>` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with :ref:`NodePath<class_nodepath>` or the literal syntax ``@"path"``. Exporting a :ref:`NodePath<class_nodepath>` variable will give you a node selection widget in the properties panel of the editor, which can often be useful.

A :ref:`NodePath<class_nodepath>` is made up of a list of node names, a list of "subnode" (resource) names, and the name of a property in the final node or resource.

Member Function Description
---------------------------
Expand All @@ -46,31 +50,31 @@ Member Function Description

- :ref:`String<class_string>` **get_name** **(** :ref:`int<class_int>` idx **)**

Return a path level name.
Get the node name indicated by ``idx`` (0 to :ref:`get_name_count<class_NodePath_get_name_count>`)

.. _class_NodePath_get_name_count:

- :ref:`int<class_int>` **get_name_count** **(** **)**

Return the path level count.
Get the number of node names which make up the path.

.. _class_NodePath_get_property:

- :ref:`String<class_string>` **get_property** **(** **)**

Return the property associated (empty if none).
Get the path's property name, or an empty string if the path doesn't have a property.

.. _class_NodePath_get_subname:

- :ref:`String<class_string>` **get_subname** **(** :ref:`int<class_int>` idx **)**

Return the subname level name.
Get the resource name indicated by ``idx`` (0 to :ref:`get_subname_count<class_NodePath_get_subname_count>`)

.. _class_NodePath_get_subname_count:

- :ref:`int<class_int>` **get_subname_count** **(** **)**

Return the subname count.
Get the number of resource names in the path.

.. _class_NodePath_is_absolute:

Expand All @@ -88,4 +92,6 @@ Return true if the node path is empty.

- :ref:`NodePath<class_nodepath>` **NodePath** **(** :ref:`String<class_string>` from **)**

Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, ``"."`` and ``".."`` indicate the current node and its parent.


2 changes: 1 addition & 1 deletion classes/class_object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Objects do not manage memory, if inheriting from one the object will most likely

Some derivates add memory management, such as :ref:`Reference<class_reference>` (which keeps a reference count and deletes itself automatically when no longer referenced) and :ref:`Node<class_node>`, which deletes the children tree when deleted.

Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list<class_Object__get_property_list>` and handled in :ref:`_get<class_Object__get>` and :ref:`_set<class_Object__set>`. However, scripting languages and C++ have simper means to export them.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in :ref:`_get_property_list<class_Object__get_property_list>` and handled in :ref:`_get<class_Object__get>` and :ref:`_set<class_Object__set>`. However, scripting languages and C++ have simpler means to export them.

Objects also receive notifications (:ref:`_notification<class_Object__notification>`). Notifications are a simple way to notify the object about simple events, so they can all be handled together.

Expand Down
6 changes: 6 additions & 0 deletions classes/class_os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ Member Functions
+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`native_video_pause<class_OS_native_video_pause>` **(** **)** |
+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`native_video_unpause<class_OS_native_video_unpause>` **(** **)** |
+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_string>` | :ref:`get_scancode_string<class_OS_get_scancode_string>` **(** :ref:`int<class_int>` code **)** const |
+----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_scancode_unicode<class_OS_is_scancode_unicode>` **(** :ref:`int<class_int>` code **)** const |
Expand Down Expand Up @@ -664,6 +666,10 @@ Return the total amount of dynamic memory used (only works in debug).

- void **native_video_pause** **(** **)**

.. _class_OS_native_video_unpause:

- void **native_video_unpause** **(** **)**

.. _class_OS_get_scancode_string:

- :ref:`String<class_string>` **get_scancode_string** **(** :ref:`int<class_int>` code **)** const
Expand Down
4 changes: 2 additions & 2 deletions classes/class_rigidbody2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Member Function Description

- void **_integrate_forces** **(** :ref:`Physics2DDirectBodyState<class_physics2ddirectbodystate>` state **)** virtual

Override this function to use a custom force integrator. This allows to hook up to the physics processing and alter the simulation state for the object on every frame.
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default it works in addition to the usual physics behavior, but :ref:`set_use_custom_integrator<class_RigidBody2D_set_use_custom_integrator>` allows you to disable the default behavior and do fully custom force integration for a body.

.. _class_RigidBody2D_set_mode:

Expand Down Expand Up @@ -271,7 +271,7 @@ Return the maximum contacts that can be reported. See :ref:`set_max_contacts_rep

- void **set_use_custom_integrator** **(** :ref:`bool<class_bool>` enable **)**

Set to true if the body shall not do any internal force integration at all (like gravity or air friction). Only the :ref:`_integrate_forces<class_RigidBody2D__integrate_forces>` will be able to integrate them if overridden.
Pass true to disable the internal force integration (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_RigidBody2D__integrate_forces>` function, if defined.

.. _class_RigidBody2D_is_using_custom_integrator:

Expand Down
12 changes: 12 additions & 0 deletions classes/class_scenestate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Member Functions
+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NodePath<class_nodepath>` | :ref:`get_node_owner_path<class_SceneState_get_node_owner_path>` **(** :ref:`int<class_int>` idx **)** const |
+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_node_instance_placeholder<class_SceneState_is_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** const |
+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_string>` | :ref:`get_node_instance_placeholder<class_SceneState_get_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** const |
+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedScene<class_packedscene>` | :ref:`get_node_instance<class_SceneState_get_node_instance>` **(** :ref:`int<class_int>` idx **)** const |
+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`StringArray<class_stringarray>` | :ref:`get_node_groups<class_SceneState_get_node_groups>` **(** :ref:`int<class_int>` idx **)** const |
Expand Down Expand Up @@ -77,6 +81,14 @@ Member Function Description

- :ref:`NodePath<class_nodepath>` **get_node_owner_path** **(** :ref:`int<class_int>` idx **)** const

.. _class_SceneState_is_node_instance_placeholder:

- :ref:`bool<class_bool>` **is_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** const

.. _class_SceneState_get_node_instance_placeholder:

- :ref:`String<class_string>` **get_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** const

.. _class_SceneState_get_node_instance:

- :ref:`PackedScene<class_packedscene>` **get_node_instance** **(** :ref:`int<class_int>` idx **)** const
Expand Down

0 comments on commit f8b677e

Please sign in to comment.