summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GDScript.xml15
-rw-r--r--doc/classes/Animation.xml6
-rw-r--r--doc/classes/AnimationPlayer.xml5
-rw-r--r--doc/classes/AudioBusLayout.xml2
-rw-r--r--doc/classes/AudioEffectLimiter.xml2
-rw-r--r--doc/classes/AudioServer.xml6
-rw-r--r--doc/classes/Camera.xml6
-rw-r--r--doc/classes/CollisionPolygon.xml2
-rw-r--r--doc/classes/CollisionPolygon2D.xml2
-rw-r--r--doc/classes/Control.xml8
-rw-r--r--doc/classes/Dictionary.xml3
-rw-r--r--doc/classes/EditorSpatialGizmoPlugin.xml2
-rw-r--r--doc/classes/Engine.xml8
-rw-r--r--doc/classes/Expression.xml2
-rw-r--r--doc/classes/File.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/MultiMesh.xml37
-rw-r--r--doc/classes/Node.xml9
-rw-r--r--doc/classes/OS.xml17
-rw-r--r--doc/classes/OccluderPolygon2D.xml2
-rw-r--r--doc/classes/OptionButton.xml15
-rw-r--r--doc/classes/Physics2DServer.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState.xml2
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml2
-rw-r--r--doc/classes/PhysicsServer.xml2
-rw-r--r--doc/classes/Polygon2D.xml2
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/ProjectSettings.xml10
-rw-r--r--doc/classes/RandomNumberGenerator.xml3
-rw-r--r--doc/classes/Resource.xml10
-rw-r--r--doc/classes/ResourcePreloader.xml13
-rw-r--r--doc/classes/RigidBody.xml2
-rw-r--r--doc/classes/RigidBody2D.xml2
-rw-r--r--doc/classes/Skeleton2D.xml6
-rw-r--r--doc/classes/StyleBox.xml13
-rw-r--r--doc/classes/StyleBoxTexture.xml21
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/Tabs.xml2
-rw-r--r--doc/classes/TileMap.xml4
-rw-r--r--doc/classes/UndoRedo.xml22
-rw-r--r--doc/classes/Viewport.xml6
-rw-r--r--doc/classes/int.xml16
44 files changed, 234 insertions, 67 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index 072eec800f..7b4b3e43ba 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -811,7 +811,7 @@
<description>
Random range, any floating point value between [code]from[/code] and [code]to[/code].
[codeblock]
- prints(rand_range(0, 1), rand_range(0, 1)) # prints 0.135591 0.405263
+ prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263
[/codeblock]
</description>
</method>
@@ -828,9 +828,9 @@
<return type="float">
</return>
<description>
- Returns a random floating point value between 0 and 1.
+ Returns a random floating point value on the interval [code][0, 1][/code].
[codeblock]
- randf() # returns 0.375671
+ randf() # returns e.g. 0.375671
[/codeblock]
</description>
</method>
@@ -838,11 +838,12 @@
<return type="int">
</return>
<description>
- Returns a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1).
+ Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1).
[codeblock]
- randi() % 20 # returns random number between 0 and 19
- randi() % 100 # returns random number between 0 and 99
- randi() % 100 + 1 # returns random number between 1 and 100
+ randi() # returns random integer between 0 and 2^32 - 1
+ randi() % 20 # returns random integer between 0 and 19
+ randi() % 100 # returns random integer between 0 and 99
+ randi() % 100 + 1 # returns random integer between 1 and 100
[/codeblock]
</description>
</method>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index a7cae709a4..eaaa64d53d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -648,6 +648,12 @@
The animation step value.
</member>
</members>
+ <signals>
+ <signal name="tracks_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="TYPE_VALUE" value="0" enum="TrackType">
Value tracks set values in node properties, but only those which can be Interpolated.
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 499da4b8a3..9d68102952 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -145,6 +145,7 @@
</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.
+ If the animation has been paused by [code]stop(true)[/code] it will be resumed. Calling [code]play()[/code] without arguments will also resume the animation.
</description>
</method>
<method name="play_backwards">
@@ -156,6 +157,7 @@
</argument>
<description>
Play the animation with key [code]name[/code] in reverse.
+ If the animation has been paused by [code]stop(true)[/code] it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards.
</description>
</method>
<method name="queue">
@@ -217,7 +219,8 @@
<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].
+ Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
+ If [code]reset[/code] is [code]false[/code], then calling [code]play()[/code] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [code]play_backwards()[/code] method.
</description>
</method>
</methods>
diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml
index c43da3e233..f122906167 100644
--- a/doc/classes/AudioBusLayout.xml
+++ b/doc/classes/AudioBusLayout.xml
@@ -4,7 +4,7 @@
Stores information about the audiobusses.
</brief_description>
<description>
- Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See [AudioServer] for usage.
+ Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml
index 9e791f02d7..5c5c55d17b 100644
--- a/doc/classes/AudioEffectLimiter.xml
+++ b/doc/classes/AudioEffectLimiter.xml
@@ -4,7 +4,7 @@
Adds a soft clip Limiter audio effect to an Audio bus.
</brief_description>
<description>
- A limiter is similar to a compressor, but it’s less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping.
+ A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping.
Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded.
</description>
<tutorials>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index 96f02137cf..eb3c7cb3b4 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -58,7 +58,7 @@
<return type="AudioBusLayout">
</return>
<description>
- Generates an [AudioBusLayout] using the available busses and effects.
+ Generates an [AudioBusLayout] using the available buses and effects.
</description>
</method>
<method name="get_bus_channels" qualifiers="const">
@@ -74,7 +74,7 @@
<return type="int">
</return>
<description>
- Returns the number of available busses.
+ Returns the number of available buses.
</description>
</method>
<method name="get_bus_effect">
@@ -274,7 +274,7 @@
<argument index="0" name="amount" type="int">
</argument>
<description>
- Adds and removes busses to make the number of busses match [code]amount[/code].
+ Adds and removes buses to make the number of buses match [code]amount[/code].
</description>
</method>
<method name="set_bus_effect_enabled">
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index f4b1bc1519..e56fb63dc5 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -35,6 +35,12 @@
<description>
</description>
</method>
+ <method name="get_frustum" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_position_behind" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml
index 28e9ba4217..0b4f07578e 100644
--- a/doc/classes/CollisionPolygon.xml
+++ b/doc/classes/CollisionPolygon.xml
@@ -20,7 +20,7 @@
If true, no collision will be produced.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- Array of vertices which define the polygon.
+ Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml
index 3dd87a4120..e754a2f2d1 100644
--- a/doc/classes/CollisionPolygon2D.xml
+++ b/doc/classes/CollisionPolygon2D.xml
@@ -25,7 +25,7 @@
<member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin">
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- The polygon's list of vertices. The final point will be connected to the first.
+ The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index d27839e0a6..0152cca957 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -9,7 +9,7 @@
[b]User Interface nodes and input[/b]
Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus.
- Set [member mouse_filter] to MOUSE_FILTER_IGNORE to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
+ Set [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
[Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
@@ -658,7 +658,7 @@
Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
</member>
<member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip">
- Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments.
+ Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE].
</member>
<member name="margin_bottom" type="float" setter="set_margin" getter="get_margin">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
@@ -941,10 +941,10 @@
The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis.
</constant>
<constant name="GROW_DIRECTION_END" value="1" enum="GrowDirection">
- The control wil grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
+ The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis.
</constant>
<constant name="GROW_DIRECTION_BOTH" value="2" enum="GrowDirection">
- The control wil grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
+ The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size.
</constant>
<constant name="ANCHOR_BEGIN" value="0" enum="Anchor">
Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset].
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index a9e2a38dcf..9c78853cfe 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference.
+ Erasing elements while iterating over them [b]is not supported[/b].
</description>
<tutorials>
</tutorials>
@@ -38,7 +39,7 @@
<argument index="0" name="key" type="Variant">
</argument>
<description>
- Erase a dictionary key/value pair by key.
+ Erase a dictionary key/value pair by key. Do not erase elements while iterating over the dictionary.
</description>
</method>
<method name="get">
diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml
index a62b23ead8..a6c0413c19 100644
--- a/doc/classes/EditorSpatialGizmoPlugin.xml
+++ b/doc/classes/EditorSpatialGizmoPlugin.xml
@@ -134,7 +134,7 @@
<return type="String">
</return>
<description>
- Override this method to provide the name that will appear in teh gizmo visibility menu.
+ Override this method to provide the name that will appear in the gizmo visibility menu.
</description>
</method>
<method name="has_gizmo" qualifiers="virtual">
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index f921b76b21..b8808b8b53 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -90,9 +90,17 @@
"major" - Holds the major version number as an int
"minor" - Holds the minor version number as an int
"patch" - Holds the patch version number as an int
+ "hex" - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below)
"status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
"build" - Holds the build name (e.g. "custom-build") as a String
"string" - major + minor + patch + status + build in a single String
+ The "hex" value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
+ [codeblock]
+ if Engine.get_version_info().hex >= 0x030200:
+ # do things specific to version 3.2 or later
+ else:
+ # do things specific to versions before 3.2
+ [/codeblock]
</description>
</method>
<method name="has_singleton" qualifiers="const">
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index b0a21d7f82..78623b359e 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -39,6 +39,7 @@
</argument>
<description>
Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed].
+ If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order.
</description>
</method>
<method name="get_error_text" qualifiers="const">
@@ -64,6 +65,7 @@
</argument>
<description>
Parses the expression and returns a [enum @GlobalScope.Error].
+ You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed.
</description>
</method>
</methods>
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 6462176c73..c9a8f18116 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -38,7 +38,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the file cursor has reached the end of the file.
+ Returns [code]true[/code] if the file cursor has read past the end of the file. Note that this function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic.
</description>
</method>
<method name="file_exists" qualifiers="const">
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 8868dd778d..f165027d44 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -227,7 +227,7 @@
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the image’s format. See [code]FORMAT_*[/code] constants.
+ Returns the image's format. See [code]FORMAT_*[/code] constants.
</description>
</method>
<method name="get_height" qualifiers="const">
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 90547b7c2f..36aa3c8b55 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead.
- Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events).
+ Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 1908fdd684..565e19c229 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -4,8 +4,8 @@
Provides high performance mesh instancing.
</brief_description>
<description>
- MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory.
- For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.
+ MultiMesh provides low level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow because each object is submitted to the GPU to be drawn individually.
+ MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead.
As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
@@ -36,6 +36,7 @@
<argument index="0" name="instance" type="int">
</argument>
<description>
+ Return the custom data that has been set for a specific instance.
</description>
</method>
<method name="get_instance_transform" qualifiers="const">
@@ -47,6 +48,14 @@
Return the transform of a specific instance.
</description>
</method>
+ <method name="get_instance_transform_2d" qualifiers="const">
+ <return type="Transform2D">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_instance_color">
<return type="void">
</return>
@@ -66,6 +75,7 @@
<argument index="1" name="custom_data" type="Color">
</argument>
<description>
+ Set custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers.
</description>
</method>
<method name="set_instance_transform">
@@ -79,35 +89,58 @@
Set the transform for a specific instance.
</description>
</method>
+ <method name="set_instance_transform_2d">
+ <return type="void">
+ </return>
+ <argument index="0" name="instance" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat">
+ Format of colors in color array that gets passed to shader.
</member>
<member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat">
+ Format of custom data in custom data array that gets passed to shader.
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count">
+ Number of instances that will get drawn.
</member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
+ Mesh to be drawn.
</member>
<member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat">
+ Format of transform used to transform mesh, either 2D or 3D.
</member>
</members>
<constants>
<constant name="TRANSFORM_2D" value="0" enum="TransformFormat">
+ Use this when using 2D transforms.
</constant>
<constant name="TRANSFORM_3D" value="1" enum="TransformFormat">
+ Use this when using 3D transforms.
</constant>
<constant name="COLOR_NONE" value="0" enum="ColorFormat">
+ Use when you are not using per-instance [Color]s.
</constant>
<constant name="COLOR_8BIT" value="1" enum="ColorFormat">
+ Compress [Color] data into 8 bits when passing to shader. This uses less memory and can be faster, but the [Color] loses precision.
</constant>
<constant name="COLOR_FLOAT" value="2" enum="ColorFormat">
+ The [Color] passed into [method set_instance_color] will use 4 floats. Use this for highest precision [Color].
</constant>
<constant name="CUSTOM_DATA_NONE" value="0" enum="CustomDataFormat">
+ Use when you are not using per-instance custom data.
</constant>
<constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat">
+ Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision.
</constant>
<constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat">
+ The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision.
</constant>
</constants>
</class>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 02a8ee8e75..e872fee1cc 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -269,6 +269,15 @@
<description>
</description>
</method>
+ <method name="get_node_or_null" qualifiers="const">
+ <return type="Node">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <description>
+ Similar to [method get_node], but does not raise an error when [code]path[/code] does not point to a valid [code]Node[/code].
+ </description>
+ </method>
<method name="get_parent" qualifiers="const">
<return type="Node">
</return>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index f6ad71b6e2..5e71ed094e 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -159,6 +159,13 @@
<description>
</description>
</method>
+ <method name="get_current_video_driver" qualifiers="const">
+ <return type="int" enum="OS.VideoDriver">
+ </return>
+ <description>
+ Returns the currently used video driver, using one of the values from [enum OS.VideoDriver].
+ </description>
+ </method>
<method name="get_date" qualifiers="const">
<return type="Dictionary">
</return>
@@ -459,14 +466,16 @@
<return type="int">
</return>
<description>
+ Returns the number of video drivers supported on the current platform.
</description>
</method>
<method name="get_video_driver_name" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="driver" type="int">
+ <argument index="0" name="driver" type="int" enum="OS.VideoDriver">
</argument>
<description>
+ Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum OS.VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index.
</description>
</method>
<method name="get_virtual_keyboard_height">
@@ -806,6 +815,12 @@
</member>
</members>
<constants>
+ <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver">
+ The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web.
+ </constant>
+ <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver">
+ The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web.
+ </constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
</constant>
diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml
index 58ad268f05..b8adc4c96f 100644
--- a/doc/classes/OccluderPolygon2D.xml
+++ b/doc/classes/OccluderPolygon2D.xml
@@ -20,7 +20,7 @@
Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- A [Vector2] array with the index for polygon's vertices positions.
+ A [Vector2] array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference.
</member>
</members>
<constants>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index c58c932b61..0f795b4bf8 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -71,7 +71,16 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Return the ID of the item at index "idx".
+ Return the ID of the item at index [code]idx[/code].
+ </description>
+ </method>
+ <method name="get_item_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Return the index of the item with the given [code]id[/code].
</description>
</method>
<method name="get_item_metadata" qualifiers="const">
@@ -198,14 +207,14 @@
<argument index="0" name="ID" type="int">
</argument>
<description>
- This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument.
</description>
</signal>
<signal name="item_selected">
<argument index="0" name="ID" type="int">
</argument>
<description>
- This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index).
+ This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument.
</description>
</signal>
</signals>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index fe1465260f..341457a2b3 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -1112,6 +1112,8 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="6" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter">
+ </constant>
<constant name="SHAPE_LINE" value="0" enum="ShapeType">
This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml
index 2b4125aef4..cf718f06b2 100644
--- a/doc/classes/PhysicsDirectBodyState.xml
+++ b/doc/classes/PhysicsDirectBodyState.xml
@@ -57,7 +57,7 @@
<argument index="1" name="j" type="Vector3">
</argument>
<description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index c4dc103b72..118010b3cf 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -21,7 +21,7 @@
</argument>
<description>
Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
- If the shape can not move, the returned array will be [code][0, 0][/code].
+ If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics.
</description>
</method>
<method name="collide_shape">
diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml
index e3ed43e7bc..b797e6ecf7 100644
--- a/doc/classes/PhysicsServer.xml
+++ b/doc/classes/PhysicsServer.xml
@@ -1595,6 +1595,8 @@
<constant name="SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS" value="7" enum="SpaceParameter">
Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision.
</constant>
+ <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="8" enum="SpaceParameter">
+ </constant>
<constant name="BODY_AXIS_LINEAR_X" value="1" enum="BodyAxis">
</constant>
<constant name="BODY_AXIS_LINEAR_Y" value="2" enum="BodyAxis">
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 9803837e5d..31ee0a9490 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -99,7 +99,7 @@
The offset applied to each vertex.
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
- The polygon's list of vertices. The final point will be connected to the first.
+ The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the [PoolVector2Array] rather than a reference.
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons">
</member>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index fe7dbe52b0..ea696e624a 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -378,7 +378,7 @@
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Mark the item at index "idx" as a separator, which means that it would be displayed as a mere line.
+ Mark the item at index "idx" as a separator, which means that it would be displayed as a line.
</description>
</method>
<method name="set_item_checked">
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 6b53615535..1782edf25d 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -319,9 +319,6 @@
<member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="">
Hotspot for the custom mouse cursor image.
</member>
- <member name="display/window/allow_per_pixel_transparency" type="bool" setter="" getter="">
- Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
- </member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="">
Allow HiDPI display on Windows and OSX. On Desktop Linux, this can't be enabled or disabled.
</member>
@@ -331,9 +328,12 @@
<member name="display/window/handheld/orientation" type="String" setter="" getter="">
Default orientation for cell phone or tablet.
</member>
- <member name="display/window/per_pixel_transparency" type="bool" setter="" getter="">
+ <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="">
+ Allow per pixel transparency in a Desktop window. This affects performance if not needed, so leave it off.
+ </member>
+ <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="">
</member>
- <member name="display/window/per_pixel_transparency_splash" type="bool" setter="" getter="">
+ <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter="">
</member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="">
Force the window to be always on top.
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index 5badfba923..fff13402f1 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -43,7 +43,7 @@
<argument index="1" name="to" type="int">
</argument>
<description>
- Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code](inclusive).
+ Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive).
</description>
</method>
<method name="randomize">
@@ -56,6 +56,7 @@
</methods>
<members>
<member name="seed" type="int" setter="set_seed" getter="get_seed">
+ The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.
</member>
</members>
<constants>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index fc42635ce2..4369f77abd 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,9 +4,10 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html</link>
</tutorials>
<demos>
</demos>
@@ -23,6 +24,7 @@
<argument index="0" name="subresources" type="bool" default="false">
</argument>
<description>
+ Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing [code]true[/code] to the [code]subresources[/code] argument.
</description>
</method>
<method name="get_local_scene" qualifiers="const">
@@ -35,7 +37,7 @@
<return type="RID">
</return>
<description>
- Return the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
+ Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID.
</description>
</method>
<method name="setup_local_to_scene">
@@ -50,7 +52,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Set the path of the resource. Differs from set_path(), if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing.
+ Sets the path of the resource. Differs from [code]set_path()[/code], if another [code]Resource[/code] exists with "path" it over-takes it, instead of failing.
</description>
</method>
</methods>
@@ -58,8 +60,10 @@
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene">
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name">
+ The name of the resource. This is an optional identifier.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path">
+ The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.
</member>
</members>
<signals>
diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml
index 002bcd891a..18d6e04d8e 100644
--- a/doc/classes/ResourcePreloader.xml
+++ b/doc/classes/ResourcePreloader.xml
@@ -4,7 +4,7 @@
Resource Preloader Node.
</brief_description>
<description>
- Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here.
+ This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader.
</description>
<tutorials>
</tutorials>
@@ -19,6 +19,7 @@
<argument index="1" name="resource" type="Resource">
</argument>
<description>
+ Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
</description>
</method>
<method name="get_resource" qualifiers="const">
@@ -27,14 +28,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return the resource given a text-id.
+ Returns the resource associated to [code]name[/code].
</description>
</method>
<method name="get_resource_list" qualifiers="const">
<return type="PoolStringArray">
</return>
<description>
- Return the list of resources inside the preloader.
+ Returns the list of resources inside the preloader.
</description>
</method>
<method name="has_resource" qualifiers="const">
@@ -43,7 +44,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Return true if the preloader has a given resource.
+ Returns true if the preloader contains a resource associated to [code]name[/code].
</description>
</method>
<method name="remove_resource">
@@ -52,7 +53,7 @@
<argument index="0" name="name" type="String">
</argument>
<description>
- Remove a resource from the preloader by text id.
+ Removes the resource associated to [code]name[/code] from the preloader.
</description>
</method>
<method name="rename_resource">
@@ -63,7 +64,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
- Rename a resource inside the preloader, from a text-id to a new text-id.
+ Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml
index 3f28156915..3c253c3bea 100644
--- a/doc/classes/RigidBody.xml
+++ b/doc/classes/RigidBody.xml
@@ -72,7 +72,7 @@
<argument index="1" name="impulse" type="Vector3">
</argument>
<description>
- Applies a positioned impulse which will be affected by the body mass and shape. This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the object's origin.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 68e78ba5d4..9b74dbedb4 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -69,7 +69,7 @@
<argument index="1" name="impulse" type="Vector2">
</argument>
<description>
- Applies a positioned impulse to the body (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied instantaneously. Both the impulse and the offset from the body origin are in global coordinates.
+ Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<method name="apply_torque_impulse">
diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml
index 712b9ca2a5..d40b8a2fc7 100644
--- a/doc/classes/Skeleton2D.xml
+++ b/doc/classes/Skeleton2D.xml
@@ -30,6 +30,12 @@
</description>
</method>
</methods>
+ <signals>
+ <signal name="bone_setup_changed">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index be21abe275..d8cc56cc8c 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -39,7 +39,8 @@
<argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
- Return the offset of margin "margin" (see MARGIN_* enum).
+ Return the content margin offset for the specified margin
+ Positive values reduce size inwards, unlike [Control]'s margin values.
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
@@ -70,12 +71,22 @@
</methods>
<members>
<member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin">
+ The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.
+ If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead.
+ It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button.
+ [method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.
</member>
<member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin">
+ The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
<member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin">
+ The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
<member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin">
+ The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.
+ Refer to [member content_margin_bottom] for extra considerations.
</member>
</members>
<constants>
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index d8c378fde2..806ed1941a 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -42,28 +42,49 @@
<member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled">
</member>
<member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the left margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the right margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size">
+ Expands the top margin of this style box when drawing, causing it be drawn larger than requested.
</member>
<member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the bottom margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative.
</member>
<member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the left margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the left border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative.
</member>
<member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the right margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the right border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative.
</member>
<member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size">
+ Increases the top margin of the 3x3 texture box.
+ A higher value means more of the source texture is considered to be part of the top border of the 3x3 box.
+ This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative.
</member>
<member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate">
+ Modulates the color of the texture when this style box is drawn.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
+ The normal map to use when drawing this style box.
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ Species a sub region of the texture to use.
+ This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region.
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ The texture to use when drawing this style box.
</member>
</members>
<signals>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index fd158587e5..587b0190fe 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -78,7 +78,7 @@
<method name="add_triangle_fan">
<return type="void">
</return>
- <argument index="0" name="vertexes" type="PoolVector3Array">
+ <argument index="0" name="vertices" type="PoolVector3Array">
</argument>
<argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )">
</argument>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 04285b62df..3c5bc25def 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -216,6 +216,8 @@
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
</theme_item>
+ <theme_item name="tab_disabled" type="StyleBox">
+ </theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
<theme_item name="top_margin" type="int">
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index de57250d8b..b22d9d73da 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -279,6 +279,8 @@
</theme_item>
<theme_item name="tab_bg" type="StyleBox">
</theme_item>
+ <theme_item name="tab_disabled" type="StyleBox">
+ </theme_item>
<theme_item name="tab_fg" type="StyleBox">
</theme_item>
<theme_item name="top_margin" type="int">
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 4849d768f5..fe3b2118a3 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -34,7 +34,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the tile index of the given cell.
+ Returns the tile index of the given cell. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
<method name="get_cell_autotile_coord" qualifiers="const">
@@ -53,7 +53,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Returns the tile index of the cell given by a Vector2.
+ Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [constant INVALID_CELL].
</description>
</method>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 93806ac326..8d98bcfdb0 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -8,22 +8,22 @@
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
Here's an example on how to add an action to Godot editor's own 'undoredo':
[codeblock]
- var undoredo = get_undo_redo() # method of EditorPlugin
+ var undo_redo = get_undo_redo() # Method of EditorPlugin.
func do_something():
- pass # put your code here
+ pass # Put your code here.
func undo_something():
- pass # put here the code that reverts what's done by "do_something()"
+ pass # Put here the code that reverts what's done by "do_something()".
func _on_MyButton_pressed():
var node = get_node("MyNode2D")
- undoredo.create_action("Move the node")
- undoredo.add_do_method(self, "do_something")
- undoredo.add_undo_method(self, "undo_something")
- undoredo.add_do_property(node, "position", Vector2(100,100))
- undoredo.add_undo_property(node, "position", node.position)
- undoredo.commit_action()
+ undo_redo.create_action("Move the node")
+ undo_redo.add_do_method(self, "do_something")
+ undo_redo.add_undo_method(self, "undo_something")
+ undo_redo.add_do_property(node, "position", Vector2(100,100))
+ undo_redo.add_undo_property(node, "position", node.position)
+ undo_redo.commit_action()
[/codeblock]
[method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes.
If you don't need to register a method you can leave [method add_do_method] and [method add_undo_method] out, and so it goes for properties. You can register more than one method/property.
@@ -125,6 +125,7 @@
</argument>
<description>
Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action].
+ The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details.
</description>
</method>
<method name="get_current_action_name" qualifiers="const">
@@ -159,10 +160,13 @@
</methods>
<constants>
<constant name="MERGE_DISABLE" value="0" enum="MergeMode">
+ Makes [code]do[/code]/[code]undo[/code] operations stay in separate actions.
</constant>
<constant name="MERGE_ENDS" value="1" enum="MergeMode">
+ Makes so that the action's [code]do[/code] operation is from the first action created and the [code]undo[/code] operation is from the last subsequent action with the same name.
</constant>
<constant name="MERGE_ALL" value="2" enum="MergeMode">
+ Makes subsequent actions with the same name be merged into one.
</constant>
</constants>
</class>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 880dc43c90..09891ca889 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -80,7 +80,11 @@
<return type="ViewportTexture">
</return>
<description>
- Returns the viewport's texture.
+ Returns the viewport's texture. Note that due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example:
+ [codeblock]
+ var img = get_viewport().get_texture().get_data()
+ img.flip_y()
+ [/codeblock]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 4855fa2848..7175b9fd88 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -4,7 +4,21 @@
Integer built-in type.
</brief_description>
<description>
- Integer built-in type.
+ Signed 64-bit integer type.
+ It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around.
+ [code]int[/code] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint.
+ [codeblock]
+ var my_variant = 0 # int, value 0
+ my_variant += 4.2 # float, value 4.2
+ var my_int: int = 1 # int, value 1
+ my_int = 4.2 # int, value 4, the right value is implicitly cast to int
+ my_int = int("6.7") # int, value 6, the String is explicitly cast with [method int]
+
+ var max_int = 9223372036854775807
+ print(max_int) # 9223372036854775807, OK
+ max_int += 1
+ print(max_int) # -9223372036854775808, we overflowed and wrapped around
+ [/codeblock]
</description>
<tutorials>
</tutorials>