summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GDScript.xml11
-rw-r--r--doc/classes/@GlobalScope.xml60
-rw-r--r--doc/classes/ARVRController.xml5
-rw-r--r--doc/classes/ARVRServer.xml11
-rw-r--r--doc/classes/AStar.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml1
-rw-r--r--doc/classes/BakedLightmap.xml28
-rw-r--r--doc/classes/Basis.xml2
-rw-r--r--doc/classes/Camera.xml3
-rw-r--r--doc/classes/Color.xml3
-rw-r--r--doc/classes/ColorPickerButton.xml4
-rw-r--r--doc/classes/Control.xml4
-rw-r--r--doc/classes/EditorInterface.xml14
-rw-r--r--doc/classes/EditorPlugin.xml4
-rw-r--r--doc/classes/Image.xml17
-rw-r--r--doc/classes/Input.xml39
-rw-r--r--doc/classes/InputEvent.xml15
-rw-r--r--doc/classes/MenuButton.xml10
-rw-r--r--doc/classes/Mutex.xml6
-rw-r--r--doc/classes/Node2D.xml6
-rw-r--r--doc/classes/OptionButton.xml7
-rw-r--r--doc/classes/Physics2DDirectSpaceState.xml67
-rw-r--r--doc/classes/Physics2DServer.xml12
-rw-r--r--doc/classes/PhysicsDirectSpaceState.xml28
-rw-r--r--doc/classes/SceneTree.xml16
-rw-r--r--doc/classes/ScriptEditor.xml16
-rw-r--r--doc/classes/Semaphore.xml6
-rw-r--r--doc/classes/Spatial.xml76
-rw-r--r--doc/classes/StreamPeer.xml2
-rw-r--r--doc/classes/TextEdit.xml19
-rw-r--r--doc/classes/TileMap.xml5
-rw-r--r--doc/classes/TileSet.xml6
-rw-r--r--doc/classes/Timer.xml10
-rw-r--r--doc/classes/Transform2D.xml30
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/Vector2.xml4
-rw-r--r--doc/classes/Vector3.xml4
-rw-r--r--doc/classes/VisualServer.xml12
-rw-r--r--doc/tools/makerst.py45
39 files changed, 446 insertions, 166 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml
index bee2cdf387..c98a80ca8c 100644
--- a/doc/classes/@GDScript.xml
+++ b/doc/classes/@GDScript.xml
@@ -41,10 +41,12 @@
<argument index="1" name="alpha" type="float">
</argument>
<description>
- Returns color [code]name[/code] with [code]alpha[/code] ranging from 0 to 1. Note: [code]name[/code] is defined in color_names.inc.
+ Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
[codeblock]
- red = ColorN('red')
+ red = ColorN("red", 1)
[/codeblock]
+ Supported color names:
+ "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflower", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "webgray", "green", "webgreen", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrod", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "webmaroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navyblue", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "webpurple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen".
</description>
</method>
<method name="abs">
@@ -535,7 +537,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Loads a resource from the filesystem located at 'path'. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
+ Loads a resource from the filesystem located at [code]path[/code]. Note: resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[codeblock]
# load a scene called main located in the root of the project directory
var main = load("res://main.tscn")
@@ -866,9 +868,10 @@
<argument index="0" name="s" type="float">
</argument>
<description>
- Returns sign of [code]s[/code] -1 or 1.
+ Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0.
[codeblock]
sign(-6) # returns -1
+ sign(0) # returns 0
sign(6) # returns 1
[/codeblock]
</description>
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index de5dc18702..6e8b760966 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -93,6 +93,14 @@
<constant name="MARGIN_BOTTOM" value="3" enum="Margin">
Bottom margin, used usually for [Control] or [StyleBox] derived classes.
</constant>
+ <constant name="CORNER_TOP_LEFT" value="0" enum="Corner">
+ </constant>
+ <constant name="CORNER_TOP_RIGHT" value="1" enum="Corner">
+ </constant>
+ <constant name="CORNER_BOTTOM_RIGHT" value="2" enum="Corner">
+ </constant>
+ <constant name="CORNER_BOTTOM_LEFT" value="3" enum="Corner">
+ </constant>
<constant name="VERTICAL" value="1" enum="Orientation">
General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc.
</constant>
@@ -1385,5 +1393,57 @@
<constant name="TYPE_MAX" value="27" enum="Variant.Type">
Marker for end of type constants.
</constant>
+ <constant name="OP_EQUAL" value="0" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_NOT_EQUAL" value="1" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_LESS" value="2" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_LESS_EQUAL" value="3" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_GREATER" value="4" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_GREATER_EQUAL" value="5" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_ADD" value="6" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_SUBTRACT" value="7" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_MULTIPLY" value="8" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_DIVIDE" value="9" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_NEGATE" value="10" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_POSITIVE" value="11" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_MODULE" value="12" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_STRING_CONCAT" value="13" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_SHIFT_LEFT" value="14" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_SHIFT_RIGHT" value="15" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_BIT_AND" value="16" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_BIT_OR" value="17" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_AND" value="20" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_OR" value="21" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_XOR" value="22" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_NOT" value="23" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_IN" value="24" enum="Variant.Operator">
+ </constant>
+ <constant name="OP_MAX" value="25" enum="Variant.Operator">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index 47a9341643..2adc073ebe 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -62,7 +62,10 @@
</methods>
<members>
<member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id">
- The controller's id. The first controller that the [ARVRServer] detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off, it's slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off.
+ The controller's id.
+ A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller.
+ For any other controller that the [ARVRServer] detects we continue with controller id 3.
+ When a controller is turned off, its slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off.
</member>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble">
The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly.
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 17202c8c2c..7f9eedce50 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -14,7 +14,7 @@
<method name="center_on_hmd">
<return type="void">
</return>
- <argument index="0" name="ignore_tilt" type="bool">
+ <argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode">
</argument>
<argument index="1" name="keep_height" type="bool">
</argument>
@@ -154,5 +154,14 @@
<constant name="TRACKER_ANY" value="255" enum="TrackerType">
Used internally to select all trackers.
</constant>
+ <constant name="RESET_FULL_ROTATION" value="0" enum="RotationMode">
+ Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world.
+ </constant>
+ <constant name="RESET_BUT_KEEP_TILT" value="1" enum="RotationMode">
+ Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset.
+ </constant>
+ <constant name="DONT_RESET_ROTATION" value="2" enum="RotationMode">
+ Does not reset the orientation of the HMD, only the position of the player gets centered.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index e0e3261edf..08ac12736a 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -171,7 +171,7 @@
<method name="get_point_connections">
<return type="PoolIntArray">
</return>
- <argument index="0" name="arg0" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
Returns an array with the ids of the points that form the connect with the given point.
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 570f5e9741..a244788020 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -133,6 +133,7 @@
<return type="float">
</return>
<description>
+ Returns the speed scaling ratio of the current animation channel. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed.
</description>
</method>
<method name="has_animation" qualifiers="const">
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
index b351aeac05..b23b608589 100644
--- a/doc/classes/BakedLightmap.xml
+++ b/doc/classes/BakedLightmap.xml
@@ -27,38 +27,28 @@
</method>
</methods>
<members>
- <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode">
+ <member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size">
</member>
- <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality">
+ <member name="bake_energy" type="float" setter="set_energy" getter="get_energy">
+ </member>
+ <member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents">
</member>
- <member name="bake_subdiv" type="int" setter="set_bake_subdiv" getter="get_bake_subdiv" enum="BakedLightmap.Subdiv">
+ <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr">
</member>
- <member name="capture_subdiv" type="int" setter="set_capture_subdiv" getter="get_capture_subdiv" enum="BakedLightmap.Subdiv">
+ <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode">
</member>
- <member name="energy" type="float" setter="set_energy" getter="get_energy">
+ <member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation">
</member>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+ <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality">
</member>
- <member name="hdr" type="bool" setter="set_hdr" getter="is_hdr">
+ <member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size">
</member>
<member name="image_path" type="String" setter="set_image_path" getter="get_image_path">
</member>
<member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
</member>
- <member name="propagation" type="float" setter="set_propagation" getter="get_propagation">
- </member>
</members>
<constants>
- <constant name="SUBDIV_128" value="0" enum="Subdiv">
- </constant>
- <constant name="SUBDIV_256" value="1" enum="Subdiv">
- </constant>
- <constant name="SUBDIV_512" value="2" enum="Subdiv">
- </constant>
- <constant name="SUBDIV_1024" value="3" enum="Subdiv">
- </constant>
- <constant name="SUBDIV_MAX" value="4" enum="Subdiv">
- </constant>
<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
</constant>
<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index a873bd9a27..1573596487 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -38,7 +38,7 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
- Create a rotation matrix which rotates around the given axis by the specified angle. The axis must be a normalized vector.
+ Create a rotation matrix which rotates around the given axis by the specified angle, in radians. The axis must be a normalized vector.
</description>
</method>
<method name="Basis">
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml
index 91c9ecc774..c2ae9101e1 100644
--- a/doc/classes/Camera.xml
+++ b/doc/classes/Camera.xml
@@ -150,9 +150,6 @@
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset">
The horizontal (Y) offset of the Camear viewport.
</member>
- <member name="vaspect" type="bool" setter="set_vaspect" getter="get_vaspect">
- A boolean representation of [member keep_aspect] in which [code]true[/code] is equivalent to [code]KEEP_WIDTH[/code].
- </member>
</members>
<constants>
<constant name="PROJECTION_PERSPECTIVE" value="0" enum="Projection">
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 6fa7ed0a86..ef555537a1 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values &gt; 1.
+ You can also create a color from standardised color names with [method @GDScript.ColorN].
</description>
<tutorials>
</tutorials>
@@ -63,7 +64,7 @@
<argument index="0" name="from" type="String">
</argument>
<description>
- Constructs a color from an HTML hexadecimal color string in ARGB or RGB format.
+ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN].
The following string formats are supported:
[code]"#ff00ff00"[/code] - ARGB format with '#'
[code]"ff00ff00"[/code] - ARGB format
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 185460eef2..87d00b7600 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -11,14 +11,14 @@
<demos>
</demos>
<methods>
- <method name="get_picker">
+ <method name="get_picker" qualifiers="const">
<return type="ColorPicker">
</return>
<description>
Returns the [code]ColorPicker[/code] that this [code]ColorPickerButton[/code] toggles.
</description>
</method>
- <method name="get_popup">
+ <method name="get_popup" qualifiers="const">
<return type="PopupPanel">
</return>
<description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 6c30a92ed5..680e008ff1 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -632,6 +632,7 @@
Distance between the node's top edge and its parent container, based on [member anchor_top].
</member>
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter">
+ Controls whether the control will be able to receive mouse button input events through [Control._gui_input] and how these events should be handled. Use one of the [code]MOUSE_FILTER_*[/code] constants. See the constants to learn what each does.
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents">
</member>
@@ -869,10 +870,13 @@
Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].
</constant>
<constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter">
+ The control will receive mouse button input events through [method Control._gui_input] if clicked on. These events are automatically marked as handled and they will not propogate further to other controls.
</constant>
<constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter">
+ The control will receive mouse button input events through [method Control._gui_input] if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically.
</constant>
<constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter">
+ The control will not receive mouse button input events through [method Control._gui_input] and will not block other controls from receiving these events. These events will also not be handled automatically.
</constant>
<constant name="GROW_DIRECTION_BEGIN" value="0" enum="GrowDirection">
</constant>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 4bbbac8cf7..db715d2379 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -76,6 +76,12 @@
Returns the [ScriptEditor].
</description>
</method>
+ <method name="get_selected_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_selection">
<return type="EditorSelection">
</return>
@@ -141,6 +147,14 @@
Saves the scene as a file at [code]path[/code].
</description>
</method>
+ <method name="select_file">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_file" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index ada0ee56a8..1505845824 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -136,9 +136,7 @@
<method name="forward_canvas_gui_input" qualifiers="virtual">
<return type="bool">
</return>
- <argument index="0" name="canvas_xform" type="Transform2D">
- </argument>
- <argument index="1" name="event" type="InputEvent">
+ <argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 54eaf6cc7a..80bef2b385 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -314,6 +314,22 @@
Loads an image from file [code]path[/code].
</description>
</method>
+ <method name="load_jpg_from_buffer">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_png_from_buffer">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="PoolByteArray">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="lock">
<return type="void">
</return>
@@ -379,6 +395,7 @@
Sets the [Color] of the pixel at [code](x, y)[/code] if the image is locked. Example:
[codeblock]
var img = Image.new()
+ img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 1200ac5170..79dc45fa1f 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -275,9 +275,12 @@
</return>
<argument index="0" name="image" type="Resource">
</argument>
- <argument index="1" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
+ <argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0">
+ </argument>
+ <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
+ Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. See enum [code]CURSOR_*[/code] for the list of shapes.
</description>
</method>
<method name="set_mouse_mode">
@@ -347,5 +350,39 @@
</constant>
<constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode">
</constant>
+ <constant name="CURSOR_ARROW" value="0" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_CROSS" value="3" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_WAIT" value="4" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_BUSY" value="5" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_DRAG" value="6" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_VSIZE" value="9" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HSIZE" value="10" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_MOVE" value="13" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_VSPLIT" value="14" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HSPLIT" value="15" enum="CursorShape">
+ </constant>
+ <constant name="CURSOR_HELP" value="16" enum="CursorShape">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index cc31da0627..a8abe60f78 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -28,13 +28,6 @@
Returns a [String] representation of the event.
</description>
</method>
- <method name="get_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the event's ID.
- </description>
- </method>
<method name="is_action" qualifiers="const">
<return type="bool">
</return>
@@ -83,14 +76,6 @@
Returns [code]true[/code] if this input event is pressed. Not relevant for the event types [code]MOUSE_MOTION[/code], [code]SCREEN_DRAG[/code] or [code]NONE[/code].
</description>
</method>
- <method name="set_id">
- <return type="void">
- </return>
- <argument index="0" name="id" type="int">
- </argument>
- <description>
- </description>
- </method>
<method name="shortcut_match" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index c41c86d693..af681c9456 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -11,13 +11,21 @@
<demos>
</demos>
<methods>
- <method name="get_popup">
+ <method name="get_popup" qualifiers="const">
<return type="PopupMenu">
</return>
<description>
Return the [PopupMenu] contained in this button.
</description>
</method>
+ <method name="set_disable_shortcuts">
+ <return type="void">
+ </return>
+ <argument index="0" name="disabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<signals>
<signal name="about_to_show">
diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml
index 4b845c05ad..74d59b2dd3 100644
--- a/doc/classes/Mutex.xml
+++ b/doc/classes/Mutex.xml
@@ -4,7 +4,7 @@
A synchronization Mutex.
</brief_description>
<description>
- A synchronization Mutex. Element used in multi-threadding. Basically a binary [Semaphore]. Guarantees that only one thread has this lock, can be used to protect a critical section.
+ A synchronization Mutex. Element used to synchronize multiple [Thread]s. Basically a binary [Semaphore]. Guarantees that only one thread can ever acquire this lock at a time. Can be used to protect a critical section. Be careful to avoid deadlocks.
</description>
<tutorials>
</tutorials>
@@ -22,14 +22,14 @@
<return type="int" enum="Error">
</return>
<description>
- Try locking this [code]Mutex[/code], does not block. Returns [OK] on success else [ERR_BUSY].
+ Try locking this [code]Mutex[/code], does not block. Returns [OK] on success, [ERR_BUSY] otherwise.
</description>
</method>
<method name="unlock">
<return type="void">
</return>
<description>
- Unlock this [code]Mutex[/code], leaving it to others threads.
+ Unlock this [code]Mutex[/code], leaving it to other threads.
</description>
</method>
</methods>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 81978809d7..5b7def99dc 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -157,12 +157,12 @@
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D].
</member>
- <member name="z" type="int" setter="set_z" getter="get_z">
- Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others.
- </member>
<member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative">
If [code]true[/code] the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
</member>
+ <member name="z_index" type="int" setter="set_z_index" getter="get_z_index">
+ Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 76265e700a..ff3e513c79 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -91,6 +91,13 @@
Return the text of the item at index "idx".
</description>
</method>
+ <method name="get_popup" qualifiers="const">
+ <return type="PopupMenu">
+ </return>
+ <description>
+ Return the [PopupMenu] contained in this button.
+ </description>
+ </method>
<method name="get_selected_id" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml
index f63b8f17bc..2e2d8e95f9 100644
--- a/doc/classes/Physics2DDirectSpaceState.xml
+++ b/doc/classes/Physics2DDirectSpaceState.xml
@@ -17,8 +17,8 @@
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
<description>
- Check whether the shape can travel to a point. If it can, the method will return an array with two floats: The first is the distance the shape can move in that direction without colliding, and the second is the distance at which it will collide.
- If the shape can not move, the array will be empty.
+ Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. 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 [1, 1].
+ If the shape can not move, the array will be empty ([code]dir.empty()==true[/code]).
</description>
</method>
<method name="collide_shape">
@@ -29,7 +29,7 @@
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
+ Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
</description>
</method>
<method name="get_rest_info">
@@ -38,16 +38,15 @@
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
- pointo: Place where the shapes intersect.
- normal: Normal of the object at the point where the shapes intersect.
- shape: Shape index within the object against which the shape intersected.
- metadata: Metadata of the shape against which the shape intersected. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the shape intersected.
- collider: Object against which the shape intersected.
- rid: [RID] of the object against which the shape intersected.
- linear_velocity: The movement vector of the object the shape intersected, if it was a body. If it was an area, it is (0,0).
- If the shape did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. Note that this method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields:
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code].
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]point[/code]: The intersection point.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ If the shape did not intersect anything, then an empty dictionary ([code]dir.empty()==true[/code]) is returned instead.
</description>
</method>
<method name="intersect_point">
@@ -62,12 +61,12 @@
<argument index="3" name="collision_layer" type="int" default="2147483647">
</argument>
<description>
- Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the point is in.
- metadata: Metadata of the shape the point is in. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the point is in.
- collider: Object the point is inside of.
- rid: [RID] of the object the point is in.
+ Checks whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, or a bitmask representing the physics layers to check in.
</description>
</method>
@@ -83,15 +82,15 @@
<argument index="3" name="collision_layer" type="int" default="2147483647">
</argument>
<description>
- Intersect a ray in a given space. The returned object is a dictionary with the following fields:
- position: Place where ray is stopped.
- normal: Normal of the object at the point where the ray was stopped.
- shape: Shape index within the object against which the ray was stopped.
- metadata: Metadata of the shape against which the ray was stopped. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object against which the ray was stopped.
- collider: Object against which the ray was stopped.
- rid: [RID] of the object against which the ray was stopped.
- If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
+ Intersects a ray in a given space. The returned object is a dictionary with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]position[/code]: The intersection point.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ If the ray did not intersect anything, then an empty dictionary ([code]dir.empty()==true[/code]) is returned instead.
Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, or a bitmask representing the physics layers to check in.
</description>
</method>
@@ -103,12 +102,12 @@
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
- Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
- shape: Shape index within the object the shape intersected.
- metadata: Metadata of the shape intersected by the shape given through the [Physics2DShapeQueryParameters]. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
- collider_id: Id of the object the shape intersected.
- collider: Object the shape intersected.
- rid: [RID] of the object the shape intersected.
+ Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. Note that this method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data].
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
The number of intersections can be limited with the second parameter, to reduce the processing time.
</description>
</method>
diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml
index 67f5f84a49..8bad396b84 100644
--- a/doc/classes/Physics2DServer.xml
+++ b/doc/classes/Physics2DServer.xml
@@ -216,7 +216,7 @@
<argument index="2" name="disable" type="bool">
</argument>
<description>
- Disables a given shape in this area if [code]disable is true[/code]
+ Disables a given shape in an area.
</description>
</method>
<method name="area_set_shape_transform">
@@ -638,7 +638,7 @@
<argument index="2" name="enable" type="bool">
</argument>
<description>
- Enables one way collision on body if [code]enable is true[/code].
+ Enables one way collision on body if [code]enable[/code] is [code]true[/code].
</description>
</method>
<method name="body_set_shape_disabled">
@@ -651,7 +651,7 @@
<argument index="2" name="disable" type="bool">
</argument>
<description>
- Disables shape in body if [code]disable is true[/code].
+ Disables shape in body if [code]disable[/code] is [code]true[/code].
</description>
</method>
<method name="body_set_shape_metadata">
@@ -1135,6 +1135,12 @@
<constant name="JOINT_DAMPED_SPRING" value="2" enum="JointType">
Constant to create damped spring joints.
</constant>
+ <constant name="JOINT_PARAM_BIAS" value="0" enum="JointParam">
+ </constant>
+ <constant name="JOINT_PARAM_MAX_BIAS" value="1" enum="JointParam">
+ </constant>
+ <constant name="JOINT_PARAM_MAX_FORCE" value="2" enum="JointParam">
+ </constant>
<constant name="DAMPED_STRING_REST_LENGTH" value="0" enum="DampedStringParam">
Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
</constant>
diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml
index 21576646f9..d93550eb47 100644
--- a/doc/classes/PhysicsDirectSpaceState.xml
+++ b/doc/classes/PhysicsDirectSpaceState.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PhysicsDirectSpaceState" inherits="Object" category="Core" version="3.0-beta">
<brief_description>
+ Direct access object to a space in the [PhysicsServer].
</brief_description>
<description>
+ Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space.
</description>
<tutorials>
</tutorials>
@@ -17,6 +19,8 @@
<argument index="1" name="motion" type="Vector3">
</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 [1, 1].
+ If the shape can not move, the array will be empty ([code]dir.empty()==true[/code]).
</description>
</method>
<method name="collide_shape">
@@ -27,6 +31,7 @@
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
+ Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
</description>
</method>
<method name="get_rest_info">
@@ -35,6 +40,14 @@
<argument index="0" name="shape" type="PhysicsShapeQueryParameters">
</argument>
<description>
+ Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. If it collides with more than a shape, the nearest one is selected. The returned object is a dictionary containing the following fields:
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]linear_velocity[/code]: The colliding object's velocity [Vector3]. If the object is an [Area], the result is [code](0, 0, 0)[/code].
+ [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]point[/code]: The intersection point.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ If the shape did not intersect anything, then an empty dictionary ([code]dir.empty()==true[/code]) is returned instead.
</description>
</method>
<method name="intersect_ray">
@@ -49,6 +62,15 @@
<argument index="3" name="collision_layer" type="int" default="2147483647">
</argument>
<description>
+ Intersects a ray in a given space. The returned object is a dictionary with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]normal[/code]: The object's surface normal at the intersection point.
+ [code]position[/code]: The intersection point.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ If the ray did not intersect anything, then an empty dictionary ([code]dir.empty()==true[/code]) is returned instead.
+ Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, or a bitmask representing the physics layers to check in.
</description>
</method>
<method name="intersect_shape">
@@ -59,6 +81,12 @@
<argument index="1" name="max_results" type="int" default="32">
</argument>
<description>
+ Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
+ [code]collider[/code]: The colliding object.
+ [code]collider_id[/code]: The colliding object's ID.
+ [code]rid[/code]: The intersecting object's [RID].
+ [code]shape[/code]: The shape index of the colliding shape.
+ The number of intersections can be limited with the second parameter, to reduce the processing time.
</description>
</method>
</methods>
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index a78fe03cab..3a4b843b06 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -302,6 +302,14 @@
<description>
</description>
</method>
+ <method name="set_quit_on_go_back">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_refuse_new_network_connections">
<return type="void">
</return>
@@ -402,13 +410,13 @@
</signal>
</signals>
<constants>
- <constant name="GROUP_CALL_DEFAULT" value="0" enum="CallGroupFlags">
+ <constant name="GROUP_CALL_DEFAULT" value="0" enum="GroupCallFlags">
</constant>
- <constant name="GROUP_CALL_REVERSE" value="1" enum="CallGroupFlags">
+ <constant name="GROUP_CALL_REVERSE" value="1" enum="GroupCallFlags">
</constant>
- <constant name="GROUP_CALL_REALTIME" value="2" enum="CallGroupFlags">
+ <constant name="GROUP_CALL_REALTIME" value="2" enum="GroupCallFlags">
</constant>
- <constant name="GROUP_CALL_UNIQUE" value="4" enum="CallGroupFlags">
+ <constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
</constant>
<constant name="STRETCH_MODE_DISABLED" value="0" enum="StretchMode">
</constant>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 81b0b3d0c3..1e1a8d516e 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -12,11 +12,11 @@
<method name="can_drop_data_fw" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="arg0" type="Vector2">
+ <argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="arg1" type="Variant">
+ <argument index="1" name="data" type="Variant">
</argument>
- <argument index="2" name="arg2" type="Control">
+ <argument index="2" name="from" type="Control">
</argument>
<description>
</description>
@@ -24,11 +24,11 @@
<method name="drop_data_fw">
<return type="void">
</return>
- <argument index="0" name="arg0" type="Vector2">
+ <argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="arg1" type="Variant">
+ <argument index="1" name="data" type="Variant">
</argument>
- <argument index="2" name="arg2" type="Control">
+ <argument index="2" name="from" type="Control">
</argument>
<description>
</description>
@@ -43,9 +43,9 @@
<method name="get_drag_data_fw">
<return type="Variant">
</return>
- <argument index="0" name="arg0" type="Vector2">
+ <argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="arg1" type="Control">
+ <argument index="1" name="from" type="Control">
</argument>
<description>
</description>
diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml
index d8deb9651a..c8206ff2c2 100644
--- a/doc/classes/Semaphore.xml
+++ b/doc/classes/Semaphore.xml
@@ -4,7 +4,7 @@
A synchronization Semaphore.
</brief_description>
<description>
- A synchronization Semaphore. Element used in multi-threadding. Initialized to zero on creation.
+ A synchronization Semaphore. Element used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex].
</description>
<tutorials>
</tutorials>
@@ -15,14 +15,14 @@
<return type="int" enum="Error">
</return>
<description>
- Lowers the [code]Semaphore[/code], allowing one more thread in.
+ Lowers the [code]Semaphore[/code], allowing one more thread in. Returns [OK] on success, [ERR_BUSY] otherwise.
</description>
</method>
<method name="wait">
<return type="int" enum="Error">
</return>
<description>
- Tries to wait for the [code]Semaphore[/code], if its value is zero, blocks until non-zero.
+ Tries to wait for the [code]Semaphore[/code], if its value is zero, blocks until non-zero. Returns [OK] on success, [ERR_BUSY] otherwise.
</description>
</method>
</methods>
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index ea04192a5e..d0addcf9f9 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -5,6 +5,8 @@
</brief_description>
<description>
Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use Spatial as a parent node to move, scale, rotate and show/hide children in a 3D project.
+
+ Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the Spatial object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the Spatial's transform. The word local below refers to this coordinate system. The coordinate system that is attached to the Spatial object itself is referred to as object-local coordinate system.
</description>
<tutorials>
</tutorials>
@@ -35,12 +37,20 @@
<method name="global_rotate">
<return type="void">
</return>
- <argument index="0" name="normal" type="Vector3">
+ <argument index="0" name="axis" type="Vector3">
</argument>
- <argument index="1" name="radians" type="float">
+ <argument index="1" name="angle" type="float">
+ </argument>
+ <description>
+ Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system.
+ </description>
+ </method>
+ <method name="global_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
</argument>
<description>
- Rotates the current node along normal [Vector3] by angle in radians in Global space.
</description>
</method>
<method name="global_translate">
@@ -49,7 +59,7 @@
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
- Moves the node by [Vector3] offset in Global space.
+ Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system.
</description>
</method>
<method name="hide">
@@ -115,45 +125,65 @@
<return type="void">
</return>
<description>
- Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation. Performs orthonormalization on this node [Transform3D].
+ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D].
</description>
</method>
<method name="rotate">
<return type="void">
</return>
- <argument index="0" name="normal" type="Vector3">
+ <argument index="0" name="axis" type="Vector3">
+ </argument>
+ <argument index="1" name="angle" type="float">
+ </argument>
+ <description>
+ Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians.
+ </description>
+ </method>
+ <method name="rotate_object_local">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="Vector3">
</argument>
- <argument index="1" name="radians" type="float">
+ <argument index="1" name="angle" type="float">
</argument>
<description>
- Rotates the node in local space on given normal [Vector3] by angle in radians.
+ Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system.
</description>
</method>
<method name="rotate_x">
<return type="void">
</return>
- <argument index="0" name="radians" type="float">
+ <argument index="0" name="angle" type="float">
</argument>
<description>
- Rotates the node in local space on X axis by angle in radians.
+ Rotates the local transformation around the X axis by angle in radians
</description>
</method>
<method name="rotate_y">
<return type="void">
</return>
- <argument index="0" name="radians" type="float">
+ <argument index="0" name="angle" type="float">
</argument>
<description>
- Rotates the node in local space on Y axis by angle in radians.
+ Rotates the local transformation around the Y axis by angle in radians.
</description>
</method>
<method name="rotate_z">
<return type="void">
</return>
- <argument index="0" name="radians" type="float">
+ <argument index="0" name="angle" type="float">
</argument>
<description>
- Rotates the node in local space on Z axis by angle in radians.
+ Rotates the local transformation around the Z axis by angle in radians.
+ </description>
+ </method>
+ <method name="scale_object_local">
+ <return type="void">
+ </return>
+ <argument index="0" name="scale" type="Vector3">
+ </argument>
+ <description>
+ Scales the local transformation by given 3D scale factors in object-local coordinate system.
</description>
</method>
<method name="set_as_toplevel">
@@ -242,6 +272,14 @@
Changes the node's position by given offset [Vector3].
</description>
</method>
+ <method name="translate_object_local">
+ <return type="void">
+ </return>
+ <argument index="0" name="offset" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="update_gizmo">
<return type="void">
</return>
@@ -255,16 +293,18 @@
World space (global) [Transform] of this node.
</member>
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation">
- Local euler rotation in radians of this node.
+ Rotation part of the local transformation, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle), in radians.
+
+ Note that in the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three indepdent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
</member>
<member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees">
- Local euler rotation in degrees of this node.
+ Rotation part of the local transformation, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle), in degrees.
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale">
- Local scale of this node.
+ Scale part of the local transformation.
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform">
- Local space [Transform] of this node.
+ Local space [Transform] of this node, with respect to the parent node.
</member>
<member name="translation" type="Vector3" setter="set_translation" getter="get_translation">
Local translation of this node.
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index d757b6f2d8..8ecd9e5816 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -105,7 +105,7 @@
<return type="int">
</return>
<description>
- Get an unsigned 16 bit value from the stream.
+ Get an unsigned 64 bit value from the stream.
</description>
</method>
<method name="get_u8">
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 85cbeaaa03..f4d80c46b4 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -213,7 +213,7 @@
<method name="is_line_hidden" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="arg0" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
</description>
@@ -345,18 +345,28 @@
</methods>
<members>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled">
+ If [code]true[/code] the caret (visual cursor) blinks.
</member>
<member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed">
+ Duration (in seconds) of a caret's blinking cycle.
</member>
<member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode">
+ If [code]true[/code] the caret displays as a rectangle.
+ If [code]false[/code] the caret displays as a bar.
+ </member>
+ <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret">
+ If [code]true[/code] a right click moves the cursor at the mouse position before displaying the context menu.
+ If [code]false[/code] the context menu disregards mouse location.
</member>
<member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled">
+ If [code]true[/code] a right click displays the context menu.
</member>
<member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled">
</member>
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled">
</member>
<member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled">
+ If [code]true[/code] the line containing the cursor is highlighted.
</member>
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color">
</member>
@@ -364,6 +374,7 @@
If [code]true[/code] read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
</member>
<member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled">
+ If [code]true[/code] line numbers are displayed to the left of the text.
</member>
<member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled">
</member>
@@ -419,16 +430,22 @@
Search from end to beginning.
</constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
+ Cuts (Copies and clears) the selected text.
</constant>
<constant name="MENU_COPY" value="1" enum="MenuItems">
+ Copies the selected text.
</constant>
<constant name="MENU_PASTE" value="2" enum="MenuItems">
+ Pastes the clipboard text over the selected text (or at the cursor's position).
</constant>
<constant name="MENU_CLEAR" value="3" enum="MenuItems">
+ Erases the whole [TextEdit] text.
</constant>
<constant name="MENU_SELECT_ALL" value="4" enum="MenuItems">
+ Selects the whole [TextEdit] text.
</constant>
<constant name="MENU_UNDO" value="5" enum="MenuItems">
+ Undoes the previous action.
</constant>
<constant name="MENU_MAX" value="6" enum="MenuItems">
</constant>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 510a215fbc..daba0a0fc1 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -185,9 +185,10 @@
<method name="update_bitmask_area">
<return type="void">
</return>
- <argument index="0" name="arg0" type="Vector2">
+ <argument index="0" name="position" type="Vector2">
</argument>
<description>
+ Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates.
</description>
</method>
<method name="update_bitmask_region">
@@ -198,6 +199,8 @@
<argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
+ Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).
+ Calling with invalid (or missing) parameters applies autotiling rules for the entire TileMap.
</description>
</method>
<method name="world_to_map" qualifiers="const">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 3dbf172c5a..716f89eab6 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -39,7 +39,7 @@
<method name="autotile_get_bitmask_mode" qualifiers="const">
<return type="int" enum="TileSet.BitmaskMode">
</return>
- <argument index="0" name="arg0" type="int">
+ <argument index="0" name="id" type="int">
</argument>
<description>
</description>
@@ -47,9 +47,9 @@
<method name="autotile_set_bitmask_mode">
<return type="void">
</return>
- <argument index="0" name="mode" type="int">
+ <argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="arg1" type="int" enum="TileSet.BitmaskMode">
+ <argument index="1" name="mode" type="int" enum="TileSet.BitmaskMode">
</argument>
<description>
</description>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 7ea83b0b22..09071b2ad1 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -15,20 +15,21 @@
<return type="float">
</return>
<description>
- Return the time left for timeout in seconds if the timer is active, 0 otherwise.
+ Returns the timer's remaining time in seconds. Returns 0 if the timer is inactive.
</description>
</method>
<method name="is_paused" qualifiers="const">
<return type="bool">
</return>
<description>
- Return if the timer is paused or not.
+ Returns [code]true[/code] if the timer is paused.
</description>
</method>
<method name="is_stopped" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the timer is stopped.
</description>
</method>
<method name="set_paused">
@@ -37,14 +38,15 @@
<argument index="0" name="paused" type="bool">
</argument>
<description>
- Set whether the timer is paused or not. A paused timer will be inactive until it is unpaused again.
+ Pauses the timer. If [code]paused[/code] is [code]true[/code], the timer will not process until it is started or unpaused again, even if [method start] is called.
</description>
</method>
<method name="start">
<return type="void">
</return>
<description>
- Start the Timer.
+ Starts the timer. This also resets the remaining time to [code]wait_time[/code].
+ Note: this method will not resume a paused timer. See [method set_paused].
</description>
</method>
<method name="stop">
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 17576f33ed..f4717aa995 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -4,7 +4,7 @@
2D Transformation. 3x2 matrix.
</brief_description>
<description>
- Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix.
+ Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix.
</description>
<tutorials>
</tutorials>
@@ -17,7 +17,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
- Constructs the [code]Transform2D[/code] from a 3D [Transform].
+ Constructs the transform from a 3D [Transform].
</description>
</method>
<method name="Transform2D">
@@ -30,7 +30,7 @@
<argument index="2" name="origin" type="Vector2">
</argument>
<description>
- Constructs the [code]Transform2D[/code] from 3 [Vector2] consisting of rows x, y and origin.
+ Constructs the transform from 3 [Vector2]s representing x, y, and origin.
</description>
</method>
<method name="Transform2D">
@@ -41,7 +41,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
- Constructs the [code]Transform2D[/code] from rotation angle in radians and position [Vector2].
+ Constructs the transform from a given angle (in radians) and position.
</description>
</method>
<method name="affine_inverse">
@@ -57,7 +57,7 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Transforms the given vector "v" by this transform basis (no translation).
+ Transforms the given vector by this transform's basis (no translation).
</description>
</method>
<method name="basis_xform_inv">
@@ -66,21 +66,21 @@
<argument index="0" name="v" type="var">
</argument>
<description>
- Inverse-transforms the given vector "v" by this transform basis (no translation).
+ Inverse-transforms the given vector by this transform's basis (no translation).
</description>
</method>
<method name="get_origin">
<return type="Vector2">
</return>
<description>
- Returns the origin [Vector2] (translation).
+ Returns the transform's origin (translation).
</description>
</method>
<method name="get_rotation">
<return type="float">
</return>
<description>
- Returns the rotation (in radians).
+ Returns the transform's rotation (in radians).
</description>
</method>
<method name="get_scale">
@@ -98,7 +98,7 @@
<argument index="1" name="weight" type="float">
</argument>
<description>
- Interpolates the transform to other Transform2D by weight amount (0-1).
+ Returns a transform interpolated between this transform and another by a given weight (0-1).
</description>
</method>
<method name="inverse">
@@ -121,7 +121,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
- Rotates the transform by phi.
+ Rotates the transform by the given angle (in radians).
</description>
</method>
<method name="scaled">
@@ -130,7 +130,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Scales the transform by the specified 2D scaling factors.
+ Scales the transform by the given factor.
</description>
</method>
<method name="translated">
@@ -139,7 +139,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Translates the transform by the specified offset.
+ Translates the transform by the given offset.
</description>
</method>
<method name="xform">
@@ -163,13 +163,13 @@
</methods>
<members>
<member name="origin" type="Vector2" setter="" getter="">
- The translation offset of the transform.
+ The transform's translation offset.
</member>
<member name="x" type="Vector2" setter="" getter="">
- The X axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ The X axis of 2x2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
<member name="y" type="Vector2" setter="" getter="">
- The Y axis of 2x2 basis matrix containing 2 [Vector2] as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
+ The Y axis of 2x2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
</member>
</members>
<constants>
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 11bd3b3b86..e26082c47e 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -41,6 +41,8 @@
</return>
<argument index="0" name="parent" type="Object" default="null">
</argument>
+ <argument index="1" name="idx" type="int" default="-1">
+ </argument>
<description>
Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the root's last child, or it'll the be the root itself if the tree is empty.
</description>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 976cdbbd90..5c1281b628 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -92,7 +92,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t".
+ Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
</description>
</method>
<method name="distance_squared_to">
@@ -158,7 +158,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and "b", by amount "t".
+ Returns the result of the linear interpolation between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
</description>
</method>
<method name="normalized">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index acb41297a7..dff3d04b0c 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -77,7 +77,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t).
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t). (t) should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
</description>
</method>
<method name="distance_squared_to">
@@ -150,7 +150,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Linearly interpolates the vector to a given one (b), by the given amount (t).
+ Linearly interpolates the vector to a given one (b), by the given amount (t). (t) should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
</description>
</method>
<method name="max_axis">
diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml
index 0cba132de8..28fb83d572 100644
--- a/doc/classes/VisualServer.xml
+++ b/doc/classes/VisualServer.xml
@@ -504,26 +504,26 @@
Sets if the canvas item (including its children) is visible.
</description>
</method>
- <method name="canvas_item_set_z">
+ <method name="canvas_item_set_z_as_relative_to_parent">
<return type="void">
</return>
<argument index="0" name="item" type="RID">
</argument>
- <argument index="1" name="z" type="int">
+ <argument index="1" name="enabled" type="bool">
</argument>
<description>
- Sets the [CanvasItem]'s z order position.
+ If this is enabled, the z-index of the parent will be added to the children's z-index.
</description>
</method>
- <method name="canvas_item_set_z_as_relative_to_parent">
+ <method name="canvas_item_set_z_index">
<return type="void">
</return>
<argument index="0" name="item" type="RID">
</argument>
- <argument index="1" name="enabled" type="bool">
+ <argument index="1" name="z_index" type="int">
</argument>
<description>
- If this is enabled, the z-position of the parent will be added to the childrens z-position.
+ Sets the [CanvasItem]'s z-index, i.e. its draw order (lower indexes are drawn first).
</description>
</method>
<method name="canvas_light_attach_to_canvas">
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index cd0108019b..492f3b6d54 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -276,6 +276,15 @@ def make_type(t):
return ':ref:`' + t + '<class_' + t.lower() + '>`'
return t
+def make_enum(t):
+ global class_names
+ p = t.find(".")
+ if p >= 0:
+ c = t[0:p]
+ e = t[p+1:]
+ if c in class_names:
+ return ':ref:`' + e + '<enum_' + c.lower() + '_' + e.lower() + '>`'
+ return t
def make_method(
f,
@@ -470,7 +479,10 @@ def make_rst_class(node):
# Leading two spaces necessary to prevent breaking the <ul>
f.write(" .. _class_" + name + "_" + c.attrib['name'] + ":\n\n")
s = '- '
- s += make_type(c.attrib['type']) + ' '
+ if 'enum' in c.attrib:
+ s += make_enum(c.attrib['enum']) + ' '
+ else:
+ s += make_type(c.attrib['type']) + ' '
s += '**' + c.attrib['name'] + '**'
if c.text.strip() != '':
s += ' - ' + rstize_text(c.text.strip(), name)
@@ -478,9 +490,20 @@ def make_rst_class(node):
f.write('\n')
constants = node.find('constants')
+ consts = []
+ enum_names = set()
+ enums = []
if constants != None and len(list(constants)) > 0:
- f.write(make_heading('Numeric Constants', '-'))
for c in list(constants):
+ if 'enum' in c.attrib:
+ enum_names.add(c.attrib['enum'])
+ enums.append(c)
+ else:
+ consts.append(c)
+
+ if len(consts) > 0:
+ f.write(make_heading('Numeric Constants', '-'))
+ for c in list(consts):
s = '- '
s += '**' + c.attrib['name'] + '**'
if 'value' in c.attrib:
@@ -489,6 +512,24 @@ def make_rst_class(node):
s += ' --- ' + rstize_text(c.text.strip(), name)
f.write(s + '\n')
f.write('\n')
+
+ if len(enum_names) > 0:
+ f.write(make_heading('Enums', '-'))
+ for e in enum_names:
+ f.write(" .. _enum_" + name + "_" + e + ":\n\n")
+ f.write("enum **" + e + "**\n\n")
+ for c in enums:
+ if c.attrib['enum'] != e:
+ continue
+ s = '- '
+ s += '**' + c.attrib['name'] + '**'
+ if 'value' in c.attrib:
+ s += ' = **' + c.attrib['value'] + '**'
+ if c.text.strip() != '':
+ s += ' --- ' + rstize_text(c.text.strip(), name)
+ f.write(s + '\n')
+ f.write('\n')
+ f.write('\n')
descr = node.find('description')
if descr != None and descr.text.strip() != '':