summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AnimationPlayer.xml92
-rw-r--r--doc/classes/HTTPClient.xml41
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JSONParseResult.xml10
-rw-r--r--doc/classes/Navigation.xml11
-rw-r--r--doc/classes/Node.xml106
-rw-r--r--doc/classes/PopupMenu.xml14
7 files changed, 188 insertions, 88 deletions
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index d61211bb6b..570f5e9741 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -90,6 +90,13 @@
Returns the list of stored animation names.
</description>
</method>
+ <method name="get_autoplay" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of the animation that will be automatically played when the scene is loaded.
+ </description>
+ </method>
<method name="get_blend_time" qualifiers="const">
<return type="float">
</return>
@@ -101,11 +108,18 @@
Get the blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
+ <method name="get_current_animation" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of the animation being played.
+ </description>
+ </method>
<method name="get_current_animation_length" qualifiers="const">
<return type="float">
</return>
<description>
- Get the length (in seconds) of the currently playing animation.
+ Get the length (in seconds) of the currently being played animation.
</description>
</method>
<method name="get_current_animation_position" qualifiers="const">
@@ -115,6 +129,12 @@
Get the position (in seconds) of the currently playing animation.
</description>
</method>
+ <method name="get_speed_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="has_animation" qualifiers="const">
<return type="bool">
</return>
@@ -124,6 +144,13 @@
Returns [code]true[/code] if the [code]AnimationPlayer[/code] stores an [Animation] with key [code]name[/code].
</description>
</method>
+ <method name="is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the player is active.
+ </description>
+ </method>
<method name="is_playing" qualifiers="const">
<return type="bool">
</return>
@@ -143,7 +170,8 @@
<argument index="3" name="from_end" type="bool" default="false">
</argument>
<description>
- Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
+ Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the
+ animation backwards.
</description>
</method>
<method name="play_backwards">
@@ -194,7 +222,25 @@
<argument index="1" name="update" type="bool" default="false">
</argument>
<description>
- Seek the animation to the [code]seconds[/code] point in time (in seconds). If 'update' is true, the animation updates too, otherwise it updates at process time.
+ Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time.
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
+ </argument>
+ <description>
+ Sets the player as active (playing). If [code]true[/code], updates animations in response to process-related notifications. Default value: [code]true[/code].
+ </description>
+ </method>
+ <method name="set_autoplay">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Defines the name of the animation to play when the scene loads. Default value: [code]""[/code].
</description>
</method>
<method name="set_blend_time">
@@ -210,34 +256,37 @@
Specify a blend time (in seconds) between two animations, referenced by their names.
</description>
</method>
- <method name="stop">
+ <method name="set_current_animation">
<return type="void">
</return>
- <argument index="0" name="reset" type="bool" default="true">
+ <argument index="0" name="anim" type="String">
</argument>
<description>
- Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the anim position is reset to [code]0[/code].
+ Sets the name of the current animation. If already playing, restarts the animation. Ensure [member active] is [code]true[/code] to simulate [method play]. Default value: [code]""[/code].
</description>
</method>
- <method name="stop_all">
+ <method name="set_speed_scale">
<return type="void">
</return>
+ <argument index="0" name="speed" type="float">
+ </argument>
<description>
- Stop playback of animations (deprecated).
+ Sets the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default value: [code]1[/code].
+ </description>
+ </method>
+ <method name="stop">
+ <return type="void">
+ </return>
+ <argument index="0" name="reset" type="bool" default="true">
+ </argument>
+ <description>
+ Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the anim position is reset to [code]0[/code].
</description>
</method>
</methods>
<members>
- <member name="active" type="bool" setter="set_active" getter="is_active">
- If [code]true[/code] updates animations in response to process-related notifications. Default value: [code]true[/code].
- </member>
- <member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay">
- The name of the animation to play when the scene loads. Default value: [code]""[/code].
- </member>
- <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation">
- The name of the current animation. Default value: [code]""[/code].
- </member>
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time">
+ The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: [code]0[/code].
</member>
<member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode">
The process notification in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE].
@@ -245,9 +294,6 @@
<member name="root_node" type="NodePath" setter="set_root" getter="get_root">
The node from which node path references will travel. Default value: [code]".."[/code].
</member>
- <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale">
- The speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default value: [code]1[/code].
- </member>
</members>
<signals>
<signal name="animation_changed">
@@ -256,21 +302,21 @@
<argument index="1" name="new_name" type="String">
</argument>
<description>
- Emitted when the [Animation] with key [member current_anim] is modified.
+ If the currently being played animation changes, this signal will notify of such change.
</description>
</signal>
<signal name="animation_finished">
<argument index="0" name="name" type="String">
</argument>
<description>
- Emitted when an animation finishes.
+ Notifies when an animation finished playing.
</description>
</signal>
<signal name="animation_started">
<argument index="0" name="name" type="String">
</argument>
<description>
- Emitted when an animation starts.
+ Notifies when an animation starts playing.
</description>
</signal>
</signals>
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index b90c49b5c0..9d4b45a8d7 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -224,7 +224,10 @@
<constant name="METHOD_CONNECT" value="7" enum="Method">
HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used.
</constant>
- <constant name="METHOD_MAX" value="8" enum="Method">
+ <constant name="METHOD_PATCH" value="8" enum="Method">
+ HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource.
+ </constant>
+ <constant name="METHOD_MAX" value="9" enum="Method">
Marker for end of [code]METHOD_*[/code] enum. Not used.
</constant>
<constant name="STATUS_DISCONNECTED" value="0" enum="Status">
@@ -290,6 +293,9 @@
<constant name="RESPONSE_MULTI_STATUS" value="207" enum="ResponseCode">
HTTP status code [code]207 Multi-Status[/code] (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
</constant>
+ <constant name="RESPONSE_ALREADY_REPORTED" value="208" enum="ResponseCode">
+ HTTP status code [code]208 Already Reported[/code] (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
+ </constant>
<constant name="RESPONSE_IM_USED" value="226" enum="ResponseCode">
HTTP status code [code]226 IM Used[/code] (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
</constant>
@@ -311,9 +317,15 @@
<constant name="RESPONSE_USE_PROXY" value="305" enum="ResponseCode">
HTTP status code [code]305 Use Proxy[/code]. Deprecated. Do not use.
</constant>
+ <constant name="RESPONSE_SWITCH_PROXY" value="306" enum="ResponseCode">
+ HTTP status code [code]306 Switch Proxy[/code]. Deprecated. Do not use.
+ </constant>
<constant name="RESPONSE_TEMPORARY_REDIRECT" value="307" enum="ResponseCode">
HTTP status code [code]307 Temporary Redirect[/code]. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.
</constant>
+ <constant name="RESPONSE_PERMANENT_REDIRECT" value="308" enum="ResponseCode">
+ HTTP status code [code]308 Permanent Redirect[/code]. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
+ </constant>
<constant name="RESPONSE_BAD_REQUEST" value="400" enum="ResponseCode">
HTTP status code [code]400 Bad Request[/code]. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing).
</constant>
@@ -368,6 +380,12 @@
<constant name="RESPONSE_EXPECTATION_FAILED" value="417" enum="ResponseCode">
HTTP status code [code]417 Expectation Failed[/code]. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
</constant>
+ <constant name="RESPONSE_IM_A_TEAPOT" value="418" enum="ResponseCode">
+ HTTP status code [code]418 I'm A Teapot[/code]. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
+ </constant>
+ <constant name="RESPONSE_MISDIRECTED_REQUEST" value="421" enum="ResponseCode">
+ HTTP status code [code]421 Misdirected Request[/code]. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.
+ </constant>
<constant name="RESPONSE_UNPROCESSABLE_ENTITY" value="422" enum="ResponseCode">
HTTP status code [code]422 Unprocessable Entity[/code] (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions.
</constant>
@@ -380,6 +398,18 @@
<constant name="RESPONSE_UPGRADE_REQUIRED" value="426" enum="ResponseCode">
HTTP status code [code]426 Upgrade Required[/code]. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
</constant>
+ <constant name="RESPONSE_PRECONDITION_REQUIRED" value="428" enum="ResponseCode">
+ HTTP status code [code]428 Precondition Required[/code]. The origin server requires the request to be conditional.
+ </constant>
+ <constant name="RESPONSE_TOO_MANY_REQUESTS" value="429" enum="ResponseCode">
+ HTTP status code [code]429 Too Many Requests[/code]. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later.
+ </constant>
+ <constant name="RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE" value="431" enum="ResponseCode">
+ HTTP status code [code]431 Rquest Header Fields Too Large[/code]. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.
+ </constant>
+ <constant name="RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS" value="451" enum="ResponseCode">
+ HTTP status code [code]451 Response Unavailable For Legal Reasons[/code]. The server is denying access to the resource as a consequence of a legal demand.
+ </constant>
<constant name="RESPONSE_INTERNAL_SERVER_ERROR" value="500" enum="ResponseCode">
HTTP status code [code]500 Internal Server Error[/code]. The server encountered an unexpected condition that prevented it from fulfilling the request.
</constant>
@@ -398,11 +428,20 @@
<constant name="RESPONSE_HTTP_VERSION_NOT_SUPPORTED" value="505" enum="ResponseCode">
HTTP status code [code]505 HTTP Version Not Supported[/code]. The server does not support, or refuses to support, the major version of HTTP that was used in the request message.
</constant>
+ <constant name="RESPONSE_VARIANT_ALSO_NEGOTIATES" value="506" enum="ResponseCode">
+ HTTP status code [code]506 Variant Also Negotiates[/code]. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
+ </constant>
<constant name="RESPONSE_INSUFFICIENT_STORAGE" value="507" enum="ResponseCode">
HTTP status code [code]507 Insufficient Storage[/code]. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
</constant>
+ <constant name="RESPONSE_LOOP_DETECTED" value="508" enum="ResponseCode">
+ HTTP status code [code]508 Loop Detected[/code]. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed.
+ </constant>
<constant name="RESPONSE_NOT_EXTENDED" value="510" enum="ResponseCode">
HTTP status code [code]510 Not Extended[/code]. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request.
</constant>
+ <constant name="RESPONSE_NETWORK_AUTH_REQUIRED" value="511" enum="ResponseCode">
+ HTTP status code [code]511 Network Authentication Required[/code]. The client needs to authenticate to gain network access.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index bb48833878..28f04c3eb0 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -4,7 +4,7 @@
Helper class for parsing JSON data.
</brief_description>
<description>
- Helper class for parsing JSON data.
+ Helper class for parsing JSON data. For usage example, see [JSONParseResult].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 77145eff6a..835920818a 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -14,23 +14,23 @@
</methods>
<members>
<member name="error" type="int" setter="set_error" getter="get_error" enum="Error">
- The error type if JSON source was not successfully parsed. See [@GlobalScope]ERR_* constants.
+ The error type if JSON source was not successfully parsed. See [@GlobalScope] ERR_* constants.
</member>
<member name="error_line" type="int" setter="set_error_line" getter="get_error_line">
The line number where the error occurred if JSON source was not successfully parsed.
</member>
<member name="error_string" type="String" setter="set_error_string" getter="get_error_string">
- The error message if JSON source was not successfully parsed. See [@GlobalScope]ERR_* constants.
+ The error message if JSON source was not successfully parsed. See [@GlobalScope] ERR_* constants.
</member>
<member name="result" type="Variant" setter="set_result" getter="get_result">
- A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with braces [code]{}[/code] a [Dictionary] will be returned, if JSON source starts with array braces [code][][/code] an [Array] will be returned.
+ A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with curly braces ([code]{}[/code]) a [Dictionary] will be returned, if JSON source starts with braces ([code][][/code]) an [Array] will be returned.
[i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.[/i]
[codeblock]
p = JSON.parse('["hello", "world", "!"]')
if typeof(p) == TYPE_ARRAY:
- print(p[0]) # prints 'hello'
+ print(p[0]) # prints 'hello'
else:
- print("unexpected results")
+ print("unexpected results")
[/codeblock]
</member>
</members>
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml
index 4bfe964a4d..995cb5b179 100644
--- a/doc/classes/Navigation.xml
+++ b/doc/classes/Navigation.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Navigation" inherits="Spatial" category="Core" version="3.0-beta">
<brief_description>
+ A collection of [code]NavigationMesh[/code] resources and methods used for pathfinding.
</brief_description>
<description>
+ The Navigation node is used for basic or advanced navigation. By default it will automatically collect all child [code]NavigationMesh[/code] resources, but they can also be added on the fly through scripting. It can be used for generating a simple path between two points or it can be used to ensure that a navigation agent is angled perfectly to the terrain it is navigating.
</description>
<tutorials>
</tutorials>
@@ -15,6 +17,7 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
+ Returns the closest navigation point to the point passed.
</description>
</method>
<method name="get_closest_point_normal">
@@ -23,6 +26,7 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
+ Returns the surface normal of the navigation mesh at the point passed. For instance, if the point passed was at a 45 degree slope it would return something like (0.5,0.5,0). This is useful for rotating a navigation agent in accordance with the [code]NavigationMesh[/code].
</description>
</method>
<method name="get_closest_point_owner">
@@ -31,6 +35,7 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
+ Returns the nearest [code]NavigationMeshInstance[/code] to the point passed.
</description>
</method>
<method name="get_closest_point_to_segment">
@@ -43,6 +48,7 @@
<argument index="2" name="use_collision" type="bool" default="false">
</argument>
<description>
+ Returns the nearest point to the line segment passed. The third optional parameter takes collisions into account.
</description>
</method>
<method name="get_simple_path">
@@ -55,6 +61,7 @@
<argument index="2" name="optimize" type="bool" default="true">
</argument>
<description>
+ Returns a path of points as a [code]PoolVector3Array[/code]. If [code]optimize[/code] is false the [code]NavigationMesh[/code] agent properties will be taken into account, otherwise it will return the nearest path and ignore agent radius, height, etc.
</description>
</method>
<method name="navmesh_create">
@@ -67,6 +74,7 @@
<argument index="2" name="owner" type="Object" default="null">
</argument>
<description>
+ Adds a [code]NavigationMesh[/code] to the list of NavigationMesh's in this node. Returns an id. Its position, rotation and scale are associated with the [code]Transform[/code] passed. The [code]Node[/code] (or [code]Object[/code]) that owns this node is an optional parameter.
</description>
</method>
<method name="navmesh_remove">
@@ -75,6 +83,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Removes a [code]NavigationMesh[/code] from the list of NavigationMesh's in this node.
</description>
</method>
<method name="navmesh_set_transform">
@@ -85,11 +94,13 @@
<argument index="1" name="xform" type="Transform">
</argument>
<description>
+ Associates a [code]NavigationMesh[/code]'s id with a [code]Transform[/code]. Its position, rotation and scale are based on the [code]Transform[/code] passed.
</description>
</method>
</methods>
<members>
<member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector">
+ Defines which direction is up. The default defines 0,1,0 as up which is the world up direction. To make this a ceiling use 0,-1,0 to define down as up.
</member>
</members>
<constants>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 78591e2bf8..e56733f102 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Node" inherits="Object" category="Core" version="3.0-beta">
<brief_description>
- Base class for all the [i]scene[/i] elements.
+ Base class for all [i]scene[/i] objects.
</brief_description>
<description>
- Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names.
- Any tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions.
- [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Children nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
- Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, from the children up to the parent nodes.
- It means that when adding a scene to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (and that recursively for the whole scene).
- [b]Processing:[/b] Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is variable. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics.
- Nodes can also process input events. When set, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
+ Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names.
+ A tree of nodes is called a [i]scene[/i]. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. Nodes can also optionally be added to groups. This makes it possible to access a number of nodes from code (an "enemies" group, for example) to perform grouped actions.
+ [b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
+ Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
+ This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
+ [b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
+ Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with [method set_owner]. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
Finally, when a node is freed with [method free] or [method queue_free], it will also free all its children.
- [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling [method rpc] with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) on the receiving peer. To identify which [code]Node[/code] receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
+ [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode ([method set_network_mode]) of the receiving peer. To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers).
</description>
<tutorials>
</tutorials>
@@ -24,7 +24,7 @@
<return type="void">
</return>
<description>
- Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
+ Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing, or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification].
</description>
</method>
@@ -32,7 +32,7 @@
<return type="void">
</return>
<description>
- Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
+ Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification].
</description>
</method>
@@ -42,7 +42,7 @@
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a change to input devices. Propagated through the node tree until a Node consumes it.
+ Called when there is an input event. The input event propagates through the node tree until a node consumes it.
It is only called if input processing is enabled, which is done automatically if this method is overriden, and can be toggled with [method set_process_input].
</description>
</method>
@@ -72,7 +72,7 @@
<return type="void">
</return>
<description>
- Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards.
+ Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
Corresponds to the NOTIFICATION_READY notification in [method Object._notification].
</description>
</method>
@@ -102,8 +102,8 @@
<argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Add a child [code]Node[/code]. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node.
- The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only.
+ Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
+ Setting "legible_unique_name" [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
</description>
</method>
<method name="add_child_below_node">
@@ -116,6 +116,8 @@
<argument index="2" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
+ Adds a child node. The child is placed below the given node in the list of children.
+ Setting "legible_unique_name" [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type.
</description>
</method>
<method name="add_to_group">
@@ -126,14 +128,14 @@
<argument index="1" name="persistent" type="bool" default="false">
</argument>
<description>
- Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A [code]Node[/code] can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see [method is_inside_tree]).
+ Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]).
</description>
</method>
<method name="can_process" qualifiers="const">
<return type="bool">
</return>
<description>
- Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see [method set_pause_mode]). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND?
+ Returns [code]true[/code] if the node can process while the scene tree is paused (see [method set_pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. FIXME: Why FAIL_COND?
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -142,8 +144,8 @@
<argument index="0" name="flags" type="int" default="15">
</argument>
<description>
- Duplicate the node, returning a new [code]Node[/code].
- You can fine-tune the behavior using the [code]flags[/code], which are based on the DUPLICATE_* constants.
+ Duplicates the node, returning a new node.
+ You can fine-tune the behavior using the [code]flags[/code]. See DUPLICATE_* constants.
</description>
</method>
<method name="find_node" qualifiers="const">
@@ -172,35 +174,35 @@
<return type="int">
</return>
<description>
- Returns the amount of child nodes.
+ Returns the number of child nodes.
</description>
</method>
<method name="get_children" qualifiers="const">
<return type="Array">
</return>
<description>
- Returns an array of references ([code]Node[/code]) to the child nodes.
+ Returns an array of references to node's children.
</description>
</method>
<method name="get_filename" qualifiers="const">
<return type="String">
</return>
<description>
- Returns a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]).
+ Returns a filename that may be contained by the node. When a scene is instanced from a file, its topmost node contains the filename from which it was loaded (see [method set_filename]).
</description>
</method>
<method name="get_groups" qualifiers="const">
<return type="Array">
</return>
<description>
- Returns an array listing the groups that the node is part of.
+ Returns an array listing the groups that the node is a member of.
</description>
</method>
<method name="get_index" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the node index, i.e. its position among the siblings of its parent.
+ Returns the node's index, i.e. its position among the siblings of its parent.
</description>
</method>
<method name="get_name" qualifiers="const">
@@ -223,7 +225,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Fetches a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.
+ Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error.
Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[i]Example:[/i] Assume your current node is Character and the following tree:
[codeblock]
@@ -280,7 +282,7 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
- Returns the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail.
+ Returns the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or the function will fail.
</description>
</method>
<method name="get_physics_process_delta_time" qualifiers="const">
@@ -294,14 +296,14 @@
<return type="int">
</return>
<description>
- Returns the order in the node tree branch, i.e. if called by the first child Node, return 0.
+ Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code].
</description>
</method>
<method name="get_process_delta_time" qualifiers="const">
<return type="float">
</return>
<description>
- Returns the time elapsed (in seconds) since the last process callback. This is almost always different each time.
+ Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame.
</description>
</method>
<method name="get_scene_instance_load_placeholder" qualifiers="const">
@@ -314,14 +316,14 @@
<return type="SceneTree">
</return>
<description>
- Returns the [SceneTree] that this node is inside.
+ Returns the [SceneTree] that contains this node.
</description>
</method>
<method name="get_viewport" qualifiers="const">
<return type="Viewport">
</return>
<description>
- Returns the [Viewport] for this node.
+ Returns the node's [Viewport].
</description>
</method>
<method name="has_node" qualifiers="const">
@@ -347,13 +349,14 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
- Returns [code]true[/code] if the "node" argument is a direct or indirect child of the current node, otherwise return [code]false[code].
+ Returns [code]true[/code] if the given node is a direct or indirect child of the current node.
</description>
</method>
<method name="is_displayed_folded" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock.
</description>
</method>
<method name="is_greater_than" qualifiers="const">
@@ -362,7 +365,7 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
- Returns [code]true[/code] if [code]node[/code] occurs later in the scene hierarchy than the current node, otherwise return [code]false[/code].
+ Returns [code]true[/code] if the given node occurs later in the scene hierarchy than the current node.
</description>
</method>
<method name="is_in_group" qualifiers="const">
@@ -371,14 +374,14 @@
<argument index="0" name="group" type="String">
</argument>
<description>
- Returns [code]true[/code] if this Node is in the specified group.
+ Returns [code]true[/code] if this node is in the specified group.
</description>
</method>
<method name="is_inside_tree" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if this Node is currently inside a [SceneTree].
+ Returns [code]true[/code] if this node is currently inside a [SceneTree].
</description>
</method>
<method name="is_network_master" qualifiers="const">
@@ -468,7 +471,7 @@
<argument index="2" name="parent_first" type="bool" default="false">
</argument>
<description>
- Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current [code]Node[/code] first, then on all children. If it is false then the children will get called first.
+ Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the parent_first argument is [code]true[/code] then the method will be called on the current node first, then on all children. If it is [code]false[/code] then the children will be called first.
</description>
</method>
<method name="propagate_notification">
@@ -477,28 +480,28 @@
<argument index="0" name="what" type="int">
</argument>
<description>
- Notify the current node and all its children recursively by calling notification() in all of them.
+ Notifies the current node and all its children recursively by calling notification() on all of them.
</description>
</method>
<method name="queue_free">
<return type="void">
</return>
<description>
- Queues a node for deletion at the end of the current frame. When deleted, all of its children nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to know whether a node will be deleted at the end of the frame.
+ Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to check whether a node will be deleted at the end of the frame.
</description>
</method>
<method name="raise">
<return type="void">
</return>
<description>
- Moves this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
+ Moves this node to the top of the array of nodes of the parent node. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree.
</description>
</method>
<method name="remove_and_skip">
<return type="void">
</return>
<description>
- Removes a node and set all its children as children of the parent node (if exists). All event subscriptions that pass by the removed node will be unsubscribed.
+ Removes a node and sets all its children as children of the parent node (if it exists). All event subscriptions that pass by the removed node will be unsubscribed.
</description>
</method>
<method name="remove_child">
@@ -507,7 +510,7 @@
<argument index="0" name="node" type="Node">
</argument>
<description>
- Removes a child [code]Node[/code]. Node is NOT deleted and will have to be deleted manually.
+ Removes a child node. The node is NOT deleted and must be deleted manually.
</description>
</method>
<method name="remove_from_group">
@@ -527,7 +530,7 @@
<argument index="1" name="keep_data" type="bool" default="false">
</argument>
<description>
- Replaces a node in a scene by a given one. Subscriptions that pass through this node will be lost.
+ Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
</description>
</method>
<method name="request_ready">
@@ -653,6 +656,7 @@
<argument index="0" name="fold" type="bool">
</argument>
<description>
+ Sets the folded state of the node in the Scene dock.
</description>
</method>
<method name="set_filename">
@@ -661,7 +665,7 @@
<argument index="0" name="filename" type="String">
</argument>
<description>
- A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded.
+ A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, its topmost node contains the filename from which it was loaded.
</description>
</method>
<method name="set_name">
@@ -670,7 +674,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Sets the name of the [code]Node[/code]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed.
+ Sets the name of the node. The name must be unique within the parent. Using an existing name will cause the node to be automatically renamed.
</description>
</method>
<method name="set_network_master">
@@ -690,7 +694,7 @@
<argument index="0" name="owner" type="Node">
</argument>
<description>
- Sets the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing.
+ Sets the node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing.
</description>
</method>
<method name="set_physics_process">
@@ -699,7 +703,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables the node's physics (alias fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overriden. Any calls to this before [method _ready] will be ignored.
+ Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, see [OS] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overriden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_physics_process_internal">
@@ -716,7 +720,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overriden. Any calls to this before [method _ready] will be ignored.
+ Enables or disables processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overriden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_input">
@@ -725,7 +729,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]). Enabled automatically if [method _input] is overriden. Any calls to this before [method _ready] will be ignored.
+ Enables or disables input processing. This is not required for GUI controls! Enabled automatically if [method _input] is overriden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_internal">
@@ -742,7 +746,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). Enabled automatically if [method _unhandled_input] is overriden. Any calls to this before [method _ready] will be ignored.
+ Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a [Control]). Enabled automatically if [method _unhandled_input] is overriden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_process_unhandled_key_input">
@@ -751,7 +755,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables unhandled key input processing for node. Enabled automatically if [method _unhandled_key_input] is overriden. Any calls to this before [method _ready] will be ignored.
+ Enables unhandled key input processing. Enabled automatically if [method _unhandled_key_input] is overriden. Any calls to this before [method _ready] will be ignored.
</description>
</method>
<method name="set_scene_instance_load_placeholder">
@@ -775,12 +779,12 @@
</signal>
<signal name="tree_entered">
<description>
- Emitted when Node enters the tree.
+ Emitted when the node enters the tree.
</description>
</signal>
<signal name="tree_exited">
<description>
- Emitted when Node exits the tree.
+ Emitted when the node exits the tree.
</description>
</signal>
</signals>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 42ed57e4af..13cf16d2ee 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -379,24 +379,24 @@
Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
- <method name="set_item_shortcut">
+ <method name="set_item_multistate">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="shortcut" type="ShortCut">
- </argument>
- <argument index="2" name="global" type="bool" default="false">
+ <argument index="1" name="state" type="int">
</argument>
<description>
</description>
</method>
- <method name="set_item_statable">
+ <method name="set_item_shortcut">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="state" type="int">
+ <argument index="1" name="shortcut" type="ShortCut">
+ </argument>
+ <argument index="2" name="global" type="bool" default="false">
</argument>
<description>
</description>
@@ -441,7 +441,7 @@
<description>
</description>
</method>
- <method name="toggle_item_statable">
+ <method name="toggle_item_multistate">
<return type="void">
</return>
<argument index="0" name="idx" type="int">