summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml34
-rw-r--r--doc/classes/AcceptDialog.xml6
-rw-r--r--doc/classes/Animation.xml6
-rw-r--r--doc/classes/AnimationPlayer.xml4
-rw-r--r--doc/classes/Area3D.xml2
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/ArrayMesh.xml82
-rw-r--r--doc/classes/BaseButton.xml3
-rw-r--r--doc/classes/Basis.xml4
-rw-r--r--doc/classes/BitmapFont.xml112
-rw-r--r--doc/classes/BoxMesh.xml (renamed from doc/classes/CubeMesh.xml)11
-rw-r--r--doc/classes/BoxShape3D.xml4
-rw-r--r--doc/classes/Button.xml42
-rw-r--r--doc/classes/CPUParticles2D.xml26
-rw-r--r--doc/classes/CPUParticles3D.xml44
-rw-r--r--doc/classes/Camera2D.xml56
-rw-r--r--doc/classes/Camera3D.xml4
-rw-r--r--doc/classes/CanvasItem.xml77
-rw-r--r--doc/classes/CharFXTransform.xml31
-rw-r--r--doc/classes/CheckBox.xml3
-rw-r--r--doc/classes/CheckButton.xml23
-rw-r--r--doc/classes/CodeEdit.xml7
-rw-r--r--doc/classes/Color.xml12
-rw-r--r--doc/classes/ColorPickerButton.xml3
-rw-r--r--doc/classes/ConeTwistJoint3D.xml4
-rw-r--r--doc/classes/ConfirmationDialog.xml2
-rw-r--r--doc/classes/Control.xml280
-rw-r--r--doc/classes/Crypto.xml26
-rw-r--r--doc/classes/Curve3D.xml2
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DirectionalLight3D.xml3
-rw-r--r--doc/classes/DynamicFont.xml146
-rw-r--r--doc/classes/DynamicFontData.xml36
-rw-r--r--doc/classes/EditorInterface.xml2
-rw-r--r--doc/classes/EditorPlugin.xml10
-rw-r--r--doc/classes/Engine.xml6
-rw-r--r--doc/classes/Environment.xml43
-rw-r--r--doc/classes/FileDialog.xml4
-rw-r--r--doc/classes/Font.xml288
-rw-r--r--doc/classes/FontData.xml330
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml2
-rw-r--r--doc/classes/Geometry2D.xml2
-rw-r--r--doc/classes/GraphEdit.xml19
-rw-r--r--doc/classes/GraphNode.xml43
-rw-r--r--doc/classes/HMACContext.xml88
-rw-r--r--doc/classes/HingeJoint3D.xml4
-rw-r--r--doc/classes/Image.xml35
-rw-r--r--doc/classes/ItemList.xml80
-rw-r--r--doc/classes/Joint3D.xml2
-rw-r--r--doc/classes/Label.xml59
-rw-r--r--doc/classes/LightOccluder2D.xml8
-rw-r--r--doc/classes/LineEdit.xml117
-rw-r--r--doc/classes/LinkButton.xml43
-rw-r--r--doc/classes/MainLoop.xml3
-rw-r--r--doc/classes/MenuButton.xml4
-rw-r--r--doc/classes/Mesh.xml127
-rw-r--r--doc/classes/MeshDataTool.xml8
-rw-r--r--doc/classes/NinePatchRect.xml8
-rw-r--r--doc/classes/Node.xml3
-rw-r--r--doc/classes/OS.xml8
-rw-r--r--doc/classes/OptionButton.xml23
-rw-r--r--doc/classes/PackedByteArray.xml10
-rw-r--r--doc/classes/PackedColorArray.xml10
-rw-r--r--doc/classes/PackedFloat32Array.xml10
-rw-r--r--doc/classes/PackedFloat64Array.xml10
-rw-r--r--doc/classes/PackedInt32Array.xml10
-rw-r--r--doc/classes/PackedInt64Array.xml10
-rw-r--r--doc/classes/PackedStringArray.xml10
-rw-r--r--doc/classes/PackedVector2Array.xml10
-rw-r--r--doc/classes/PackedVector3Array.xml10
-rw-r--r--doc/classes/ParticlesMaterial.xml70
-rw-r--r--doc/classes/PathFollow2D.xml4
-rw-r--r--doc/classes/PhysicalBone3D.xml3
-rw-r--r--doc/classes/PinJoint3D.xml4
-rw-r--r--doc/classes/PlaneMesh.xml1
-rw-r--r--doc/classes/PopupMenu.xml85
-rw-r--r--doc/classes/PrimitiveMesh.xml2
-rw-r--r--doc/classes/ProgressBar.xml3
-rw-r--r--doc/classes/ProjectSettings.xml55
-rw-r--r--doc/classes/ProximityGroup3D.xml4
-rw-r--r--doc/classes/Quat.xml20
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml22
-rw-r--r--doc/classes/Rect2.xml19
-rw-r--r--doc/classes/Rect2i.xml19
-rw-r--r--doc/classes/RectangleShape2D.xml4
-rw-r--r--doc/classes/RenderingServer.xml174
-rw-r--r--doc/classes/Resource.xml1
-rw-r--r--doc/classes/ResourceLoader.xml4
-rw-r--r--doc/classes/RichTextLabel.xml191
-rw-r--r--doc/classes/RigidBody2D.xml3
-rw-r--r--doc/classes/RigidBody3D.xml3
-rw-r--r--doc/classes/SceneTree.xml2
-rw-r--r--doc/classes/SliderJoint3D.xml4
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/StyleBox.xml12
-rw-r--r--doc/classes/StyleBoxFlat.xml18
-rw-r--r--doc/classes/StyleBoxTexture.xml16
-rw-r--r--doc/classes/SubViewport.xml6
-rw-r--r--doc/classes/SurfaceTool.xml204
-rw-r--r--doc/classes/TabContainer.xml6
-rw-r--r--doc/classes/Tabs.xml80
-rw-r--r--doc/classes/TextEdit.xml115
-rw-r--r--doc/classes/TextLine.xml212
-rw-r--r--doc/classes/TextParagraph.xml299
-rw-r--r--doc/classes/TextServer.xml1207
-rw-r--r--doc/classes/TextServerManager.xml82
-rw-r--r--doc/classes/TextureProgressBar.xml (renamed from doc/classes/TextureProgress.xml)8
-rw-r--r--doc/classes/Theme.xml96
-rw-r--r--doc/classes/Transform2D.xml4
-rw-r--r--doc/classes/Tree.xml81
-rw-r--r--doc/classes/TreeItem.xml109
-rw-r--r--doc/classes/Vector2.xml16
-rw-r--r--doc/classes/Vector3.xml16
-rw-r--r--doc/classes/VehicleBody3D.xml1
-rw-r--r--doc/classes/VideoPlayer.xml1
-rw-r--r--doc/classes/Viewport.xml22
-rw-r--r--doc/classes/Window.xml61
-rw-r--r--doc/classes/XRController3D.xml4
-rw-r--r--doc/classes/XRPositionalTracker.xml42
-rw-r--r--doc/classes/int.xml2
122 files changed, 4844 insertions, 1137 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index f6b8e0da19..f128de52ea 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1236,6 +1236,9 @@
<member name="ResourceSaver" type="ResourceSaver" setter="" getter="">
The [ResourceSaver] singleton.
</member>
+ <member name="TextServerManager" type="TextServerManager" setter="" getter="">
+ The [TextServerManager] singleton.
+ </member>
<member name="TranslationServer" type="TranslationServer" setter="" getter="">
The [TranslationServer] singleton.
</member>
@@ -1247,17 +1250,17 @@
</member>
</members>
<constants>
- <constant name="MARGIN_LEFT" value="0" enum="Margin">
- Left margin, usually used for [Control] or [StyleBox]-derived classes.
+ <constant name="SIDE_LEFT" value="0" enum="Side">
+ Left side, usually used for [Control] or [StyleBox]-derived classes.
</constant>
- <constant name="MARGIN_TOP" value="1" enum="Margin">
- Top margin, usually used for [Control] or [StyleBox]-derived classes.
+ <constant name="SIDE_TOP" value="1" enum="Side">
+ Top side, usually used for [Control] or [StyleBox]-derived classes.
</constant>
- <constant name="MARGIN_RIGHT" value="2" enum="Margin">
- Right margin, usually used for [Control] or [StyleBox]-derived classes.
+ <constant name="SIDE_RIGHT" value="2" enum="Side">
+ Right side, usually used for [Control] or [StyleBox]-derived classes.
</constant>
- <constant name="MARGIN_BOTTOM" value="3" enum="Margin">
- Bottom margin, usually used for [Control] or [StyleBox]-derived classes.
+ <constant name="SIDE_BOTTOM" value="3" enum="Side">
+ Bottom side, usually used for [Control] or [StyleBox]-derived classes.
</constant>
<constant name="CORNER_TOP_LEFT" value="0" enum="Corner">
Top-left corner.
@@ -1286,6 +1289,9 @@
<constant name="HALIGN_RIGHT" value="2" enum="HAlign">
Horizontal right alignment, usually for text-derived classes.
</constant>
+ <constant name="HALIGN_FILL" value="3" enum="HAlign">
+ Expand row to fit width, usually for text-derived classes.
+ </constant>
<constant name="VALIGN_TOP" value="0" enum="VAlign">
Vertical top alignment, usually for text-derived classes.
</constant>
@@ -2417,6 +2423,16 @@
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21" enum="PropertyHint">
Hints that an image is compressed using lossless compression.
</constant>
+ <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint">
+ Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance:
+ [codeblock]
+ hint_string = "%s:" % [TYPE_INT] # Array of inteters.
+ hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats.
+ hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
+ hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
+ [/codeblock]
+ [b]Note:[/b] the final colon is required to specify for properly detecting built-in types.
+ </constant>
<constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags">
The property is serialized and saved in the scene file (default).
</constant>
@@ -2498,7 +2514,7 @@
<constant name="TYPE_INT" value="2" enum="Variant.Type">
Variable is of type [int].
</constant>
- <constant name="TYPE_REAL" value="3" enum="Variant.Type">
+ <constant name="TYPE_FLOAT" value="3" enum="Variant.Type">
Variable is of type [float] (real).
</constant>
<constant name="TYPE_STRING" value="4" enum="Variant.Type">
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index e5eb216062..f4cf246713 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -23,7 +23,7 @@
If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
</description>
</method>
- <method name="add_cancel">
+ <method name="add_cancel_button">
<return type="Button">
</return>
<argument index="0" name="name" type="String">
@@ -39,7 +39,7 @@
Returns the label used for built-in text.
</description>
</method>
- <method name="get_ok">
+ <method name="get_ok_button">
<return type="Button">
</return>
<description>
@@ -76,7 +76,7 @@
<signals>
<signal name="cancelled">
<description>
- Emitted when the dialog is closed or the button created with [method add_cancel] is pressed.
+ Emitted when the dialog is closed or the button created with [method add_cancel_button] is pressed.
</description>
</signal>
<signal name="confirmed">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index d34308501c..3e33a879b3 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -514,15 +514,15 @@
Removes a key by index in a given track.
</description>
</method>
- <method name="track_remove_key_at_position">
+ <method name="track_remove_key_at_time">
<return type="void">
</return>
<argument index="0" name="track_idx" type="int">
</argument>
- <argument index="1" name="position" type="float">
+ <argument index="1" name="time" type="float">
</argument>
<description>
- Removes a key by position (seconds) in a given track.
+ Removes a key at [code]time[/code] in a given track.
</description>
</method>
<method name="track_set_enabled">
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index de2087d930..bebff61671 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -260,6 +260,10 @@
<member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The speed scaling ratio. 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.
</member>
+ <member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
+ This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.
+ In other words, the saved scene file will contain the "default pose", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving.
+ </member>
<member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath(&quot;..&quot;)">
The node from which node path references will travel.
</member>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 92a8465762..2f8042bb1e 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -92,7 +92,7 @@
The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
- <member name="audio_bus_name" type="StringName" setter="set_audio_bus" getter="get_audio_bus" default="@&quot;Master&quot;">
+ <member name="audio_bus_name" type="StringName" setter="set_audio_bus_name" getter="get_audio_bus_name" default="@&quot;Master&quot;">
The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 6a9eb89602..e4f9dcf993 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -228,7 +228,7 @@
If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
</description>
</method>
- <method name="empty">
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index dc834474ad..ef33d7ea77 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -16,8 +16,8 @@
# Initialize the ArrayMesh.
var arr_mesh = ArrayMesh.new()
var arrays = []
- arrays.resize(ArrayMesh.ARRAY_MAX)
- arrays[ArrayMesh.ARRAY_VERTEX] = vertices
+ arrays.resize(Mesh.ARRAY_MAX)
+ arrays[Mesh.ARRAY_VERTEX] = vertices
# Create the Mesh.
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)
@@ -33,8 +33,8 @@
// Initialize the ArrayMesh.
var arrMesh = new ArrayMesh();
var arrays = new Godot.Collections.Array();
- arrays.Resize((int)ArrayMesh.ArrayType.Max);
- arrays[(int)ArrayMesh.ArrayType.Vertex] = vertices;
+ arrays.Resize((int)Mesh.ArrayType.Max);
+ arrays[(int)Mesh.ArrayType.Vertex] = vertices;
// Create the Mesh.
arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
@@ -71,12 +71,12 @@
<argument index="3" name="lods" type="Dictionary" default="{
}">
</argument>
- <argument index="4" name="compress_flags" type="int" default="31744">
+ <argument index="4" name="compress_flags" type="int" default="0">
</argument>
<description>
Creates a new surface.
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
- The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.
+ The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
</description>
</method>
@@ -209,77 +209,19 @@
</method>
</methods>
<members>
- <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
- Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
+ <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="ArrayMesh.BlendShapeMode" default="1">
+ Sets the blend shape mode to one of [enum ArrayMesh.BlendShapeMode].
</member>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
</member>
</members>
<constants>
- <constant name="NO_INDEX_ARRAY" value="-1">
- Default value used for index_array_len when no indices are present.
+ <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
+ Blend shapes are normalized.
</constant>
- <constant name="ARRAY_WEIGHTS_SIZE" value="4">
- Amount of weights/bone indices per vertex (always 4).
- </constant>
- <constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
- [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
- </constant>
- <constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
- [PackedVector3Array] of vertex normals.
- </constant>
- <constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
- [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
- </constant>
- <constant name="ARRAY_COLOR" value="3" enum="ArrayType">
- [PackedColorArray] of vertex colors.
- </constant>
- <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
- [PackedVector2Array] for UV coordinates.
- </constant>
- <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
- [PackedVector2Array] for second UV coordinates.
- </constant>
- <constant name="ARRAY_BONES" value="6" enum="ArrayType">
- [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- [PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
- </constant>
- <constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
- For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
- </constant>
- <constant name="ARRAY_MAX" value="9" enum="ArrayType">
- Represents the size of the [enum ArrayType] enum.
- </constant>
- <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
- Array format will include vertices (mandatory).
- </constant>
- <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
- Array format will include normals.
- </constant>
- <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
- Array format will include tangents.
- </constant>
- <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
- Array format will include a color array.
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat">
- Array format will include UVs.
- </constant>
- <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
- Array format will include another set of UVs.
- </constant>
- <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
- Array format will include bone indices.
- </constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
- Array format will include bone weights.
- </constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
- Index array will be used.
+ <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
+ Blend shapes are relative to base weight.
</constant>
</constants>
</class>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 378df1ce65..45ef4cb14c 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -65,6 +65,9 @@
<member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut">
[Shortcut] associated to the button.
</member>
+ <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context">
+ The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
+ </member>
<member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 877d3ca85a..4c9cd5702e 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -201,9 +201,9 @@
<method name="slerp">
<return type="Basis">
</return>
- <argument index="0" name="b" type="Basis">
+ <argument index="0" name="to" type="Basis">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml
deleted file mode 100644
index 87cffdaca0..0000000000
--- a/doc/classes/BitmapFont.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BitmapFont" inherits="Font" version="4.0">
- <brief_description>
- Renders text using fonts under the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format.
- Handles files with the [code].fnt[/code] extension.
- </brief_description>
- <description>
- Renders text using [code]*.fnt[/code] fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see [DynamicFont].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- <method name="add_char">
- <return type="void">
- </return>
- <argument index="0" name="character" type="int">
- </argument>
- <argument index="1" name="texture" type="int">
- </argument>
- <argument index="2" name="rect" type="Rect2">
- </argument>
- <argument index="3" name="align" type="Vector2" default="Vector2( 0, 0 )">
- </argument>
- <argument index="4" name="advance" type="float" default="-1">
- </argument>
- <description>
- Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance.
- </description>
- </method>
- <method name="add_kerning_pair">
- <return type="void">
- </return>
- <argument index="0" name="char_a" type="int">
- </argument>
- <argument index="1" name="char_b" type="int">
- </argument>
- <argument index="2" name="kerning" type="int">
- </argument>
- <description>
- Adds a kerning pair to the [BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
- </description>
- </method>
- <method name="add_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture2D">
- </argument>
- <description>
- Adds a texture to the [BitmapFont].
- </description>
- </method>
- <method name="clear">
- <return type="void">
- </return>
- <description>
- Clears all the font data and settings.
- </description>
- </method>
- <method name="create_from_fnt">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Creates a BitmapFont from the [code]*.fnt[/code] file at [code]path[/code].
- </description>
- </method>
- <method name="get_kerning_pair" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="char_a" type="int">
- </argument>
- <argument index="1" name="char_b" type="int">
- </argument>
- <description>
- Returns a kerning pair as a difference.
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture2D">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the font atlas texture at index [code]idx[/code].
- </description>
- </method>
- <method name="get_texture_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of textures in the BitmapFont atlas.
- </description>
- </method>
- </methods>
- <members>
- <member name="ascent" type="float" setter="set_ascent" getter="get_ascent" default="0.0">
- Ascent (number of pixels above the baseline).
- </member>
- <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint" default="false">
- If [code]true[/code], distance field hint is enabled.
- </member>
- <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback">
- The fallback font.
- </member>
- <member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
- Total font height (ascent plus descent) in pixels.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/CubeMesh.xml b/doc/classes/BoxMesh.xml
index 1f64b4a21f..1404477b46 100644
--- a/doc/classes/CubeMesh.xml
+++ b/doc/classes/BoxMesh.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubeMesh" inherits="PrimitiveMesh" version="4.0">
+<class name="BoxMesh" inherits="PrimitiveMesh" version="4.0">
<brief_description>
- Generate an axis-aligned cuboid [PrimitiveMesh].
+ Generate an axis-aligned box [PrimitiveMesh].
</brief_description>
<description>
- Generate an axis-aligned cuboid [PrimitiveMesh].
- The cube's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code].
+ Generate an axis-aligned box [PrimitiveMesh].
+ The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code].
+ [b]Note:[/b] When using a large textured [BoxMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth], [member subdivide_height] and [member subdivide_width] until you no longer notice UV jittering.
</description>
<tutorials>
</tutorials>
@@ -13,7 +14,7 @@
</methods>
<members>
<member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )">
- Size of the cuboid mesh.
+ The box's width, height and depth.
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0">
Number of extra edge loops inserted along the Z axis.
diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml
index d8cbd8b980..f5051413ce 100644
--- a/doc/classes/BoxShape3D.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -14,8 +14,8 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )">
- The box's half extents. The width, height and depth of this shape is twice the half extents.
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )">
+ The box's width, height and depth.
</member>
</members>
<constants>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index df47fa8bec..e47198a381 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -40,6 +40,33 @@
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
</methods>
<members>
<member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1">
@@ -57,9 +84,15 @@
<member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon">
Button's icon, if text is present the icon will be placed before the text.
</member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The button's text that will be displayed inside the button's area.
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
</members>
<constants>
<constant name="ALIGN_LEFT" value="0" enum="TextAlign">
@@ -94,6 +127,12 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [Button] is being pressed.
</theme_item>
+ <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text oubline [Color] of the [Button].
+ </theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [Button]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
[StyleBox] used when the [Button] is being hovered.
</theme_item>
@@ -103,6 +142,9 @@
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ Size of the [Button]'s text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [Button] is being pressed.
</theme_item>
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index fcf2feb3b9..aa9f99a31e 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -50,10 +50,10 @@
<method name="get_particle_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags">
+ <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags">
</argument>
<description>
- Returns the enabled state of the given flag (see [enum Flags] for options).
+ Returns the enabled state of the given flag (see [enum ParticleFlags] for options).
</description>
</method>
<method name="restart">
@@ -99,12 +99,12 @@
<method name="set_particle_flag">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles2D.Flags">
+ <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Enables or disables the given flag (see [enum Flags] for options).
+ Enables or disables the given flag (see [enum ParticleFlags] for options).
</description>
</method>
</methods>
@@ -196,9 +196,6 @@
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
- <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- Align Y axis of particle with the direction of its velocity.
- </member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
</member>
@@ -250,6 +247,9 @@
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0">
Orbital velocity randomness ratio.
</member>
+ <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ Align Y axis of particle with the direction of its velocity.
+ </member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
@@ -339,17 +339,17 @@
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
- <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
- Use with [method set_particle_flag] to set [member flag_align_y].
+ <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_align_y].
</constant>
- <constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
+ <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags">
Present for consistency with 3D particle nodes, not used in 2D.
</constant>
- <constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
+ <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags">
Present for consistency with 3D particle nodes, not used in 2D.
</constant>
- <constant name="FLAG_MAX" value="3" enum="Flags">
- Represents the size of the [enum Flags] enum.
+ <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags">
+ Represents the size of the [enum ParticleFlags] enum.
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
All particles will be emitted from a single point.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index 07da066bd9..0512efa8c2 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -49,10 +49,10 @@
<method name="get_particle_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags">
+ <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags">
</argument>
<description>
- Returns the enabled state of the given flag (see [enum Flags] for options).
+ Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options).
</description>
</method>
<method name="restart">
@@ -98,12 +98,12 @@
<method name="set_particle_flag">
<return type="void">
</return>
- <argument index="0" name="flag" type="int" enum="CPUParticles3D.Flags">
+ <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
<description>
- Enables or disables the given flag (see [enum Flags] for options).
+ Enables or disables the given particle flag (see [enum ParticleFlags] for options).
</description>
</method>
</methods>
@@ -195,15 +195,6 @@
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
</member>
- <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- Align Y axis of particle with the direction of its velocity.
- </member>
- <member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- If [code]true[/code], particles will not move on the z axis.
- </member>
- <member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
- If [code]true[/code], particles rotate around Y axis by [member angle].
- </member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
</member>
@@ -254,7 +245,7 @@
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
- This property is only available when [member flag_disable_z] is [code]true[/code].
+ This property is only available when [member particle_flag_disable_z] is [code]true[/code].
</member>
<member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's orbital velocity will vary along this [Curve].
@@ -262,6 +253,15 @@
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
Orbital velocity randomness ratio.
</member>
+ <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ Align Y axis of particle with the direction of its velocity.
+ </member>
+ <member name="particle_flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ If [code]true[/code], particles will not move on the Z axis.
+ </member>
+ <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ If [code]true[/code], particles rotate around Y axis by [member angle].
+ </member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
@@ -351,17 +351,17 @@
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
- <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
- Use with [method set_particle_flag] to set [member flag_align_y].
+ <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_align_y].
</constant>
- <constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
- Use with [method set_particle_flag] to set [member flag_rotate_y].
+ <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_rotate_y].
</constant>
- <constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
- Use with [method set_particle_flag] to set [member flag_disable_z].
+ <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_disable_z].
</constant>
- <constant name="FLAG_MAX" value="3" enum="Flags">
- Represents the size of the [enum Flags] enum.
+ <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags">
+ Represents the size of the [enum ParticleFlags] enum.
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
All particles will be emitted from a single point.
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index c7ee915109..f17c56fb11 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -52,19 +52,19 @@
<method name="get_drag_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right].
+ Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].
</description>
</method>
<method name="get_limit" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
+ Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
</method>
<method name="make_current">
@@ -85,23 +85,23 @@
<method name="set_drag_margin">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="drag_margin" type="float">
</argument>
<description>
- Sets the specified margin. See also [member drag_margin_bottom], [member drag_margin_top], [member drag_margin_left], and [member drag_margin_right].
+ Sets the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin].
</description>
</method>
<method name="set_limit">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="limit" type="int">
</argument>
<description>
- Sets the specified camera limit. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
+ Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right].
</description>
</method>
</methods>
@@ -115,23 +115,31 @@
<member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport">
The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead.
</member>
- <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
- Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
+ <member name="drag_bottom_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
+ Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the bottom edge of the screen.
</member>
- <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" default="false">
- If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins.
+ <member name="drag_horizontal_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" default="false">
+ If [code]true[/code], the camera only moves when reaching the horizontal (left and right) drag margins. If [code]false[/code], the camera moves horizontally regardless of margins.
</member>
- <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
- Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
+ <member name="drag_horizontal_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
+ The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins.
+ [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when the horizontal drag margin is enabled or the drag margins are changed.
</member>
- <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
- Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
+ <member name="drag_left_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
+ Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the left edge of the screen.
</member>
- <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
- Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen.
+ <member name="drag_right_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
+ Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the right edge of the screen.
</member>
- <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled" default="false">
- If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins.
+ <member name="drag_top_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2">
+ Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the top edge of the screen.
+ </member>
+ <member name="drag_vertical_enabled" type="bool" setter="set_drag_vertical_enabled" getter="is_drag_vertical_enabled" default="false">
+ If [code]true[/code], the camera only moves when reaching the vertical (top and bottom) drag margins. If [code]false[/code], the camera moves vertically regardless of the drag margins.
+ </member>
+ <member name="drag_vertical_offset" type="float" setter="set_drag_verticaloffset" getter="get_drag_vertical_offset" default="0.0">
+ The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins.
+ [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when the vertical drag margin is enabled or the drag margins are changed.
</member>
<member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false">
If [code]true[/code], draws the camera's drag margin rectangle in the editor.
@@ -160,14 +168,6 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The camera's offset, useful for looking around or camera shake animations.
</member>
- <member name="offset_h" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0">
- The horizontal offset of the camera, relative to the drag margins.
- [b]Note:[/b] Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset.
- </member>
- <member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0">
- The vertical offset of the camera, relative to the drag margins.
- [b]Note:[/b] Used the same as [member offset_h].
- </member>
<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1">
The camera's process callback. See [enum Camera2DProcessMode].
</member>
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index b3fe452b12..034b2e9629 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -189,7 +189,7 @@
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The [Environment] to use for this camera.
</member>
- <member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0">
+ <member name="far" type="float" setter="set_far" getter="get_far" default="4000.0">
The distance to the far culling boundary for this camera relative to its local Z axis.
</member>
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
@@ -209,7 +209,7 @@
<member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera3D.KeepAspect" default="1">
The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT].
</member>
- <member name="near" type="float" setter="set_znear" getter="get_znear" default="0.05">
+ <member name="near" type="float" setter="set_near" getter="get_near" default="0.05">
The distance to the near culling boundary for this camera relative to its local Z axis.
</member>
<member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.Projection" default="0">
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 8efa1adae8..fcdd072c80 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -41,22 +41,30 @@
</argument>
<argument index="6" name="width" type="float" default="1.0">
</argument>
+ <argument index="7" name="antialiased" type="bool" default="false">
+ </argument>
<description>
Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve.
</description>
</method>
- <method name="draw_char">
+ <method name="draw_char" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="font" type="Font">
</argument>
- <argument index="1" name="position" type="Vector2">
+ <argument index="1" name="pos" type="Vector2">
</argument>
<argument index="2" name="char" type="String">
</argument>
- <argument index="3" name="next" type="String">
+ <argument index="3" name="next" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="4" name="size" type="int" default="-1">
+ </argument>
+ <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="outline_size" type="int" default="0">
+ </argument>
+ <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
</argument>
<description>
Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
@@ -146,6 +154,35 @@
Draws multiple, parallel lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
</description>
</method>
+ <method name="draw_multiline_string" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="Font">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="text" type="String">
+ </argument>
+ <argument index="3" name="align" type="int" enum="HAlign" default="0">
+ </argument>
+ <argument index="4" name="width" type="float" default="-1">
+ </argument>
+ <argument index="5" name="max_lines" type="int" default="-1">
+ </argument>
+ <argument index="6" name="size" type="int" default="-1">
+ </argument>
+ <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="outline_size" type="int" default="0">
+ </argument>
+ <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ </argument>
+ <argument index="10" name="flags" type="int" default="51">
+ </argument>
+ <description>
+ Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
+ </description>
+ </method>
<method name="draw_multimesh">
<return type="void">
</return>
@@ -181,6 +218,8 @@
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
+ <argument index="3" name="antialiased" type="bool" default="false">
+ </argument>
<description>
Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code].
</description>
@@ -194,6 +233,8 @@
</argument>
<argument index="2" name="width" type="float" default="1.0">
</argument>
+ <argument index="3" name="antialiased" type="bool" default="false">
+ </argument>
<description>
Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code].
</description>
@@ -253,18 +294,28 @@
Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this.
</description>
</method>
- <method name="draw_string">
+ <method name="draw_string" qualifiers="const">
<return type="void">
</return>
<argument index="0" name="font" type="Font">
</argument>
- <argument index="1" name="position" type="Vector2">
+ <argument index="1" name="pos" type="Vector2">
</argument>
<argument index="2" name="text" type="String">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="align" type="int" enum="HAlign" default="0">
+ </argument>
+ <argument index="4" name="width" type="float" default="-1">
+ </argument>
+ <argument index="5" name="size" type="int" default="-1">
+ </argument>
+ <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="7" name="outline_size" type="int" default="0">
+ </argument>
+ <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
</argument>
- <argument index="4" name="clip_w" type="int" default="-1">
+ <argument index="9" name="flags" type="int" default="3">
</argument>
<description>
Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
@@ -275,17 +326,19 @@
# `default_font` declaration to a member variable assigned in `_ready()`
# so the Control is only created once.
var default_font = Control.new().get_font("font")
- draw_string(default_font, Vector2(64, 64), "Hello world")
+ var default_font_size = Control.new().get_font_size("font_size")
+ draw_string(default_font, Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, font_size)
[/gdscript]
[csharp]
// If using this method in a script that redraws constantly, move the
// `default_font` declaration to a member variable assigned in `_ready()`
// so the Control is only created once.
Font defaultFont = new Control().GetFont("font");
- DrawString(defaultFont, new Vector2(64, 64), "Hello world");
+ int defaultFontSize = new Control().GetFontSize("font_size");
+ DrawString(defaultFont, new Vector2(64, 64), "Hello world", HALIGN_LEFT, -1, defaultFontSize);
[/csharp]
[/codeblocks]
- See also [method Font.draw].
+ See also [method Font.draw_string].
</description>
</method>
<method name="draw_style_box">
@@ -555,7 +608,7 @@
Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing.
</description>
</signal>
- <signal name="hide">
+ <signal name="hidden">
<description>
Emitted when becoming hidden.
</description>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index d1759adf30..b4cb110337 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -13,24 +13,6 @@
<methods>
</methods>
<members>
- <member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0">
- The index of the current character (starting from 0). Setting this property won't affect drawing.
- </member>
- <member name="character" type="int" setter="set_character" getter="get_character" default="0">
- The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
- [codeblocks]
- [gdscript]
- # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
- # See the RichTextEffect documentation for details.
- char_fx.character = ord("*")
- [/gdscript]
- [csharp]
- // `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
- // See the RichTextEffect documentation for details.
- charFx.Character = char.GetNumericValue('*');
- [/csharp]
- [/codeblocks]
- </member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
The color the character will be drawn with.
</member>
@@ -45,11 +27,20 @@
{"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
[/codeblock]
</member>
+ <member name="font" type="RID" setter="set_font" getter="get_font">
+ Font resource used to render glyph.
+ </member>
+ <member name="glyph_index" type="int" setter="set_glyph_index" getter="get_glyph_index" default="0">
+ Font specific glyph index.
+ </member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The position offset the character will be drawn with (in pixels).
</member>
- <member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0">
- The index of the current character (starting from 0). Setting this property won't affect drawing.
+ <member name="outline" type="bool" setter="set_outline" getter="is_outline" default="false">
+ If [code]ture[/code], FX transform is called for outline drawing. Setting this property won't affect drawing.
+ </member>
+ <member name="range" type="Vector2i" setter="set_range" getter="get_range" default="Vector2i( 0, 0 )">
+ Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing.
</member>
<member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true">
If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index f912bb98c9..89fb960e88 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -48,6 +48,9 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckBox] text's font color when it's pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [CheckBox]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is hovered.
</theme_item>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index b4f91cf3a8..882f1c69f3 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -45,6 +45,9 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckButton] text's font color when it's pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [CheckButton]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is hovered.
</theme_item>
@@ -58,16 +61,28 @@
The [StyleBox] to display as a background.
</theme_item>
<theme_item name="off" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked.
+ The icon to display when the [CheckButton] is unchecked (for left-to-right layouts).
</theme_item>
<theme_item name="off_disabled" type="Texture2D">
- The icon to display when the [CheckButton] is unchecked and disabled.
+ The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="off_disabled_mirrored" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="off_mirrored" type="Texture2D">
+ The icon to display when the [CheckButton] is unchecked (for right-to-left layouts).
</theme_item>
<theme_item name="on" type="Texture2D">
- The icon to display when the [CheckButton] is checked.
+ The icon to display when the [CheckButton] is checked (for left-to-right layouts).
</theme_item>
<theme_item name="on_disabled" type="Texture2D">
- The icon to display when the [CheckButton] is checked and disabled.
+ The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="on_disabled_mirrored" type="Texture2D">
+ The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts).
+ </theme_item>
+ <theme_item name="on_mirrored" type="Texture2D">
+ The icon to display when the [CheckButton] is checked (for right-to-left layouts).
</theme_item>
<theme_item name="pressed" type="StyleBox">
The [StyleBox] to display as a background when the [CheckButton] is pressed.
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index f6bc9e2cca..8834ff82c6 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -3,6 +3,7 @@
<brief_description>
</brief_description>
<description>
+ [b]Note[/b]: By default [CodeEdit] always use left-to-right text direction to correcly display source code.
</description>
<tutorials>
</tutorials>
@@ -109,6 +110,9 @@
</member>
<member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false">
</member>
+ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" />
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[ ]" />
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" />
<member name="zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false">
</member>
</members>
@@ -179,6 +183,9 @@
</theme_item>
<theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [CodeEdit]'s text.
+ </theme_item>
<theme_item name="line_number_color" type="Color" default="Color( 0.67, 0.67, 0.67, 0.4 )">
</theme_item>
<theme_item name="line_spacing" type="int" default="4">
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 9705a196ed..755fd7eea2 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -164,9 +164,9 @@
<method name="lerp">
<return type="Color">
</return>
- <argument index="0" name="b" type="Color">
+ <argument index="0" name="to" type="Color">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1.
@@ -255,6 +255,14 @@
<description>
</description>
</method>
+ <method name="operator -" qualifiers="operator">
+ <return type="Color">
+ </return>
+ <argument index="0" name="right" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="operator /" qualifiers="operator">
<return type="Color">
</return>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 76cc49a043..c04e8b9ea0 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -82,6 +82,9 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
Text [Color] used when the [ColorPickerButton] is being pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [ColorPickerButton]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being hovered.
</theme_item>
diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml
index e86e95bec3..bd6e24dafd 100644
--- a/doc/classes/ConeTwistJoint3D.xml
+++ b/doc/classes/ConeTwistJoint3D.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ConeTwistJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
- A twist joint between two 3D bodies.
+ A twist joint between two 3D PhysicsBodies.
</brief_description>
<description>
The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint3D].
The twist axis is initiated as the X axis of the [Joint3D].
- Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies.
+ Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint3D in the local space of the two Bodies. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index a850afdd9f..9d8977cef1 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -18,7 +18,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_cancel">
+ <method name="get_cancel_button">
<return type="Button">
</return>
<description>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index eb0b941da5..c3db716d3a 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Control" inherits="CanvasItem" version="4.0">
<brief_description>
- All user interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent.
+ All user interface nodes inherit from Control. A control's anchors and offsets adapt its position and size relative to its parent.
</brief_description>
<description>
- Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change.
- For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
+ Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change.
+ For more information on Godot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes.
[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 [code]MainLoop._input_event[/code].
[b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
@@ -121,6 +121,18 @@
[/codeblocks]
</description>
</method>
+ <method name="_structured_text_parser" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="args" type="Array">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <description>
+ User defined BiDi algorithm override function.
+ Return [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately.
+ </description>
+ </method>
<method name="accept_event">
<return type="void">
</return>
@@ -179,6 +191,17 @@
Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is [code]null[/code] or invalid, the override is cleared and the font from assigned [Theme] is used.
</description>
</method>
+ <method name="add_theme_font_size_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="font_size" type="int">
+ </argument>
+ <description>
+ Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses. If [code]font_size[/code] is [code]-1[/code], the override is cleared and the font size from assigned [Theme] is used.
+ </description>
+ </method>
<method name="add_theme_icon_override">
<return type="void">
</return>
@@ -309,17 +332,17 @@
<method name="get_anchor" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the anchor identified by [code]margin[/code] constant from [enum Margin] enum. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
+ Returns the anchor for the specified [enum Side]. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
</description>
</method>
<method name="get_begin" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns [member margin_left] and [member margin_top]. See also [member rect_position].
+ Returns [member offset_left] and [member offset_top]. See also [member rect_position].
</description>
</method>
<method name="get_combined_minimum_size" qualifiers="const">
@@ -368,16 +391,16 @@
<return type="Vector2">
</return>
<description>
- Returns [member margin_right] and [member margin_bottom].
+ Returns [member offset_right] and [member offset_bottom].
</description>
</method>
- <method name="get_focus_neighbour" qualifiers="const">
+ <method name="get_focus_neighbor" qualifiers="const">
<return type="NodePath">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the focus neighbour identified by [code]margin[/code] constant from [enum Margin] enum. A getter method for [member focus_neighbour_bottom], [member focus_neighbour_left], [member focus_neighbour_right] and [member focus_neighbour_top].
+ Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
</method>
<method name="get_focus_owner" qualifiers="const">
@@ -394,13 +417,13 @@
Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size].
</description>
</method>
- <method name="get_margin" qualifiers="const">
+ <method name="get_offset" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the anchor identified by [code]margin[/code] constant from [enum Margin] enum. A getter method for [member margin_bottom], [member margin_left], [member margin_right] and [member margin_top].
+ Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
@@ -431,19 +454,12 @@
Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member rect_size].
</description>
</method>
- <method name="get_rotation" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the rotation (in radians).
- </description>
- </method>
<method name="get_theme_color" qualifiers="const">
<return type="Color">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
@@ -466,7 +482,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
@@ -477,18 +493,29 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
</description>
</method>
+ <method name="get_theme_font_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
+ </description>
+ </method>
<method name="get_theme_icon" qualifiers="const">
<return type="Texture2D">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
@@ -499,7 +526,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
@@ -563,7 +590,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
@@ -583,7 +610,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
@@ -603,7 +630,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
@@ -618,12 +645,32 @@
Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
+ <method name="has_theme_font_size" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme].
+ </description>
+ </method>
+ <method name="has_theme_font_size_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if font size with given [code]name[/code] has a valid override in this [Control] node.
+ </description>
+ </method>
<method name="has_theme_icon" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
@@ -652,7 +699,7 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ <argument index="1" name="node_type" type="StringName" default="&quot;&quot;">
</argument>
<description>
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code] exists in assigned [Theme].
@@ -667,6 +714,13 @@
Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
+ <method name="is_layout_rtl" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if layout is right-to-left.
+ </description>
+ </method>
<method name="minimum_size_changed">
<return type="void">
</return>
@@ -684,24 +738,24 @@
<method name="set_anchor">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="anchor" type="float">
</argument>
- <argument index="2" name="keep_margin" type="bool" default="false">
+ <argument index="2" name="keep_offset" type="bool" default="false">
</argument>
<argument index="3" name="push_opposite_anchor" type="bool" default="true">
</argument>
<description>
- Sets the anchor identified by [code]margin[/code] constant from [enum Margin] enum to value [code]anchor[/code]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
- If [code]keep_margin[/code] is [code]true[/code], margins aren't updated after this operation.
+ Sets the anchor for the specified [enum Side] to [code]anchor[/code]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top].
+ If [code]keep_offset[/code] is [code]true[/code], offsets aren't updated after this operation.
If [code]push_opposite_anchor[/code] is [code]true[/code] and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [code]push_opposite_anchor[/code] was [code]false[/code], the left anchor would get value 0.5.
</description>
</method>
- <method name="set_anchor_and_margin">
+ <method name="set_anchor_and_offset">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="anchor" type="float">
</argument>
@@ -710,10 +764,10 @@
<argument index="3" name="push_opposite_anchor" type="bool" default="false">
</argument>
<description>
- Works the same as [method set_anchor], but instead of [code]keep_margin[/code] argument and automatic update of margin, it allows to set the margin offset yourself (see [method set_margin]).
+ Works the same as [method set_anchor], but instead of [code]keep_offset[/code] argument and automatic update of offset, it allows to set the offset yourself (see [method set_offset]).
</description>
</method>
- <method name="set_anchors_and_margins_preset">
+ <method name="set_anchors_and_offsets_preset">
<return type="void">
</return>
<argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
@@ -723,7 +777,7 @@
<argument index="2" name="margin" type="int" default="0">
</argument>
<description>
- Sets both anchor preset and margin preset. See [method set_anchors_preset] and [method set_margins_preset].
+ Sets both anchor preset and offset preset. See [method set_anchors_preset] and [method set_offsets_preset].
</description>
</method>
<method name="set_anchors_preset">
@@ -731,11 +785,11 @@
</return>
<argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
</argument>
- <argument index="1" name="keep_margins" type="bool" default="false">
+ <argument index="1" name="keep_offsets" type="bool" default="false">
</argument>
<description>
Sets the anchors to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor.
- If [code]keep_margins[/code] is [code]true[/code], control's position will also be updated.
+ If [code]keep_offsets[/code] is [code]true[/code], control's position will also be updated.
</description>
</method>
<method name="set_begin">
@@ -744,7 +798,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Sets [member margin_left] and [member margin_top] at the same time. Equivalent of changing [member rect_position].
+ Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member rect_position].
</description>
</method>
<method name="set_drag_forwarding">
@@ -856,18 +910,18 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Sets [member margin_right] and [member margin_bottom] at the same time.
+ Sets [member offset_right] and [member offset_bottom] at the same time.
</description>
</method>
- <method name="set_focus_neighbour">
+ <method name="set_focus_neighbor">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
- <argument index="1" name="neighbour" type="NodePath">
+ <argument index="1" name="neighbor" type="NodePath">
</argument>
<description>
- Sets the anchor identified by [code]margin[/code] constant from [enum Margin] enum to [Control] at [code]neighbor[/code] node path. A setter method for [member focus_neighbour_bottom], [member focus_neighbour_left], [member focus_neighbour_right] and [member focus_neighbour_top].
+ Sets the anchor for the specified [enum Side] to the [Control] at [code]neighbor[/code] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
</method>
<method name="set_global_position">
@@ -875,25 +929,25 @@
</return>
<argument index="0" name="position" type="Vector2">
</argument>
- <argument index="1" name="keep_margins" type="bool" default="false">
+ <argument index="1" name="keep_offsets" type="bool" default="false">
</argument>
<description>
Sets the [member rect_global_position] to given [code]position[/code].
- If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
+ If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
- <method name="set_margin">
+ <method name="set_offset">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="offset" type="float">
</argument>
<description>
- Sets the margin identified by [code]margin[/code] constant from [enum Margin] enum to given [code]offset[/code]. A setter method for [member margin_bottom], [member margin_left], [member margin_right] and [member margin_top].
+ Sets the offset for the specified [enum Side] to [code]offset[/code]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
</method>
- <method name="set_margins_preset">
+ <method name="set_offsets_preset">
<return type="void">
</return>
<argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
@@ -903,7 +957,7 @@
<argument index="2" name="margin" type="int" default="0">
</argument>
<description>
- Sets the margins to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor.
+ Sets the offsets to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor.
Use parameter [code]resize_mode[/code] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code].
Use parameter [code]margin[/code] to determine the gap between the [Control] and the edges.
</description>
@@ -913,20 +967,11 @@
</return>
<argument index="0" name="position" type="Vector2">
</argument>
- <argument index="1" name="keep_margins" type="bool" default="false">
+ <argument index="1" name="keep_offsets" type="bool" default="false">
</argument>
<description>
Sets the [member rect_position] to given [code]position[/code].
- If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
- </description>
- </method>
- <method name="set_rotation">
- <return type="void">
- </return>
- <argument index="0" name="radians" type="float">
- </argument>
- <description>
- Sets the rotation (in radians).
+ If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
<method name="set_size">
@@ -934,11 +979,11 @@
</return>
<argument index="0" name="size" type="Vector2">
</argument>
- <argument index="1" name="keep_margins" type="bool" default="false">
+ <argument index="1" name="keep_offsets" type="bool" default="false">
</argument>
<description>
Sets the size (see [member rect_size]).
- If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins.
+ If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets.
</description>
</method>
<method name="warp_mouse">
@@ -953,30 +998,30 @@
</methods>
<members>
<member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0">
- Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
+ Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals.
</member>
- <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath(&quot;&quot;)">
+ <member name="focus_neighbor_bottom" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
- <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath(&quot;&quot;)">
+ <member name="focus_neighbor_left" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
- <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath(&quot;&quot;)">
+ <member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
- <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath(&quot;&quot;)">
+ <member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath(&quot;&quot;)">
@@ -1015,21 +1060,24 @@
[/csharp]
[/codeblocks]
</member>
- <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0">
+ Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
+ </member>
+ <member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
- Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node.
+ Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
- <member name="margin_left" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ <member name="offset_left" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's left edge and its parent control, based on [member anchor_left].
- Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node.
+ Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
- <member name="margin_right" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ <member name="offset_right" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's right edge and its parent control, based on [member anchor_right].
- Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node.
+ Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
- <member name="margin_top" type="float" setter="set_margin" getter="get_margin" default="0.0">
+ <member name="offset_top" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's top edge and its parent control, based on [member anchor_top].
- Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node.
+ Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node.
</member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0">
The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.
@@ -1053,7 +1101,10 @@
<member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2( 0, 0 )">
The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset].
</member>
- <member name="rect_rotation" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
+ <member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
+ The node's rotation around its pivot, in radians. See [member rect_pivot_offset] to change the pivot's position.
+ </member>
+ <member name="rect_rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0">
The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position.
</member>
<member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
@@ -1068,7 +1119,7 @@
Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does.
</member>
<member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" default="1.0">
- If the node and at least one of its neighbours uses the [constant SIZE_EXPAND] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space.
+ If the node and at least one of its neighbors uses the [constant SIZE_EXPAND] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space.
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" default="1">
Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does.
@@ -1159,6 +1210,9 @@
<constant name="NOTIFICATION_SCROLL_END" value="48">
Sent when this node is inside a [ScrollContainer] which has stopped being scrolled.
</constant>
+ <constant name="NOTIFICATION_LAYOUT_DIRECTION_CHANGED" value="49">
+ Sent when control layout direction is changed.
+ </constant>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape].
</constant>
@@ -1238,16 +1292,16 @@
Snap all 4 anchors to the center of the parent control's bounds. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_LEFT_WIDE" value="9" enum="LayoutPreset">
- Snap all 4 anchors to the left edge of the parent control. The left margin becomes relative to the left edge and the top margin relative to the top left corner of the node's parent. Use with [method set_anchors_preset].
+ Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_TOP_WIDE" value="10" enum="LayoutPreset">
- Snap all 4 anchors to the top edge of the parent control. The left margin becomes relative to the top left corner, the top margin relative to the top edge, and the right margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
+ Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_RIGHT_WIDE" value="11" enum="LayoutPreset">
- Snap all 4 anchors to the right edge of the parent control. The right margin becomes relative to the right edge and the top margin relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
+ Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_BOTTOM_WIDE" value="12" enum="LayoutPreset">
- Snap all 4 anchors to the bottom edge of the parent control. The left margin becomes relative to the bottom left corner, the bottom margin relative to the bottom edge, and the right margin relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset].
+ Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_VCENTER_WIDE" value="13" enum="LayoutPreset">
Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with [method set_anchors_preset].
@@ -1256,7 +1310,7 @@
Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_WIDE" value="15" enum="LayoutPreset">
- Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset].
+ Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset].
</constant>
<constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode">
The control will be resized to its minimum size.
@@ -1309,5 +1363,51 @@
<constant name="ANCHOR_END" value="1" enum="Anchor">
Snaps one of the 4 anchor's sides to the end of the node's [code]Rect[/code], in the bottom right. 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].
</constant>
+ <constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
+ Automatic layout direction, determined from the parent control layout direction.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_LOCALE" value="1" enum="LayoutDirection">
+ Automatic layout direction, determined from the current locale.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_LTR" value="2" enum="LayoutDirection">
+ Left-to-right layout direction.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection">
+ Right-to-left layout direction.
+ </constant>
+ <constant name="TEXT_DIRECTION_INHERITED" value="3" enum="TextDirection">
+ Text writing direction is the same as layout direction.
+ </constant>
+ <constant name="TEXT_DIRECTION_AUTO" value="0" enum="TextDirection">
+ Automatic text writing direction, determined from the current locale and text content.
+ </constant>
+ <constant name="TEXT_DIRECTION_LTR" value="1" enum="TextDirection">
+ Left-to-right text writing direction.
+ </constant>
+ <constant name="TEXT_DIRECTION_RTL" value="2" enum="TextDirection">
+ Right-to-left text writing direction.
+ </constant>
+ <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
+ Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description.
+ </constant>
+ <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
+ BiDi override for URI.
+ </constant>
+ <constant name="STRUCTURED_TEXT_FILE" value="2" enum="StructuredTextParser">
+ BiDi override for file path.
+ </constant>
+ <constant name="STRUCTURED_TEXT_EMAIL" value="3" enum="StructuredTextParser">
+ BiDi override for email.
+ </constant>
+ <constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser">
+ BiDi override for lists.
+ Structured text options: list separator [code]String[/code].
+ </constant>
+ <constant name="STRUCTURED_TEXT_NONE" value="5" enum="StructuredTextParser">
+ Use default Unicode BiDi algorithm.
+ </constant>
+ <constant name="STRUCTURED_TEXT_CUSTOM" value="6" enum="StructuredTextParser">
+ User defined structured text BiDi override function.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index b3bbbae94f..1f6cb40cde 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -73,6 +73,18 @@
<tutorials>
</tutorials>
<methods>
+ <method name="constant_time_compare">
+ <return type="bool">
+ </return>
+ <argument index="0" name="trusted" type="PackedByteArray">
+ </argument>
+ <argument index="1" name="received" type="PackedByteArray">
+ </argument>
+ <description>
+ Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks.
+ See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information.
+ </description>
+ </method>
<method name="decrypt">
<return type="PackedByteArray">
</return>
@@ -147,6 +159,20 @@
[/codeblocks]
</description>
</method>
+ <method name="hmac_digest">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType">
+ </argument>
+ <argument index="1" name="key" type="PackedByteArray">
+ </argument>
+ <argument index="2" name="msg" type="PackedByteArray">
+ </argument>
+ <description>
+ Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [code]msg[/code] using [code]key[/code]. The [code]hash_type[/code] parameter is the hashing algorithm that is used for the inner and outer hashes.
+ Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported.
+ </description>
+ </method>
<method name="sign">
<return type="PackedByteArray">
</return>
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index a6a0e0c33d..bda04f010b 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -145,7 +145,7 @@
<argument index="1" name="cubic" type="bool" default="false">
</argument>
<description>
- Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve.
+ Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve.
To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code].
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index cd0b5ac027..2ca705cec7 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -215,7 +215,7 @@
Creates a copy of the dictionary, and returns it. The [code]deep[/code] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects.
</description>
</method>
- <method name="empty">
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index afd85a9cb7..233b1f0c16 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -41,6 +41,9 @@
</member>
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.05" />
<member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" />
+ <member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false">
+ If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
+ </member>
</members>
<constants>
<constant name="SHADOW_ORTHOGONAL" value="0" enum="ShadowMode">
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
deleted file mode 100644
index d2d0c54761..0000000000
--- a/doc/classes/DynamicFont.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFont" inherits="Font" version="4.0">
- <brief_description>
- DynamicFont renders vector font files at runtime.
- </brief_description>
- <description>
- DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallback fonts, which will be used when displaying a character not supported by the main font.
- DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization.
- [codeblocks]
- [gdscript]
- var dynamic_font = DynamicFont.new()
- dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf")
- dynamic_font.size = 64
- $"Label".set("custom_fonts/font", dynamic_font)
- [/gdscript]
- [csharp]
- var dynamicFont = new DynamicFont();
- dynamicFont.FontData = ResourceLoader.Load&lt;DynamicFontData&gt;("res://BarlowCondensed-Bold.ttf");
- dynamicFont.Size = 64;
- GetNode("Label").Set("custom_fonts/font", dynamicFont);
- [/csharp]
- [/codeblocks]
- [b]Note:[/b] DynamicFont doesn't support features such as kerning, right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File &gt; Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font.
- </description>
- <tutorials>
- <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
- </tutorials>
- <methods>
- <method name="add_fallback">
- <return type="void">
- </return>
- <argument index="0" name="data" type="DynamicFontData">
- </argument>
- <description>
- Adds a fallback font.
- </description>
- </method>
- <method name="get_available_chars" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns a string containing all the characters available in the main and all the fallback fonts.
- If a given character is included in more than one font, it appears only once in the returned string.
- </description>
- </method>
- <method name="get_fallback" qualifiers="const">
- <return type="DynamicFontData">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the fallback font at index [code]idx[/code].
- </description>
- </method>
- <method name="get_fallback_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the number of fallback fonts.
- </description>
- </method>
- <method name="get_spacing" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="type" type="int">
- </argument>
- <description>
- Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
- </description>
- </method>
- <method name="remove_fallback">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Removes the fallback font at index [code]idx[/code].
- </description>
- </method>
- <method name="set_fallback">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="data" type="DynamicFontData">
- </argument>
- <description>
- Sets the fallback font at index [code]idx[/code].
- </description>
- </method>
- <method name="set_spacing">
- <return type="void">
- </return>
- <argument index="0" name="type" type="int">
- </argument>
- <argument index="1" name="value" type="int">
- </argument>
- <description>
- Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
- </description>
- </method>
- </methods>
- <members>
- <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the bottom in pixels.
- </member>
- <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for each character in pixels.
- This can be a negative number to make the distance between characters smaller.
- </member>
- <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing for the space character (in addition to [member extra_spacing_char]) in pixels.
- This can be a negative number to make the distance between words smaller.
- </member>
- <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra spacing at the top in pixels.
- </member>
- <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data">
- The font data.
- </member>
- <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )">
- The font outline's color.
- [b]Note:[/b] It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item.
- </member>
- <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0">
- The font outline's thickness in pixels (not relative to the font size).
- </member>
- <member name="size" type="int" setter="set_size" getter="get_size" default="16">
- The font size in pixels.
- </member>
- </members>
- <constants>
- <constant name="SPACING_TOP" value="0" enum="SpacingType">
- Spacing at the top.
- </constant>
- <constant name="SPACING_BOTTOM" value="1" enum="SpacingType">
- Spacing at the bottom.
- </constant>
- <constant name="SPACING_CHAR" value="2" enum="SpacingType">
- Spacing for each character.
- </constant>
- <constant name="SPACING_SPACE" value="3" enum="SpacingType">
- Spacing for the space character.
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
deleted file mode 100644
index 45585f17e0..0000000000
--- a/doc/classes/DynamicFontData.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="DynamicFontData" inherits="Resource" version="4.0">
- <brief_description>
- Used with [DynamicFont] to describe the location of a font file.
- </brief_description>
- <description>
- Used with [DynamicFont] to describe the location of a vector font file for dynamic rendering at runtime.
- </description>
- <tutorials>
- <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
- </tutorials>
- <methods>
- </methods>
- <members>
- <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true">
- If [code]true[/code], the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one).
- </member>
- <member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default="&quot;&quot;">
- The path to the vector font file.
- </member>
- <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting" default="2">
- The font hinting mode used by FreeType. See [enum Hinting] for options.
- </member>
- </members>
- <constants>
- <constant name="HINTING_NONE" value="0" enum="Hinting">
- Disables font hinting (smoother but less crisp).
- </constant>
- <constant name="HINTING_LIGHT" value="1" enum="Hinting">
- Use the light font hinting mode.
- </constant>
- <constant name="HINTING_NORMAL" value="2" enum="Hinting">
- Use the default font hinting mode (crisper but less smooth).
- </constant>
- </constants>
-</class>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index c7561449b9..5a61c05cee 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -47,7 +47,7 @@
Returns the editor's [EditorSettings] instance.
</description>
</method>
- <method name="get_editor_viewport">
+ <method name="get_editor_main_control">
<return type="Control">
</return>
<description>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index ca011abb36..874fe4e3de 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -130,14 +130,10 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="handler" type="Object">
- </argument>
- <argument index="2" name="callback" type="String">
- </argument>
- <argument index="3" name="ud" type="Variant" default="null">
+ <argument index="1" name="callable" type="Callable">
</argument>
<description>
- Adds a custom menu item to [b]Project &gt; Tools[/b] as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it.
+ Adds a custom menu item to [b]Project &gt; Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called.
</description>
</method>
<method name="add_tool_submenu_item">
@@ -148,7 +144,7 @@
<argument index="1" name="submenu" type="Object">
</argument>
<description>
- Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. This submenu should be cleaned up using [code]remove_tool_menu_item(name)[/code].
+ Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
</description>
</method>
<method name="add_translation_parser_plugin">
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index fab8512e4a..c079085fb3 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -41,7 +41,7 @@
<return type="int">
</return>
<description>
- Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_idle_frames].
+ Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_process_frames].
</description>
</method>
<method name="get_frames_per_second" qualifiers="const">
@@ -51,11 +51,11 @@
Returns the frames per second of the running game.
</description>
</method>
- <method name="get_idle_frames" qualifiers="const">
+ <method name="get_process_frames" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the total number of frames passed since engine initialization which is advanced on each [b]idle frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
+ Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
</description>
</method>
<method name="get_license_info" qualifiers="const">
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 104c149784..9dd4ecc37b 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -43,8 +43,8 @@
<member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0">
The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
- <member name="adjustment_color_correction" type="Texture2D" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
- Applies the provided [Texture2D] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
+ The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
</member>
<member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0">
The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
@@ -218,26 +218,29 @@
<member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0">
The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures.
</member>
- <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01">
- The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion.
- </member>
- <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3">
- The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values.
- </member>
- <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0">
- The screen-space ambient occlusion edge sharpness.
+ <member name="ssao_detail" type="float" setter="set_ssao_detail" getter="get_ssao_detail" default="0.5">
+ Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image.
</member>
<member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false">
- If [code]true[/code], the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues.
+ If [code]true[/code], the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion.
+ </member>
+ <member name="ssao_horizon" type="float" setter="set_ssao_horizon" getter="get_ssao_horizon" default="0.06">
+ The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the [code]0.0-1.0[/code] range. A value of [code]1.0[/code] results in no occlusion.
</member>
- <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0">
- The primary screen-space ambient occlusion intensity. See also [member ssao_radius].
+ <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="2.0">
+ The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion.
</member>
<member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0">
The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light.
</member>
+ <member name="ssao_power" type="float" setter="set_ssao_power" getter="get_ssao_power" default="1.5">
+ The distribution of occlusion. A higher value results in darker occlusion, similar to [member ssao_intensity], but with a sharper falloff.
+ </member>
<member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0">
- The primary screen-space ambient occlusion radius.
+ The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality.
+ </member>
+ <member name="ssao_sharpness" type="float" setter="set_ssao_sharpness" getter="get_ssao_sharpness" default="0.98">
+ Sharpness refers to the amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry.
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0">
The default exposure used for tonemapping.
@@ -335,18 +338,6 @@
<constant name="GLOW_BLEND_MODE_MIX" value="4" enum="GlowBlendMode">
Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
</constant>
- <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur">
- No blur for the screen-space ambient occlusion effect (fastest).
- </constant>
- <constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur">
- 1×1 blur for the screen-space ambient occlusion effect.
- </constant>
- <constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur">
- 2×2 blur for the screen-space ambient occlusion effect.
- </constant>
- <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur">
- 3×3 blur for the screen-space ambient occlusion effect. Increases the radius of the blur for a smoother look, but can result in checkerboard-like artifacts.
- </constant>
<constant name="SDFGI_CASCADES_4" value="0" enum="SDFGICascades">
</constant>
<constant name="SDFGI_CASCADES_6" value="1" enum="SDFGICascades">
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index b4afee7610..ed437aefd5 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -25,11 +25,11 @@
Clear all the added filters in the dialog.
</description>
</method>
- <method name="deselect_items">
+ <method name="deselect_all">
<return type="void">
</return>
<description>
- Clear currently selected items in the dialog.
+ Clear all currently selected items in the dialog.
</description>
</method>
<method name="get_line_edit">
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index f49fbf0d2a..edd2bd137f 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -1,60 +1,167 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Font" inherits="Resource" version="4.0">
<brief_description>
- Internationalized font and text drawing support.
+ Font class is set of font data sources used to draw text.
</brief_description>
<description>
- Font contains a Unicode-compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts.
- [b]Note:[/b] If a DynamicFont doesn't contain a character used in a string, the character in question will be replaced with codepoint [code]0xfffd[/code] if it's available in the DynamicFont. If this replacement character isn't available in the DynamicFont, the character will be hidden without displaying any replacement character in the string.
- [b]Note:[/b] If a BitmapFont doesn't contain a character used in a string, the character in question will be hidden without displaying any replacement character in the string.
+ Font contains a set of glyphs to represent Unicode characters, as well as the ability to draw it with variable width, ascent, descent and kerning.
+ [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
+ [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
+ [b]Note:[/b] If a non of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
+ [codeblocks]
+ [gdscript]
+ var font = Font.new()
+ font.add_data(load("res://BarlowCondensed-Bold.ttf"))
+ $"Label".set("custom_fonts/font", font)
+ $"Label".set("custom_fonts/font_size", 64)
+ [/gdscript]
+ [csharp]
+ var font = new Font();
+ font.AddData(ResourceLoader.Load&lt;FontData&gt;("res://BarlowCondensed-Bold.ttf"));
+ GetNode("Label").Set("custom_fonts/font", font);
+ GetNode("Label").Set("custom_font_sizes/font_size", 64);
+ [/csharp]
+ [/codeblocks]
+ To control font substitution priority use [FontData] language and script support.
+ Use language overrides to use same [Font] stack for multiple languages:
+ [codeblocks]
+ [gdscript]
+ # Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
+ var font_data_fa = load("res://NotoNaskhArabicUI_Regular.ttf");
+ font_data_fa.set_language_support_override("fa", true);
+ font_data_fa.set_language_support_override("ur", false);
+
+ var font_data_ur = load("res://NotoNastaliqUrdu_Regular.ttf");
+ font_data_ur.set_language_support_override("fa", false);
+ font_data_ur.set_language_support_override("ur", true);
+ [/gdscript]
+ [csharp]
+ // Use Naskh font for Persian and Nastaʼlīq font for Urdu text.
+ var fontDataFA = ResourceLoader.Load&lt;FontData&gt;("res://NotoNaskhArabicUI_Regular.ttf");
+ fontDataFA.SetLanguageSupportOverride("fa", true);
+ fontDataFA.SetLanguageSupportOverride("ur", false);
+
+ var fontDataUR = ResourceLoader.Load&lt;FontData&gt;("res://NotoNastaliqUrdu_Regular.ttf");
+ fontDataUR.SetLanguageSupportOverride("fa", false);
+ fontDataUR.SetLanguageSupportOverride("ur", true);
+ [/csharp]
+ [/codeblocks]
+ Use script overrides to specify supported scripts for bitmap font or for less common scripts not directly supported by TrueType format:
+ [codeblocks]
+ [gdscript]
+ # Use specified font for Egyptian hieroglyphs.
+ var font_data = load("res://unifont.ttf");
+ font_data.set_script_support_override("Egyp", true);
+ [/gdscript]
+ [csharp]
+ // Use specified font for Egyptian hieroglyphs.
+ var fontData = ResourceLoader.Load&lt;FontData&gt;("res://unifont.ttf");
+ fontData.SetScriptSupportOverride("Egyp", true);
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
<methods>
- <method name="draw" qualifiers="const">
+ <method name="add_data">
<return type="void">
</return>
+ <argument index="0" name="data" type="FontData">
+ </argument>
+ <description>
+ Add font data source to the set.
+ </description>
+ </method>
+ <method name="draw_char" qualifiers="const">
+ <return type="float">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
- <argument index="1" name="position" type="Vector2">
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="char" type="int">
+ </argument>
+ <argument index="3" name="next" type="int" default="0">
</argument>
- <argument index="2" name="string" type="String">
+ <argument index="4" name="size" type="int" default="-1">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="clip_w" type="int" default="-1">
+ <argument index="6" name="outline_size" type="int" default="0">
</argument>
- <argument index="5" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
</argument>
<description>
- Draw [code]string[/code] into a canvas item using the font at a given position, with [code]modulate[/code] color, and optionally clipping the width. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
- See also [method CanvasItem.draw_string].
+ Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead.
</description>
</method>
- <method name="draw_char" qualifiers="const">
- <return type="float">
+ <method name="draw_multiline_string" qualifiers="const">
+ <return type="void">
</return>
<argument index="0" name="canvas_item" type="RID">
</argument>
- <argument index="1" name="position" type="Vector2">
+ <argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="char" type="int">
+ <argument index="2" name="text" type="String">
+ </argument>
+ <argument index="3" name="align" type="int" enum="HAlign" default="0">
+ </argument>
+ <argument index="4" name="width" type="float" default="-1">
+ </argument>
+ <argument index="5" name="max_lines" type="int" default="-1">
+ </argument>
+ <argument index="6" name="size" type="int" default="-1">
+ </argument>
+ <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="8" name="outline_size" type="int" default="0">
+ </argument>
+ <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ </argument>
+ <argument index="10" name="flags" type="int" default="51">
+ </argument>
+ <description>
+ Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ See also [method CanvasItem.draw_multiline_string].
+ </description>
+ </method>
+ <method name="draw_string" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas_item" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="text" type="String">
+ </argument>
+ <argument index="3" name="align" type="int" enum="HAlign" default="0">
+ </argument>
+ <argument index="4" name="width" type="float" default="-1">
+ </argument>
+ <argument index="5" name="size" type="int" default="-1">
+ </argument>
+ <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="3" name="next" type="int" default="-1">
+ <argument index="7" name="outline_size" type="int" default="0">
</argument>
- <argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
</argument>
- <argument index="5" name="outline" type="bool" default="false">
+ <argument index="9" name="flags" type="int" default="3">
</argument>
<description>
- Draw character [code]char[/code] into a canvas item using the font at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. clipping the width. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
+ Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
+ See also [method CanvasItem.draw_string].
</description>
</method>
<method name="get_ascent" qualifiers="const">
<return type="float">
</return>
+ <argument index="0" name="size" type="int" default="-1">
+ </argument>
<description>
- Returns the font ascent (number of pixels above the baseline).
+ Returns the average font ascent (number of pixels above the baseline).
+ [b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
</description>
</method>
<method name="get_char_size" qualifiers="const">
@@ -64,65 +171,176 @@
</argument>
<argument index="1" name="next" type="int" default="0">
</argument>
+ <argument index="2" name="size" type="int" default="-1">
+ </argument>
<description>
Returns the size of a character, optionally taking kerning into account if the next character is provided.
+ [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead.
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="FontData">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the font data source at index [code]idx[/code]. If the index does not exist, returns [code]null[/code].
+ </description>
+ </method>
+ <method name="get_data_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of font data sources.
</description>
</method>
<method name="get_descent" qualifiers="const">
<return type="float">
</return>
+ <argument index="0" name="size" type="int" default="-1">
+ </argument>
<description>
- Returns the font descent (number of pixels below the baseline).
+ Returns the average font descent (number of pixels below the baseline).
+ [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="float">
</return>
+ <argument index="0" name="size" type="int" default="-1">
+ </argument>
<description>
- Returns the total font height (ascent plus descent) in pixels.
+ Returns the total average font height (ascent plus descent) in pixels.
+ [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line).
</description>
</method>
- <method name="get_string_size" qualifiers="const">
+ <method name="get_multiline_string_size" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="string" type="String">
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="width" type="float" default="-1">
+ </argument>
+ <argument index="2" name="size" type="int" default="-1">
+ </argument>
+ <argument index="3" name="flags" type="int" default="48">
+ </argument>
+ <description>
+ Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account.
+ See also [method draw_multiline_string].
+ </description>
+ </method>
+ <method name="get_spacing" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="type" type="int">
</argument>
<description>
- Returns the size of a string, taking kerning and advance into account.
+ Returns the spacing for the given [code]type[/code] (see [enum SpacingType]).
</description>
</method>
- <method name="get_wordwrap_string_size" qualifiers="const">
+ <method name="get_string_size" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="string" type="String">
+ <argument index="0" name="text" type="String">
</argument>
- <argument index="1" name="width" type="float">
+ <argument index="1" name="size" type="int" default="-1">
</argument>
<description>
- Returns the size that the string would have with word wrapping enabled with a fixed [code]width[/code].
+ Returns the size size of a bounding box of a string, taking kerning and advance into account.
+ See also [method draw_string].
</description>
</method>
- <method name="has_outline" qualifiers="const">
- <return type="bool">
+ <method name="get_supported_chars" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns a string containing all the characters available in the font.
+ If a given character is included in more than one font data source, it appears only once in the returned string.
+ </description>
+ </method>
+ <method name="get_underline_position" qualifiers="const">
+ <return type="float">
</return>
+ <argument index="0" name="size" type="int" default="-1">
+ </argument>
<description>
- Returns [code]true[/code] if the font has an outline.
+ Return average pixel offset of the underline below the baseline.
+ [b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
</description>
</method>
- <method name="is_distance_field_hint" qualifiers="const">
+ <method name="get_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int" default="-1">
+ </argument>
+ <description>
+ Return average thickness of the underline.
+ [b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate.
+ </description>
+ </method>
+ <method name="has_char" qualifiers="const">
<return type="bool">
</return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <description>
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ </description>
+ </method>
+ <method name="remove_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ </description>
+ </method>
+ <method name="set_data">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="data" type="FontData">
+ </argument>
+ <description>
+ Sets the font data source at index [code]idx[/code]. If the index does not exist, nothing happens.
+ </description>
+ </method>
+ <method name="set_spacing">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
<description>
+ Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size).
</description>
</method>
<method name="update_changes">
<return type="void">
</return>
<description>
- After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it.
+ After editing a font (changing data sources, etc.). Call this function to propagate changes to controls that might use it.
</description>
</method>
</methods>
+ <members>
+ <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the bottom in pixels.
+ </member>
+ <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra character spacing in pixels.
+ </member>
+ </members>
<constants>
+ <constant name="SPACING_TOP" value="0" enum="SpacingType">
+ Spacing at the top of the line.
+ </constant>
+ <constant name="SPACING_BOTTOM" value="1" enum="SpacingType">
+ Spacing at the bottom of the line.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml
new file mode 100644
index 0000000000..e2c35f9ce7
--- /dev/null
+++ b/doc/classes/FontData.xml
@@ -0,0 +1,330 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="FontData" inherits="Resource" version="4.0">
+ <brief_description>
+ Font data source, file or memory buffer.
+ </brief_description>
+ <description>
+ Built-in text servers support font data sources of the following formats:
+ - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited.
+ - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="draw_glyph" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <argument index="2" name="pos" type="Vector2">
+ </argument>
+ <argument index="3" name="index" type="int">
+ </argument>
+ <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Returns advance of the glyph for horizontal and vertical layouts.
+ Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ </description>
+ </method>
+ <method name="draw_glyph_outline" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <argument index="2" name="outline_size" type="int">
+ </argument>
+ <argument index="3" name="pos" type="Vector2">
+ </argument>
+ <argument index="4" name="index" type="int">
+ </argument>
+ <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn.
+ Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support).
+ Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ </description>
+ </method>
+ <method name="get_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Returns the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="get_base_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts).
+ </description>
+ </method>
+ <method name="get_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Returns the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="get_glyph_advance" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns advance of the glyph for horizontal and vertical layouts.
+ Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ </description>
+ </method>
+ <method name="get_glyph_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <argument index="1" name="variation_selector" type="int" default="0">
+ </argument>
+ <description>
+ Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ </description>
+ </method>
+ <method name="get_glyph_kerning" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="index_a" type="int">
+ </argument>
+ <argument index="1" name="index_b" type="int">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <description>
+ Returns a kerning of the pair of glyphs for horizontal and vertical layouts.
+ Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data.
+ </description>
+ </method>
+ <method name="get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Returns the total font height (ascent plus descent) in pixels.
+ </description>
+ </method>
+ <method name="get_language_support_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="language" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]language[/code].
+ </description>
+ </method>
+ <method name="get_language_support_overrides" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns list of language support overrides.
+ </description>
+ </method>
+ <method name="get_script_support_override" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="script" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]script[/code].
+ </description>
+ </method>
+ <method name="get_script_support_overrides" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns list of script support overrides.
+ </description>
+ </method>
+ <method name="get_supported_chars" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns a string containing all the characters available in the font.
+ </description>
+ </method>
+ <method name="get_underline_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Returns underline offset (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="get_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ Returns underline thickness in pixels.
+ </description>
+ </method>
+ <method name="get_variation" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns variation coordinate [code]tag[/code].
+ </description>
+ </method>
+ <method name="get_variation_list" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
+ <method name="has_char" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <description>
+ Return [code]true[/code] if a Unicode [code]char[/code] is available in the font.
+ </description>
+ </method>
+ <method name="has_outline" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code], if font supports drawing glyph outlines.
+ </description>
+ </method>
+ <method name="is_language_supported" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="language" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code).
+ </description>
+ </method>
+ <method name="is_script_supported" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="script" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code).
+ </description>
+ </method>
+ <method name="load_memory">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="PackedByteArray">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="base_size" type="int" default="16">
+ </argument>
+ <description>
+ Creates new font from the data in memory.
+ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ </description>
+ </method>
+ <method name="load_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="filename" type="String">
+ </argument>
+ <argument index="1" name="base_size" type="int" default="16">
+ </argument>
+ <description>
+ Creates new font from the file.
+ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size.
+ </description>
+ </method>
+ <method name="remove_language_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="language" type="String">
+ </argument>
+ <description>
+ Remove language support override.
+ </description>
+ </method>
+ <method name="remove_script_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="String">
+ </argument>
+ <description>
+ Removes script support override.
+ </description>
+ </method>
+ <method name="set_language_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="language" type="String">
+ </argument>
+ <argument index="1" name="supported" type="bool">
+ </argument>
+ <description>
+ Adds override for [method is_language_supported].
+ </description>
+ </method>
+ <method name="set_script_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="String">
+ </argument>
+ <argument index="1" name="supported" type="bool">
+ </argument>
+ <description>
+ Adds override for [method is_script_supported].
+ </description>
+ </method>
+ <method name="set_variation">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="float">
+ </argument>
+ <description>
+ Sets variation coordinate [code]tag[/code].
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false">
+ If [code]true[/code], the font is rendered with anti-aliasing.
+ </member>
+ <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default="&quot;&quot;">
+ The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code].
+ </member>
+ <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false">
+ If [code]true[/code], distance field hint is enabled.
+ </member>
+ <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false">
+ If [code]true[/code], default autohinter is used for font hinting.
+ </member>
+ <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0">
+ The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml
index ae86ab7365..79b861dfb8 100644
--- a/doc/classes/Generic6DOFJoint3D.xml
+++ b/doc/classes/Generic6DOFJoint3D.xml
@@ -348,8 +348,6 @@
</member>
<member name="linear_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z" default="0.01">
</member>
- <member name="precision" type="int" setter="set_precision" getter="get_precision" default="1">
- </member>
</members>
<constants>
<constant name="PARAM_LINEAR_LOWER_LIMIT" value="0" enum="Param">
diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml
index 4ff54d15ce..2c0d9b54d1 100644
--- a/doc/classes/Geometry2D.xml
+++ b/doc/classes/Geometry2D.xml
@@ -91,7 +91,7 @@
<argument index="3" name="q2" type="Vector2">
</argument>
<description>
- Given the two 2D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]).
+ Given the two 2D segments ([code]p1[/code], [code]q1[/code]) and ([code]p2[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]q1[/code]) as well the accompanying point on ([code]p2[/code], [code]q2[/code]).
</description>
</method>
<method name="intersect_polygons">
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 77bd2c60cc..2347627c31 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -174,7 +174,22 @@
</method>
</methods>
<members>
+ <member name="connection_lines_antialiased" type="bool" setter="set_connection_lines_antialiased" getter="is_connection_lines_antialiased" default="true">
+ If [code]true[/code], the lines between nodes will use antialiasing.
+ </member>
+ <member name="connection_lines_thickness" type="float" setter="set_connection_lines_thickness" getter="get_connection_lines_thickness" default="2.0">
+ The thickness of the lines between the nodes.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="minimap_enabled" type="bool" setter="set_minimap_enabled" getter="is_minimap_enabled" default="true">
+ If [code]true[/code], the minimap is visible.
+ </member>
+ <member name="minimap_opacity" type="float" setter="set_minimap_opacity" getter="get_minimap_opacity" default="0.65">
+ The opacity of the minimap rectangle.
+ </member>
+ <member name="minimap_size" type="Vector2" setter="set_minimap_size" getter="get_minimap_size" default="Vector2( 240, 160 )">
+ The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
+ </member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" />
<member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false">
If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
@@ -273,7 +288,7 @@
Emitted when a GraphNode is selected.
</description>
</signal>
- <signal name="node_unselected">
+ <signal name="node_deselected">
<argument index="0" name="node" type="Node">
</argument>
<description>
@@ -317,6 +332,8 @@
<theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )">
Color of minor grid lines.
</theme_item>
+ <theme_item name="minimap" type="Texture2D">
+ </theme_item>
<theme_item name="minus" type="Texture2D">
The icon for the zoom out button.
</theme_item>
diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml
index 33074536da..4b0ea4dcb1 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -18,6 +18,13 @@
Disables all input and output slots of the GraphNode.
</description>
</method>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
<method name="clear_slot">
<return type="void">
</return>
@@ -95,6 +102,15 @@
Returns the type of the output connection [code]idx[/code].
</description>
</method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
<method name="get_slot_color_left" qualifiers="const">
<return type="Color">
</return>
@@ -149,6 +165,17 @@
Returns [code]true[/code] if right (output) slot [code]idx[/code] is enabled, [code]false[/code] otherwise.
</description>
</method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="set_slot">
<return type="void">
</return>
@@ -184,14 +211,17 @@
<member name="comment" type="bool" setter="set_comment" getter="is_comment" default="false">
If [code]true[/code], the GraphNode is a comment node.
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
- <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
- The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].
- [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container].
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="0" />
<member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0">
Sets the overlay shown above the GraphNode. See [enum Overlay].
</member>
+ <member name="position_offset" type="Vector2" setter="set_position_offset" getter="get_position_offset" default="Vector2( 0, 0 )">
+ The offset of the GraphNode, relative to the scroll offset of the [GraphEdit].
+ [b]Note:[/b] You cannot use position offset directly, as [GraphEdit] is a [Container].
+ </member>
<member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false">
If [code]true[/code], the user can resize the GraphNode.
[b]Note:[/b] Dragging the handle will only emit the [signal resize_request] signal, the GraphNode needs to be resized manually.
@@ -203,6 +233,9 @@
If [code]true[/code], the close button will be visible.
[b]Note:[/b] Pressing it will only emit the [signal close_request] signal, the GraphNode needs to be removed manually.
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
The text displayed in the GraphNode's title bar.
</member>
@@ -222,7 +255,7 @@
Emitted when the GraphNode is dragged.
</description>
</signal>
- <signal name="offset_changed">
+ <signal name="position_offset_changed">
<description>
Emitted when the GraphNode is moved.
</description>
diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml
new file mode 100644
index 0000000000..00d528ef8f
--- /dev/null
+++ b/doc/classes/HMACContext.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="HMACContext" inherits="Reference" version="4.0">
+ <brief_description>
+ Used to create an HMAC for a message using a key.
+ </brief_description>
+ <description>
+ The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once.
+ [codeblocks]
+ [gdscript]
+ extends Node
+ var ctx = HMACContext.new()
+
+ func _ready():
+ var key = "supersecret".to_utf8()
+ var err = ctx.start(HashingContext.HASH_SHA256, key)
+ assert(err == OK)
+ var msg1 = "this is ".to_utf8()
+ var msg2 = "vewy vewy secret".to_utf8()
+ err = ctx.update(msg1)
+ assert(err == OK)
+ err = ctx.update(msg2)
+ assert(err == OK)
+ var hmac = ctx.finish()
+ print(hmac.hex_encode())
+
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Diagnostics;
+
+ public class CryptoNode : Node
+ {
+ private HMACContext ctx = new HMACContext();
+ public override void _Ready()
+ {
+ PackedByteArray key = String("supersecret").to_utf8();
+ Error err = ctx.Start(HashingContext.HASH_SHA256, key);
+ GD.Assert(err == OK);
+ PackedByteArray msg1 = String("this is ").to_utf8();
+ PackedByteArray msg2 = String("vewy vew secret").to_utf8();
+ err = ctx.Update(msg1);
+ GD.Assert(err == OK);
+ err = ctx.Update(msg2);
+ GD.Assert(err == OK);
+ PackedByteArray hmac = ctx.Finish();
+ GD.Print(hmac.HexEncode());
+ }
+ }
+
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] Not available in HTML5 exports.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="finish">
+ <return type="PackedByteArray">
+ </return>
+ <description>
+ Returns the resulting HMAC. If the HMAC failed, an empty [PackedByteArray] is returned.
+ </description>
+ </method>
+ <method name="start">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType">
+ </argument>
+ <argument index="1" name="key" type="PackedByteArray">
+ </argument>
+ <description>
+ Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called.
+ </description>
+ </method>
+ <method name="update">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="data" type="PackedByteArray">
+ </argument>
+ <description>
+ Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml
index 2d4480cb20..f2c652d51a 100644
--- a/doc/classes/HingeJoint3D.xml
+++ b/doc/classes/HingeJoint3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="HingeJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
- A hinge between two 3D bodies.
+ A hinge between two 3D PhysicsBodies.
</brief_description>
<description>
- A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though.
+ A HingeJoint3D normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index b4325e822c..414249f110 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -422,7 +422,7 @@
<argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1">
</argument>
<description>
- Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using [code]interpolation[/code]. See [code]interpolation[/code] constants.
+ Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
</description>
</method>
<method name="resize_to_po2">
@@ -430,8 +430,10 @@
</return>
<argument index="0" name="square" type="bool" default="false">
</argument>
+ <argument index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1">
+ </argument>
<description>
- Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same.
+ Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
</description>
</method>
<method name="rgbe_to_srgb">
@@ -636,18 +638,19 @@
<constant name="FORMAT_BPTC_RGBFU" value="24" enum="Format">
Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components.
</constant>
- <constant name="FORMAT_PVRTC2" value="25" enum="Format">
+ <constant name="FORMAT_PVRTC1_2" value="25" enum="Format">
Texture format used on PowerVR-supported mobile platforms, uses 2-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
[b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
- <constant name="FORMAT_PVRTC2A" value="26" enum="Format">
- Same as [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], but with an alpha component.
+ <constant name="FORMAT_PVRTC1_2A" value="26" enum="Format">
+ Same as [constant FORMAT_PVRTC1_2], but with an alpha component.
</constant>
- <constant name="FORMAT_PVRTC4" value="27" enum="Format">
- Similar to [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], but with 4-bit color depth and no alpha.
+ <constant name="FORMAT_PVRTC1_4" value="27" enum="Format">
+ Texture format used on PowerVR-supported mobile platforms, uses 4-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url].
+ [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed.
</constant>
- <constant name="FORMAT_PVRTC4A" value="28" enum="Format">
- Same as [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC4[/url], but with an alpha component.
+ <constant name="FORMAT_PVRTC1_4A" value="28" enum="Format">
+ Same as [constant FORMAT_PVRTC1_4], but with an alpha component.
</constant>
<constant name="FORMAT_ETC" value="29" enum="Format">
[url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel.
@@ -714,18 +717,18 @@
<constant name="COMPRESS_S3TC" value="0" enum="CompressMode">
Use S3TC compression.
</constant>
- <constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode">
- Use PVRTC2 compression.
+ <constant name="COMPRESS_PVRTC1_4" value="1" enum="CompressMode">
+ Use PVRTC1 4-bpp compression.
</constant>
- <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode">
- Use PVRTC4 compression.
- </constant>
- <constant name="COMPRESS_ETC" value="3" enum="CompressMode">
+ <constant name="COMPRESS_ETC" value="2" enum="CompressMode">
Use ETC compression.
</constant>
- <constant name="COMPRESS_ETC2" value="4" enum="CompressMode">
+ <constant name="COMPRESS_ETC2" value="3" enum="CompressMode">
Use ETC2 compression.
</constant>
+ <constant name="COMPRESS_BPTC" value="4" enum="CompressMode">
+ Use BPTC compression.
+ </constant>
<constant name="USED_CHANNELS_L" value="0" enum="UsedChannels">
</constant>
<constant name="USED_CHANNELS_LA" value="1" enum="UsedChannels">
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index fd8bfb4ece..8542cdaca4 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -43,6 +43,15 @@
Removes all items from the list.
</description>
</method>
+ <method name="clear_item_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features from the item's text.
+ </description>
+ </method>
<method name="ensure_current_is_visible">
<return type="void">
</return>
@@ -114,6 +123,15 @@
Returns the region of item's icon used. The whole icon will be used if the region has no area.
</description>
</method>
+ <method name="get_item_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text language code.
+ </description>
+ </method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant">
</return>
@@ -123,6 +141,17 @@
Returns the metadata value of the specified index.
</description>
</method>
+ <method name="get_item_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the item's text.
+ </description>
+ </method>
<method name="get_item_text" qualifiers="const">
<return type="String">
</return>
@@ -132,6 +161,15 @@
Returns the text associated with the specified index.
</description>
</method>
+ <method name="get_item_text_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text base writing direction.
+ </description>
+ </method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String">
</return>
@@ -336,6 +374,17 @@
Sets whether the item icon will be drawn transposed.
</description>
</method>
+ <method name="set_item_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
<method name="set_item_metadata">
<return type="void">
</return>
@@ -347,6 +396,19 @@
Sets a value (of any type) to be stored with the item associated with the specified index.
</description>
</method>
+ <method name="set_item_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="set_item_selectable">
<return type="void">
</return>
@@ -369,6 +431,17 @@
Sets text of the item associated with the specified index.
</description>
</method>
+ <method name="set_item_text_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets item's text base writing direction.
+ </description>
+ </method>
<method name="set_item_tooltip">
<return type="void">
</return>
@@ -398,7 +471,7 @@
Sorts items in the list by their text.
</description>
</method>
- <method name="unselect">
+ <method name="deselect">
<return type="void">
</return>
<argument index="0" name="idx" type="int">
@@ -407,7 +480,7 @@
Ensures the item associated with the specified index is not selected.
</description>
</method>
- <method name="unselect_all">
+ <method name="deselect_all">
<return type="void">
</return>
<description>
@@ -544,6 +617,9 @@
<theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the item is selected.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
<theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
[Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index 107c638b9e..94cdda586c 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -4,7 +4,7 @@
Base class for all 3D joints.
</brief_description>
<description>
- Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other.
+ Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. See also [Generic6DOFJoint3D].
</description>
<tutorials>
<link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 570d7f075b..1edf31de4a 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -11,6 +11,13 @@
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
<method name="get_line_count" qualifiers="const">
<return type="int">
</return>
@@ -21,8 +28,21 @@
<method name="get_line_height" qualifiers="const">
<return type="int">
</return>
+ <argument index="0" name="line" type="int" default="-1">
+ </argument>
+ <description>
+ Returns the height of the line [code]line[/code].
+ If [code]line[/code] is set to [code]-1[/code], returns biggest line height.
+ If there're no lines returns font size in pixels.
+ </description>
+ </method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
<description>
- Returns the font size in pixels.
+ Returns OpenType feature [code]tag[/code].
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
@@ -39,6 +59,17 @@
Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines.
</description>
</method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0">
@@ -50,6 +81,9 @@
<member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false">
If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely.
</member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped" default="0">
The node ignores the first [code]lines_skipped[/code] lines before it starts to display text.
</member>
@@ -61,9 +95,18 @@
Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box.
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="4" />
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ Set additional options for BiDi override.
+ </member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text to display on screen.
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
If [code]true[/code], all the text displays as UPPERCASE.
</member>
@@ -85,7 +128,7 @@
Align rows to the right.
</constant>
<constant name="ALIGN_FILL" value="3" enum="Align">
- Expand row whitespaces to fit the width.
+ Expand row to fit the width.
</constant>
<constant name="VALIGN_TOP" value="0" enum="VAlign">
Align the whole text to the top.
@@ -111,7 +154,10 @@
[Color] of the text's shadow effect.
</theme_item>
<theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
- The tint of [Font]'s outline. See [member DynamicFont.outline_color].
+ The tint of [Font]'s outline.
+ </theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [Label]'s text.
</theme_item>
<theme_item name="line_spacing" type="int" default="3">
Vertical space between lines in multiline [Label].
@@ -119,8 +165,8 @@
<theme_item name="normal" type="StyleBox">
Background [StyleBox] for the [Label].
</theme_item>
- <theme_item name="shadow_as_outline" type="int" default="0">
- Boolean value. If set to 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline.
+ <theme_item name="outline_size" type="int" default="0">
+ Text outline size.
</theme_item>
<theme_item name="shadow_offset_x" type="int" default="1">
The horizontal offset of the text's shadow.
@@ -128,5 +174,8 @@
<theme_item name="shadow_offset_y" type="int" default="1">
The vertical offset of the text's shadow.
</theme_item>
+ <theme_item name="shadow_outline_size" type="int" default="1">
+ Shadow outline size. If set to 1 or greater, the shadow will be displayed around the whole text as an outline.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml
index 9f128e5942..550daf9225 100644
--- a/doc/classes/LightOccluder2D.xml
+++ b/doc/classes/LightOccluder2D.xml
@@ -12,12 +12,14 @@
<methods>
</methods>
<members>
- <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
- The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
- </member>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
The [OccluderPolygon2D] used to compute the shadow.
</member>
+ <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
+ The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
+ </member>
+ <member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true">
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index b7211419e4..f05121d48c 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -10,6 +10,7 @@
- [kbd]Ctrl + X[/kbd]: Cut
- [kbd]Ctrl + V[/kbd] or [kbd]Ctrl + Y[/kbd]: Paste/"yank"
- [kbd]Ctrl + Z[/kbd]: Undo
+ - [kbd]Ctrl + ~[/kbd]: Swap input direction.
- [kbd]Ctrl + Shift + Z[/kbd]: Redo
- [kbd]Ctrl + U[/kbd]: Delete text from the cursor position to the beginning of the line
- [kbd]Ctrl + K[/kbd]: Delete text from the cursor position to the end of the line
@@ -46,6 +47,13 @@
Erases the [LineEdit]'s [member text].
</description>
</method>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
<method name="delete_char_at_cursor">
<return type="void">
</return>
@@ -78,6 +86,15 @@
Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit].
</description>
</method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
<method name="get_scroll_offset" qualifiers="const">
<return type="int">
</return>
@@ -126,6 +143,17 @@
Selects the whole [String].
</description>
</method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
</methods>
<members>
<member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0">
@@ -139,6 +167,10 @@
</member>
<member name="caret_force_displayed" type="bool" setter="cursor_set_force_displayed" getter="cursor_get_force_displayed" default="false">
</member>
+ <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false">
+ Allow moving caret, selecting and removing the individual composite character components.
+ Note: [kbd]Backspace[/kbd] is always removing individual composite character components.
+ </member>
<member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0">
The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it.
</member>
@@ -148,6 +180,9 @@
<member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
If [code]true[/code], the context menu will appear when right-clicked.
</member>
+ <member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
+ If [code]true[/code], control characters are displayed.
+ </member>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]false[/code], existing text cannot be modified and new text cannot be added.
</member>
@@ -155,6 +190,9 @@
If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0">
Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit.
</member>
@@ -180,10 +218,19 @@
<member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true">
If [code]false[/code], using shortcuts will be disabled.
</member>
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ Set additional options for BiDi override.
+ </member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [LineEdit].
[b]Note:[/b] Changing text using this property won't emit the [signal text_changed] signal.
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true">
If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it.
</member>
@@ -220,7 +267,7 @@
Aligns the text on the right-hand side of the [LineEdit].
</constant>
<constant name="ALIGN_FILL" value="3" enum="Align">
- Stretches whitespaces to fit the [LineEdit]'s width.
+ Expand row to fit the [LineEdit]'s width.
</constant>
<constant name="MENU_CUT" value="0" enum="MenuItems">
Cuts (copies and clears) the selected text.
@@ -244,7 +291,70 @@
<constant name="MENU_REDO" value="6" enum="MenuItems">
Reverse the last undo action.
</constant>
- <constant name="MENU_MAX" value="7" enum="MenuItems">
+ <constant name="MENU_DIR_INHERITED" value="7" enum="MenuItems">
+ Sets text direction to inherited.
+ </constant>
+ <constant name="MENU_DIR_AUTO" value="8" enum="MenuItems">
+ Sets text direction to automatic.
+ </constant>
+ <constant name="MENU_DIR_LTR" value="9" enum="MenuItems">
+ Sets text direction to left-to-right.
+ </constant>
+ <constant name="MENU_DIR_RTL" value="10" enum="MenuItems">
+ Sets text direction to right-to-left.
+ </constant>
+ <constant name="MENU_DISPLAY_UCC" value="11" enum="MenuItems">
+ Toggles control character display.
+ </constant>
+ <constant name="MENU_INSERT_LRM" value="12" enum="MenuItems">
+ Inserts left-to-right mark (LRM) character.
+ </constant>
+ <constant name="MENU_INSERT_RLM" value="13" enum="MenuItems">
+ Inserts right-to-left mark (RLM) character.
+ </constant>
+ <constant name="MENU_INSERT_LRE" value="14" enum="MenuItems">
+ Inserts start of left-to-right embedding (LRE) character.
+ </constant>
+ <constant name="MENU_INSERT_RLE" value="15" enum="MenuItems">
+ Inserts start of right-to-left embedding (RLE) character.
+ </constant>
+ <constant name="MENU_INSERT_LRO" value="16" enum="MenuItems">
+ Inserts start of left-to-right override (LRO) character.
+ </constant>
+ <constant name="MENU_INSERT_RLO" value="17" enum="MenuItems">
+ Inserts start of right-to-left override (RLO) character.
+ </constant>
+ <constant name="MENU_INSERT_PDF" value="18" enum="MenuItems">
+ Inserts pop direction formatting (PDF) character.
+ </constant>
+ <constant name="MENU_INSERT_ALM" value="19" enum="MenuItems">
+ Inserts Arabic letter mark (ALM) character.
+ </constant>
+ <constant name="MENU_INSERT_LRI" value="20" enum="MenuItems">
+ Inserts left-to-right isolate (LRI) character.
+ </constant>
+ <constant name="MENU_INSERT_RLI" value="21" enum="MenuItems">
+ Inserts right-to-left isolate (RLI) character.
+ </constant>
+ <constant name="MENU_INSERT_FSI" value="22" enum="MenuItems">
+ Inserts first strong isolate (FSI) character.
+ </constant>
+ <constant name="MENU_INSERT_PDI" value="23" enum="MenuItems">
+ Inserts pop direction isolate (PDI) character.
+ </constant>
+ <constant name="MENU_INSERT_ZWJ" value="24" enum="MenuItems">
+ Inserts zero width joiner (ZWJ) character.
+ </constant>
+ <constant name="MENU_INSERT_ZWNJ" value="25" enum="MenuItems">
+ Inserts zero width non-joiner (ZWNJ) character.
+ </constant>
+ <constant name="MENU_INSERT_WJ" value="26" enum="MenuItems">
+ Inserts word joiner (WJ) character.
+ </constant>
+ <constant name="MENU_INSERT_SHY" value="27" enum="MenuItems">
+ Inserts soft hyphen (SHY) character.
+ </constant>
+ <constant name="MENU_MAX" value="28" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant>
</constants>
@@ -276,6 +386,9 @@
<theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
Font color when editing is disabled.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [LineEdit]'s text.
+ </theme_item>
<theme_item name="minimum_spaces" type="int" default="12">
Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of space characters (i.e. this amount of space characters can be displayed without scrolling).
</theme_item>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 15307de897..93384843de 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -10,12 +10,52 @@
<tutorials>
</tutorials>
<methods>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
</methods>
<members>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" />
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ Set additional options for BiDi override.
+ </member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The button's text that will be displayed inside the button's area.
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0">
Determines when to show the underline. See [enum UnderlineMode] for options.
</member>
@@ -47,6 +87,9 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [LinkButton] is being pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [LinkButton]'s text.
+ </theme_item>
<theme_item name="underline_spacing" type="int" default="2">
The vertical space between the baseline of text and the underline.
</theme_item>
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 3c3cbbfa29..7682379b64 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -126,5 +126,8 @@
Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
Implemented on desktop platforms.
</constant>
+ <constant name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018">
+ Notification received when text server is changed.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index fe38c08280..a002ce636b 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -31,6 +31,7 @@
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" />
<member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" />
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
<member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false">
If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one.
</member>
@@ -67,6 +68,9 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [MenuButton] is being pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [MenuButton]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
[StyleBox] used when the [MenuButton] is being hovered.
</theme_item>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 78db09feee..dff4b4f7ab 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -126,11 +126,63 @@
<constant name="PRIMITIVE_TRIANGLE_STRIP" value="4" enum="PrimitiveType">
Render array as triangle strips.
</constant>
- <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
- Blend shapes are normalized.
+ <constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
+ [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
+ </constant>
+ <constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
+ [PackedVector3Array] of vertex normals.
+ </constant>
+ <constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
+ [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
+ </constant>
+ <constant name="ARRAY_COLOR" value="3" enum="ArrayType">
+ [PackedColorArray] of vertex colors.
+ </constant>
+ <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
+ [PackedVector2Array] for UV coordinates.
+ </constant>
+ <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
+ [PackedVector2Array] for second UV coordinates.
+ </constant>
+ <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_BONES" value="10" enum="ArrayType">
+ [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers.
+ </constant>
+ <constant name="ARRAY_WEIGHTS" value="11" enum="ArrayType">
+ [PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
+ </constant>
+ <constant name="ARRAY_INDEX" value="12" enum="ArrayType">
+ [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
+ For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
+ </constant>
+ <constant name="ARRAY_MAX" value="13" enum="ArrayType">
+ Represents the size of the [enum ArrayType] enum.
+ </constant>
+ <constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat">
</constant>
- <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
- Blend shapes are relative to base weight.
+ <constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat">
+ </constant>
+ <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat">
+ Represents the size of the [enum ArrayCustomFormat] enum.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
Mesh array contains vertices. All meshes require a vertex array so this should always be present.
@@ -150,68 +202,45 @@
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
Mesh array contains second UV.
</constant>
- <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
- Mesh array contains bones.
- </constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
- Mesh array contains bone weights.
- </constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
- Mesh array uses indices.
- </constant>
- <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
- Flag used to mark a compressed (half float) normal array.
+ <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
- Flag used to mark a compressed (half float) tangent array.
+ <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
- Flag used to mark a compressed (half float) color array.
+ <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array.
+ <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
+ <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat">
+ Mesh array contains bones.
</constant>
- <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
- Flag used to mark a compressed index array.
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat">
+ Mesh array contains bone weights.
</constant>
- <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
- Flag used to mark that the array contains 2D vertices.
+ <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat">
+ Mesh array uses indices.
</constant>
- <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
- Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
- Array of vertices.
+ <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
- Array of normals.
+ <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_TANGENT" value="2" enum="ArrayType">
- Array of tangents as an array of floats, 4 floats per tangent.
+ <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COLOR" value="3" enum="ArrayType">
- Array of colors.
+ <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
- Array of UV coordinates.
+ <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
- Array of second set of UV coordinates.
+ <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_BONES" value="6" enum="ArrayType">
- Array of bone data.
+ <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- Array of weights.
+ <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat">
+ Flag used to mark that the array contains 2D vertices.
</constant>
- <constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- Array of indices.
+ <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_MAX" value="9" enum="ArrayType">
- Represents the size of the [enum ArrayType] enum.
+ <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
</constant>
</constants>
</class>
diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml
index e107b1a108..db7a3187f0 100644
--- a/doc/classes/MeshDataTool.xml
+++ b/doc/classes/MeshDataTool.xml
@@ -10,7 +10,7 @@
[codeblocks]
[gdscript]
var mesh = ArrayMesh.new()
- mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, CubeMesh.new().get_mesh_arrays())
+ mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, BoxMesh.new().get_mesh_arrays())
var mdt = MeshDataTool.new()
mdt.create_from_surface(mesh, 0)
for i in range(mdt.get_vertex_count()):
@@ -27,7 +27,7 @@
[/gdscript]
[csharp]
var mesh = new ArrayMesh();
- mesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, new CubeMesh().GetMeshArrays());
+ mesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, new BoxMesh().GetMeshArrays());
var mdt = new MeshDataTool();
mdt.CreateFromSurface(mesh, 0);
for (var i = 0; i &lt; mdt.GetVertexCount(); i++)
@@ -169,8 +169,8 @@
<return type="int">
</return>
<description>
- Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant ArrayMesh.ARRAY_FORMAT_NORMAL] is [code]2[/code].
- See [enum ArrayMesh.ArrayFormat] for a list of format flags.
+ Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant Mesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant Mesh.ARRAY_FORMAT_NORMAL] is [code]2[/code].
+ See [enum Mesh.ArrayFormat] for a list of format flags.
</description>
</method>
<method name="get_material" qualifiers="const">
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index b2e0442be8..f4b9d75e91 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -12,21 +12,21 @@
<method name="get_patch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the size of the margin identified by the given [enum Margin] constant.
+ Returns the size of the margin on the specified [enum Side].
</description>
</method>
<method name="set_patch_margin">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="value" type="int">
</argument>
<description>
- Sets the size of the margin identified by the given [enum Margin] constant to [code]value[/code] in pixels.
+ Sets the size of the margin on the specified [enum Side] to [code]value[/code] pixels.
</description>
</method>
</methods>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index e3fc87ffb5..62d88afa51 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -1013,6 +1013,9 @@
Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application.
Implemented on desktop platforms.
</constant>
+ <constant name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018">
+ Notification received when text server is changed.
+ </constant>
<constant name="PAUSE_MODE_INHERIT" value="0" enum="PauseMode">
Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default.
</constant>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 1d80695798..65a815a603 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -233,7 +233,12 @@
<return type="String">
</return>
<description>
- Returns the host OS locale.
+ Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code].
+ [code]language[/code] - 2 or 3 letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case.
+ [code]Script[/code] - optional, 4 letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case.
+ [code]COUNTRY[/code] - optional, 2 or 3 letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case.
+ [code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored key words.
+ [code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information.
</description>
</method>
<method name="get_model_name" qualifiers="const">
@@ -351,6 +356,7 @@
</return>
<description>
Returns the current UNIX epoch timestamp.
+ [b]Important:[/b] This is the system clock that the user can manully set. [b]Never use[/b] this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. [b]Always use[/b] [method get_ticks_usec] or [method get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).
</description>
</method>
<method name="get_unix_time_from_datetime" qualifiers="const">
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 510f952fea..53309bae96 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -239,7 +239,10 @@
The horizontal space between the arrow icon and the right edge of the button.
</theme_item>
<theme_item name="disabled" type="StyleBox">
- [StyleBox] used when the [OptionButton] is disabled.
+ [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="disabled_mirrored" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts).
</theme_item>
<theme_item name="focus" type="StyleBox">
[StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
@@ -259,17 +262,29 @@
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [OptionButton] is being pressed.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the [OptionButton]'s text.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
- [StyleBox] used when the [OptionButton] is being hovered.
+ [StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="hover_mirrored" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts).
</theme_item>
<theme_item name="hseparation" type="int" default="2">
The horizontal space between [OptionButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
- Default [StyleBox] for the [OptionButton].
+ Default [StyleBox] for the [OptionButton] (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="normal_mirrored" type="StyleBox">
+ Default [StyleBox] for the [OptionButton] (for right-to-left layouts).
</theme_item>
<theme_item name="pressed" type="StyleBox">
- [StyleBox] used when the [OptionButton] is being pressed.
+ [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="pressed_mirrored" type="StyleBox">
+ [StyleBox] used when the [OptionButton] is being pressed (for right-to-left layouts).
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 91d066260b..b00c59ade9 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -86,7 +85,14 @@
GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedByteArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 3065d16945..d6cd5196e4 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -53,7 +52,14 @@
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedColorArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index ab9594d2e3..52f6ece158 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
If you need to pack 64-bit floats tightly, see [PackedFloat64Array].
</description>
<tutorials>
@@ -54,7 +53,14 @@
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedFloat32Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 3088aee483..2f317d4b8c 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
If you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative.
</description>
<tutorials>
@@ -54,7 +53,14 @@
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedFloat64Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index eded545de8..bda902b15f 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
[b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array].
</description>
<tutorials>
@@ -54,7 +53,14 @@
Appends a [PackedInt32Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedInt32Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 83731b1023..9c52ec808b 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
[b]Note:[/b] This type stores signed 64-bit integers, which means 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. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative.
</description>
<tutorials>
@@ -54,7 +53,14 @@
Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedInt64Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index c71f5ffa7e..24406c53d4 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
@@ -54,7 +53,14 @@
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 5f68d9256d..2f583e2b9b 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
<link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
@@ -54,7 +53,14 @@
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedVector2Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index e681e1deb7..6004454dc9 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
An [Array] specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes.
- [b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
</tutorials>
@@ -53,7 +52,14 @@
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
- <method name="empty">
+ <method name="duplicate">
+ <return type="PackedVector3Array">
+ </return>
+ <description>
+ Creates a copy of the array, and returns it.
+ </description>
+ </method>
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 77df6245e9..85058cb9d4 100644
--- a/doc/classes/ParticlesMaterial.xml
+++ b/doc/classes/ParticlesMaterial.xml
@@ -11,15 +11,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
- </argument>
- <description>
- Returns [code]true[/code] if the specified flag is enabled.
- </description>
- </method>
<method name="get_param" qualifiers="const">
<return type="float">
</return>
@@ -47,15 +38,13 @@
Returns the [Texture2D] used by the specified parameter.
</description>
</method>
- <method name="set_flag">
- <return type="void">
+ <method name="get_particle_flag" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
- </argument>
- <argument index="1" name="enable" type="bool">
+ <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags">
</argument>
<description>
- If [code]true[/code], enables the specified flag. See [enum Flags] for options.
+ Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options.
</description>
</method>
<method name="set_param">
@@ -91,11 +80,22 @@
Sets the [Texture2D] for the specified [enum Parameter].
</description>
</method>
+ <method name="set_particle_flag">
+ <return type="void">
+ </return>
+ <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ If [code]true[/code], enables the specified particle flag. See [enum ParticleFlags] for options.
+ </description>
+ </method>
</methods>
<members>
<member name="angle" type="float" setter="set_param" getter="get_param" default="0.0">
Initial rotation applied to each particle, in degrees.
- Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's rotation will be animated along this [CurveTexture].
@@ -105,7 +105,7 @@
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0">
Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
- Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
+ Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
</member>
<member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's angular velocity will vary along this [CurveTexture].
@@ -180,15 +180,6 @@
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
</member>
- <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag" default="false">
- Align Y axis of particle with the direction of its velocity.
- </member>
- <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], particles will not move on the z axis.
- </member>
- <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], particles rotate around Y axis by [member angle].
- </member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
</member>
@@ -224,7 +215,7 @@
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param">
Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
- Only available when [member flag_disable_z] is [code]true[/code].
+ Only available when [member particle_flag_disable_z] is [code]true[/code].
</member>
<member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's orbital velocity will vary along this [CurveTexture].
@@ -232,6 +223,15 @@
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness">
Orbital velocity randomness ratio.
</member>
+ <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ Align Y axis of particle with the direction of its velocity.
+ </member>
+ <member name="particle_flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ If [code]true[/code], particles will not move on the z axis.
+ </member>
+ <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
+ If [code]true[/code], particles rotate around Y axis by [member angle].
+ </member>
<member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0">
Radial acceleration applied to each particle. Makes particle accelerate away from origin.
</member>
@@ -311,17 +311,17 @@
<constant name="PARAM_MAX" value="12" enum="Parameter">
Represents the size of the [enum Parameter] enum.
</constant>
- <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags">
- Use with [method set_flag] to set [member flag_align_y].
+ <constant name="PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_align_y].
</constant>
- <constant name="FLAG_ROTATE_Y" value="1" enum="Flags">
- Use with [method set_flag] to set [member flag_rotate_y].
+ <constant name="PARTICLE_FLAG_ROTATE_Y" value="1" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_rotate_y].
</constant>
- <constant name="FLAG_DISABLE_Z" value="2" enum="Flags">
- Use with [method set_flag] to set [member flag_disable_z].
+ <constant name="PARTICLE_FLAG_DISABLE_Z" value="2" enum="ParticleFlags">
+ Use with [method set_particle_flag] to set [member particle_flag_disable_z].
</constant>
- <constant name="FLAG_MAX" value="3" enum="Flags">
- Represents the size of the [enum Flags] enum.
+ <constant name="PARTICLE_FLAG_MAX" value="3" enum="ParticleFlags">
+ Represents the size of the [enum ParticleFlags] enum.
</constant>
<constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape">
All particles will be emitted from a single point.
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index bbaeca12da..4b55e7b781 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -29,8 +29,8 @@
<member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0">
The distance along the path in pixels.
</member>
- <member name="rotate" type="bool" setter="set_rotate" getter="is_rotating" default="true">
- If [code]true[/code], this node rotates to follow the path, making its descendants rotate.
+ <member name="rotates" type="bool" setter="set_rotates" getter="is_rotating" default="true">
+ If [code]true[/code], this node rotates to follow the path, with the +X direction facing forward on the path.
</member>
<member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0">
The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 0808e4a724..dcf24c1d32 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -117,9 +117,6 @@
<member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0">
The body's mass.
</member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
- The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b].
- </member>
</members>
<constants>
<constant name="JOINT_TYPE_NONE" value="0" enum="JointType">
diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml
index 0af1e60839..267ea38873 100644
--- a/doc/classes/PinJoint3D.xml
+++ b/doc/classes/PinJoint3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PinJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
- Pin joint for 3D shapes.
+ Pin joint for 3D PhysicsBodies.
</brief_description>
<description>
- Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together.
+ Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml
index 2081442e04..333d687e91 100644
--- a/doc/classes/PlaneMesh.xml
+++ b/doc/classes/PlaneMesh.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Class representing a planar [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, use [QuadMesh] instead.
+ [b]Note:[/b] When using a large textured [PlaneMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth] and [member subdivide_width] until you no longer notice UV jittering.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index b1ec9a222a..04798c04e9 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -207,6 +207,7 @@
</argument>
<description>
Adds a separator between items. Separators also occupy an index.
+ A [code]label[/code] can optionally be provided, which will appear at the center of the separator.
</description>
</method>
<method name="add_shortcut">
@@ -244,6 +245,15 @@
Removes all items from the [PopupMenu].
</description>
</method>
+ <method name="clear_item_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features form the item's text.
+ </description>
+ </method>
<method name="get_current_index" qualifiers="const">
<return type="int">
</return>
@@ -293,6 +303,15 @@
Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually.
</description>
</method>
+ <method name="get_item_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text language code.
+ </description>
+ </method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant">
</return>
@@ -302,6 +321,17 @@
Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
</description>
</method>
+ <method name="get_item_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the item's text.
+ </description>
+ </method>
<method name="get_item_shortcut" qualifiers="const">
<return type="Shortcut">
</return>
@@ -329,6 +359,15 @@
Returns the text of the item at index [code]idx[/code].
</description>
</method>
+ <method name="get_item_text_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text base writing direction.
+ </description>
+ </method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String">
</return>
@@ -494,6 +533,17 @@
Sets the [code]id[/code] of the item at index [code]idx[/code].
</description>
</method>
+ <method name="set_item_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
<method name="set_item_metadata">
<return type="void">
</return>
@@ -516,6 +566,19 @@
Sets the state of an multistate item. See [method add_multistate_item] for details.
</description>
</method>
+ <method name="set_item_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="set_item_shortcut">
<return type="void">
</return>
@@ -562,6 +625,17 @@
Sets the text of the item at index [code]idx[/code].
</description>
</method>
+ <method name="set_item_text_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets item's text base writing direction.
+ </description>
+ </method>
<method name="set_item_tooltip">
<return type="void">
</return>
@@ -653,6 +727,12 @@
<theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
[Color] used for the hovered text.
</theme_item>
+ <theme_item name="font_color_separator" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ [Color] used for labeled separators' text. See [method add_separator].
+ </theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the menu items.
+ </theme_item>
<theme_item name="hover" type="StyleBox">
[StyleBox] displayed when the [PopupMenu] item is hovered.
</theme_item>
@@ -681,7 +761,10 @@
[StyleBox] used for the separators. See [method add_separator].
</theme_item>
<theme_item name="submenu" type="Texture2D">
- [Texture2D] icon for the submenu arrow.
+ [Texture2D] icon for the submenu arrow (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="submenu_mirrored" type="Texture2D">
+ [Texture2D] icon for the submenu arrow (for right-to-left layouts).
</theme_item>
<theme_item name="unchecked" type="Texture2D">
[Texture2D] icon for the unchecked checkbox items.
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 7e9bccc1d7..25943f6d47 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -4,7 +4,7 @@
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
<description>
- Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [CapsuleMesh], [CubeMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh].
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index c957d6f182..c05cbf4413 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -35,5 +35,8 @@
<theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )">
The color of the text's shadow.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code].
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 96d71db383..e856d1ea9c 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -96,7 +96,21 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Converts a localized path ([code]res://[/code]) to a full native OS path.
+ Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path].
+ [b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:
+ [codeblock]
+ var path = ""
+ if OS.has_feature("editor"):
+ # Running from an editor binary.
+ # `path` will contain the absolute path to `hello.txt` located in the project root.
+ path = ProjectSettings.globalize_path("res://hello.txt")
+ else:
+ # Running from an exported project.
+ # `path` will contain the absolute path to `hello.txt` next to the executable.
+ # This is *not* identical to using `ProjectSettings.globalize_path()` with a `res://` path,
+ # but is close enough in spirit.
+ path = OS.get_executable_path().get_base_dir().plus_file("hello.txt")
+ [/codeblock]
</description>
</method>
<method name="has_setting" qualifiers="const">
@@ -129,7 +143,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
- Convert a path to a localized path ([code]res://[/code] path).
+ Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [code]path[/code]. See also [method globalize_path].
</description>
</method>
<method name="property_can_revert">
@@ -255,6 +269,14 @@
<member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables printing to standard output in an exported build.
</member>
+ <member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging.
+ When running a project, this setting must be enabled if you want logs to be collected by service managers such as systemd/journalctl. This setting is disabled by default on release builds, since flushing on every printed line will negatively affect performance if lots of lines are printed in a rapid succession. Also, if this setting is enabled, logged files will still be written successfully if the application crashes or is otherwise killed by the user (without being closed "normally").
+ [b]Note:[/b] Regardless of this setting, the standard error stream ([code]stderr[/code]) is always flushed when a line is printed to it.
+ </member>
+ <member name="application/run/flush_stdout_on_print.debug" type="bool" setter="" getter="" default="true">
+ Debug build override for [member application/run/flush_stdout_on_print], as performance is less important during debugging.
+ </member>
<member name="application/run/frame_delay_msec" type="int" setter="" getter="" default="0">
Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization.
</member>
@@ -453,6 +475,9 @@
<member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true">
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
</member>
+ <member name="display/window/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false">
+ Force layout direction and text writing direction to RTL for all locales.
+ </member>
<member name="display/window/handheld/orientation" type="String" setter="" getter="" default="&quot;landscape&quot;">
Default orientation on mobile devices.
</member>
@@ -491,6 +516,9 @@
<member name="display/window/tablet_driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
</member>
+ <member name="display/window/text_name" type="String" setter="" getter="" default="&quot;&quot;">
+ Specifies the [TextServer] to use. If left empty, the default will be used.
+ </member>
<member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5).
</member>
@@ -1064,6 +1092,10 @@
</member>
<member name="rendering/quality/2d/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
+ <member name="rendering/quality/2d_sdf/oversize" type="int" setter="" getter="" default="1">
+ </member>
+ <member name="rendering/quality/2d_sdf/scale" type="int" setter="" getter="" default="1">
+ </member>
<member name="rendering/quality/2d_shadow_atlas/size" type="int" setter="" getter="" default="2048">
</member>
<member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
@@ -1208,11 +1240,26 @@
<member name="rendering/quality/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
Lower-end override for [member rendering/quality/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
</member>
+ <member name="rendering/quality/ssao/adaptive_target" type="float" setter="" getter="" default="0.5">
+ Quality target to use when [member rendering/quality/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance.
+ </member>
+ <member name="rendering/quality/ssao/blur_passes" type="int" setter="" getter="" default="2">
+ Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
+ </member>
+ <member name="rendering/quality/ssao/fadeout_from" type="float" setter="" getter="" default="50.0">
+ Distance at which the screen-space ambient occlusion effect starts to fade out. Use this hide ambient occlusion at great distances.
+ </member>
+ <member name="rendering/quality/ssao/fadeout_to" type="float" setter="" getter="" default="300.0">
+ Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances.
+ </member>
<member name="rendering/quality/ssao/half_size" type="bool" setter="" getter="" default="false">
If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details.
</member>
- <member name="rendering/quality/ssao/quality" type="int" setter="" getter="" default="1">
- Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance.
+ <member name="rendering/quality/ssao/half_size.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/quality/ssao/half_size] on mobile devices, due to performance concerns.
+ </member>
+ <member name="rendering/quality/ssao/quality" type="int" setter="" getter="" default="2">
+ Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/quality/ssao/adaptive_target] setting.
</member>
<member name="rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml
index 1714c1ec8d..512d55c9a0 100644
--- a/doc/classes/ProximityGroup3D.xml
+++ b/doc/classes/ProximityGroup3D.xml
@@ -12,7 +12,7 @@
<method name="broadcast">
<return type="void">
</return>
- <argument index="0" name="name" type="String">
+ <argument index="0" name="method" type="String">
</argument>
<argument index="1" name="parameters" type="Variant">
</argument>
@@ -30,7 +30,7 @@
</members>
<signals>
<signal name="broadcast">
- <argument index="0" name="group_name" type="String">
+ <argument index="0" name="method" type="String">
</argument>
<argument index="1" name="parameters" type="Array">
</argument>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 5932a624f2..425e82c744 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -92,10 +92,10 @@
</argument>
<argument index="2" name="post_b" type="Quat">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code].
+ Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code].
</description>
</method>
<method name="dot">
@@ -218,6 +218,14 @@
<description>
</description>
</method>
+ <method name="operator -" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="Quat">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="operator /" qualifiers="operator">
<return type="Quat">
</return>
@@ -253,9 +261,9 @@
<method name="slerp">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="to" type="Quat">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code].
@@ -265,9 +273,9 @@
<method name="slerpni">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="to" type="Quat">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees.
diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml
index 664d4cadff..e41ddff368 100644
--- a/doc/classes/RDTextureFormat.xml
+++ b/doc/classes/RDTextureFormat.xml
@@ -37,7 +37,7 @@
</member>
<member name="samples" type="int" setter="set_samples" getter="get_samples" enum="RenderingDevice.TextureSamples" default="0">
</member>
- <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.TextureType" default="1">
+ <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="RenderingDevice.TextureType" default="1">
</member>
<member name="usage_bits" type="int" setter="set_usage_bits" getter="get_usage_bits" default="0">
</member>
diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml
index e5bace32af..bc8a21e985 100644
--- a/doc/classes/RDUniform.xml
+++ b/doc/classes/RDUniform.xml
@@ -31,7 +31,7 @@
<members>
<member name="binding" type="int" setter="set_binding" getter="get_binding" default="0">
</member>
- <member name="type" type="int" setter="set_type" getter="get_type" enum="RenderingDevice.UniformType" default="3">
+ <member name="uniform_type" type="int" setter="set_uniform_type" getter="get_uniform_type" enum="RenderingDevice.UniformType" default="3">
</member>
</members>
<constants>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index dcb75dc275..6312cd18aa 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -13,6 +13,7 @@
rng.randomize()
var my_random_number = rng.randf_range(-10.0, 10.0)
[/codeblock]
+ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
<link title="Random number generation">https://docs.godotengine.org/en/latest/tutorials/math/random_number_generation.html</link>
@@ -75,9 +76,26 @@
</methods>
<members>
<member name="seed" type="int" setter="set_seed" getter="get_seed" default="0">
- The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers.
+ Initializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers.
[b]Note:[/b] The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally.
- [b]Note:[/b] The default value of this property is pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
+ [b]Note:[/b] Setting this property produces a side effect of changing the internal [member state], so make sure to initialize the seed [i]before[/i] modifying the [member state]:
+ [codeblock]
+ var rng = RandomNumberGenerator.new()
+ rng.seed = hash("Godot")
+ rng.state = 100 # Restore to some previously saved state.
+ [/codeblock]
+ </member>
+ <member name="state" type="int" setter="set_state" getter="get_state" default="0">
+ The current state of the random number generator. Save and restore this property to restore the generator to a previous state:
+ [codeblock]
+ var rng = RandomNumberGenerator.new()
+ print(rng.randf())
+ var saved_state = rng.state # Store current state.
+ print(rng.randf()) # Advance internal state.
+ rng.state = saved_state # Restore the state.
+ print(rng.randf()) # Prints the same value as in previous.
+ [/codeblock]
+ [b]Note:[/b] Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [member seed] instead.
</member>
</members>
<constants>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 02a77a0e24..3d2852f393 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -72,13 +72,14 @@
Returns a [Rect2] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
</description>
</method>
- <method name="clip">
+ <method name="intersection">
<return type="Rect2">
</return>
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns the intersection of this [Rect2] and b.
+ Returns the intersection of this [Rect2] and [code]b[/code].
+ If the rectangles do not intersect, an empty [Rect2] is returned.
</description>
</method>
<method name="encloses">
@@ -109,10 +110,10 @@
<method name="grow">
<return type="Rect2">
</return>
- <argument index="0" name="by" type="float">
+ <argument index="0" name="amount" type="float">
</argument>
<description>
- Returns a copy of the [Rect2] grown a given amount of units towards all the sides.
+ Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on all sides.
</description>
</method>
<method name="grow_individual">
@@ -127,18 +128,18 @@
<argument index="3" name="bottom" type="float">
</argument>
<description>
- Returns a copy of the [Rect2] grown a given amount of units towards each direction individually.
+ Returns a copy of the [Rect2] grown by the specified amount on each side individually.
</description>
</method>
- <method name="grow_margin">
+ <method name="grow_side">
<return type="Rect2">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
- <argument index="1" name="by" type="float">
+ <argument index="1" name="amount" type="float">
</argument>
<description>
- Returns a copy of the [Rect2] grown a given amount of units towards the [enum Margin] direction.
+ Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on the specified [enum Side].
</description>
</method>
<method name="has_no_area">
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index e8b75a6ac6..66e5dae78a 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -70,13 +70,14 @@
Returns a [Rect2i] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive.
</description>
</method>
- <method name="clip">
+ <method name="intersection">
<return type="Rect2i">
</return>
<argument index="0" name="b" type="Rect2i">
</argument>
<description>
- Returns the intersection of this [Rect2i] and b.
+ Returns the intersection of this [Rect2i] and [code]b[/code].
+ If the rectangles do not intersect, an empty [Rect2i] is returned.
</description>
</method>
<method name="encloses">
@@ -107,10 +108,10 @@
<method name="grow">
<return type="Rect2i">
</return>
- <argument index="0" name="by" type="int">
+ <argument index="0" name="amount" type="int">
</argument>
<description>
- Returns a copy of the [Rect2i] grown a given amount of units towards all the sides.
+ Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on all sides.
</description>
</method>
<method name="grow_individual">
@@ -125,18 +126,18 @@
<argument index="3" name="bottom" type="int">
</argument>
<description>
- Returns a copy of the [Rect2i] grown a given amount of units towards each direction individually.
+ Returns a copy of the [Rect2i] grown by the specified amount on each side individually.
</description>
</method>
- <method name="grow_margin">
+ <method name="grow_side">
<return type="Rect2i">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
- <argument index="1" name="by" type="int">
+ <argument index="1" name="amount" type="int">
</argument>
<description>
- Returns a copy of the [Rect2i] grown a given amount of units towards the [enum Margin] direction.
+ Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on the specified [enum Side].
</description>
</method>
<method name="has_no_area">
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index 041416a24b..8e37fbad6f 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -13,8 +13,8 @@
<methods>
</methods>
<members>
- <member name="extents" type="Vector2" setter="set_extents" getter="get_extents" default="Vector2( 10, 10 )">
- The rectangle's half extents. The width and height of this shape is twice the half extents.
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 20, 20 )">
+ The rectangle's width and height.
</member>
</members>
<constants>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 22a9925d4b..036b50f0ed 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -537,17 +537,6 @@
Sets the shape of the occluder polygon.
</description>
</method>
- <method name="canvas_occluder_polygon_set_shape_as_lines">
- <return type="void">
- </return>
- <argument index="0" name="occluder_polygon" type="RID">
- </argument>
- <argument index="1" name="shape" type="PackedVector2Array">
- </argument>
- <description>
- Sets the shape of the occluder polygon as lines.
- </description>
- </method>
<method name="canvas_set_item_mirroring">
<return type="void">
</return>
@@ -608,7 +597,9 @@
</argument>
<argument index="4" name="saturation" type="float">
</argument>
- <argument index="5" name="ramp" type="RID">
+ <argument index="5" name="use_1d_color_correction" type="bool">
+ </argument>
+ <argument index="6" name="color_correction" type="RID">
</argument>
<description>
Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details.
@@ -774,17 +765,20 @@
</argument>
<argument index="3" name="intensity" type="float">
</argument>
- <argument index="4" name="bias" type="float">
+ <argument index="4" name="power" type="float">
</argument>
- <argument index="5" name="light_affect" type="float">
+ <argument index="5" name="detail" type="float">
</argument>
- <argument index="6" name="ao_channel_affect" type="float">
+ <argument index="6" name="horizon" type="float">
</argument>
- <argument index="7" name="blur" type="int" enum="RenderingServer.EnvironmentSSAOBlur">
+ <argument index="7" name="sharpness" type="float">
</argument>
- <argument index="8" name="bilateral_sharpness" type="float">
+ <argument index="8" name="light_affect" type="float">
+ </argument>
+ <argument index="9" name="ao_channel_affect" type="float">
</argument>
<description>
+ Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details.
</description>
</method>
<method name="environment_set_ssr">
@@ -1423,6 +1417,17 @@
Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options.
</description>
</method>
+ <method name="light_directional_set_sky_only">
+ <return type="void">
+ </return>
+ <argument index="0" name="light" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon.
+ </description>
+ </method>
<method name="light_omni_set_shadow_mode">
<return type="void">
</return>
@@ -1612,25 +1617,6 @@
Sets a shader material's shader.
</description>
</method>
- <method name="mesh_add_surface_from_arrays">
- <return type="void">
- </return>
- <argument index="0" name="mesh" type="RID">
- </argument>
- <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType">
- </argument>
- <argument index="2" name="arrays" type="Array">
- </argument>
- <argument index="3" name="blend_shapes" type="Array" default="[ ]">
- </argument>
- <argument index="4" name="lods" type="Dictionary" default="{
-}">
- </argument>
- <argument index="5" name="compress_format" type="int" default="31744">
- </argument>
- <description>
- </description>
- </method>
<method name="mesh_clear">
<return type="void">
</return>
@@ -1729,32 +1715,46 @@
Returns a mesh's surface's arrays for blend shapes.
</description>
</method>
- <method name="mesh_surface_get_format_offset" qualifiers="const">
+ <method name="mesh_surface_get_format_attribute_stride" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="format" type="int">
</argument>
- <argument index="1" name="vertex_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="mesh_surface_get_format_offset" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="format" type="int">
</argument>
- <argument index="2" name="index_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
</argument>
- <argument index="3" name="array_index" type="int">
+ <argument index="2" name="array_index" type="int">
</argument>
<description>
- Function is unused in Godot 3.x.
</description>
</method>
- <method name="mesh_surface_get_format_stride" qualifiers="const">
+ <method name="mesh_surface_get_format_skin_stride" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="format" type="int">
</argument>
- <argument index="1" name="vertex_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="mesh_surface_get_format_vertex_stride" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="format" type="int">
</argument>
- <argument index="2" name="index_len" type="int">
+ <argument index="1" name="vertex_count" type="int">
</argument>
<description>
- Function is unused in Godot 3.x.
</description>
</method>
<method name="mesh_surface_get_material" qualifiers="const">
@@ -3071,16 +3071,24 @@
<constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
Array is an UV coordinates array for the second UV coordinates.
</constant>
- <constant name="ARRAY_BONES" value="6" enum="ArrayType">
+ <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType">
+ </constant>
+ <constant name="ARRAY_BONES" value="10" enum="ArrayType">
Array contains bone information.
</constant>
- <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
+ <constant name="ARRAY_WEIGHTS" value="11" enum="ArrayType">
Array is weight information.
</constant>
- <constant name="ARRAY_INDEX" value="8" enum="ArrayType">
+ <constant name="ARRAY_INDEX" value="12" enum="ArrayType">
Array is index array.
</constant>
- <constant name="ARRAY_MAX" value="9" enum="ArrayType">
+ <constant name="ARRAY_MAX" value="13" enum="ArrayType">
Represents the size of the [enum ArrayType] enum.
</constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat">
@@ -3101,40 +3109,45 @@
<constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat">
Flag used to mark an UV coordinates array for the second UV coordinates.
</constant>
- <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat">
Flag used to mark a bone information array.
</constant>
- <constant name="ARRAY_FORMAT_WEIGHTS" value="128" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat">
Flag used to mark a weights array.
</constant>
- <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat">
+ <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat">
Flag used to mark an index array.
</constant>
- <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
- Flag used to mark a compressed (half float) normal array.
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TANGENT" value="2048" enum="ArrayFormat">
- Flag used to mark a compressed (half float) tangent array.
+ <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_COLOR" value="4096" enum="ArrayFormat">
- Flag used to mark a compressed (half float) color array.
+ <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array.
+ <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat">
- Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates.
+ <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
- Flag used to mark a compressed index array.
+ <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_DEFAULT" value="31744" enum="ArrayFormat">
- Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly.
+ <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat">
+ <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat">
Flag used to mark that the array contains 2D vertices.
</constant>
- <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="1048576" enum="ArrayFormat">
+ <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
+ </constant>
+ <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
</constant>
<constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType">
Primitive to draw consists of points.
@@ -3489,29 +3502,20 @@
</constant>
<constant name="ENV_SSR_ROUGNESS_QUALITY_HIGH" value="3" enum="EnvironmentSSRRoughnessQuality">
</constant>
- <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur">
- Disables the blur set for SSAO. Will make SSAO look noisier.
- </constant>
- <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur">
- Perform a 1x1 blur on the SSAO output.
- </constant>
- <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur">
- Performs a 2x2 blur on the SSAO output.
- </constant>
- <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur">
- Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO.
- </constant>
- <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality">
+ <constant name="ENV_SSAO_QUALITY_VERY_LOW" value="0" enum="EnvironmentSSAOQuality">
Lowest quality of screen space ambient occlusion.
</constant>
- <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality">
+ <constant name="ENV_SSAO_QUALITY_LOW" value="1" enum="EnvironmentSSAOQuality">
+ Low quality screen space ambient occlusion.
+ </constant>
+ <constant name="ENV_SSAO_QUALITY_MEDIUM" value="2" enum="EnvironmentSSAOQuality">
Medium quality screen space ambient occlusion.
</constant>
- <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality">
+ <constant name="ENV_SSAO_QUALITY_HIGH" value="3" enum="EnvironmentSSAOQuality">
High quality screen space ambient occlusion.
</constant>
- <constant name="ENV_SSAO_QUALITY_ULTRA" value="3" enum="EnvironmentSSAOQuality">
- Highest quality screen space ambient occlusion.
+ <constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality">
+ Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality.
</constant>
<constant name="SUB_SURFACE_SCATTERING_QUALITY_DISABLED" value="0" enum="SubSurfaceScatteringQuality">
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 1ce2c376dd..54984b7785 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -76,6 +76,7 @@
<signal name="changed">
<description>
Emitted whenever the resource changes.
+ [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself.
</description>
</signal>
</signals>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 049613fa5d..c55a51c7ae 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -20,7 +20,7 @@
</argument>
<description>
Returns whether a recognized resource exists for the given [code]path[/code].
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
+ An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
</description>
</method>
<method name="get_dependencies">
@@ -63,7 +63,7 @@
<description>
Loads a resource at the given [code]path[/code], caching the result for further access.
The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
- An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
+ An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image].
If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists.
Returns an empty resource if no [ResourceFormatLoader] could handle the file.
GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index faf0d97766..0fd440fa75 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -25,6 +25,8 @@
</argument>
<argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
+ <argument index="4" name="inline_align" type="int" enum="VAlign" default="0">
+ </argument>
<description>
Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image.
If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
@@ -132,15 +134,6 @@
Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods.
</description>
</method>
- <method name="push_align">
- <return type="void">
- </return>
- <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
- </argument>
- <description>
- Adds an [code][align][/code] tag based on the given [code]align[/code] value. See [enum Align] for possible values.
- </description>
- </method>
<method name="push_bold">
<return type="void">
</return>
@@ -180,6 +173,24 @@
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
</description>
</method>
+ <method name="push_font_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="opentype_features" type="Dictionary">
+ </argument>
+ <description>
+ Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration.
+ </description>
+ </method>
+ <method name="push_font_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="font_size" type="int">
+ </argument>
+ <description>
+ Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
+ </description>
+ </method>
<method name="push_indent">
<return type="void">
</return>
@@ -199,10 +210,14 @@
<method name="push_list">
<return type="void">
</return>
- <argument index="0" name="type" type="int" enum="RichTextLabel.ListType">
+ <argument index="0" name="level" type="int">
+ </argument>
+ <argument index="1" name="type" type="int" enum="RichTextLabel.ListType">
+ </argument>
+ <argument index="2" name="capitalize" type="bool">
</argument>
<description>
- Adds a [code][list][/code] tag to the tag stack. Similar to the BBCodes [code][ol][/code] or [code][ul][/code], but supports more list types. Not fully implemented!
+ Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length.
</description>
</method>
<method name="push_meta">
@@ -228,6 +243,39 @@
Adds a [code][font][/code] tag with a normal font to the tag stack.
</description>
</method>
+ <method name="push_outline_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
+ </description>
+ </method>
+ <method name="push_outline_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="outline_size" type="int">
+ </argument>
+ <description>
+ Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
+ </description>
+ </method>
+ <method name="push_paragraph">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
+ </argument>
+ <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0">
+ </argument>
+ <argument index="2" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0">
+ </argument>
+ <description>
+ Adds a [code][p][/code] tag to the tag stack.
+ </description>
+ </method>
<method name="push_strikethrough">
<return type="void">
</return>
@@ -240,8 +288,10 @@
</return>
<argument index="0" name="columns" type="int">
</argument>
+ <argument index="1" name="inline_align" type="int" enum="VAlign" default="0">
+ </argument>
<description>
- Adds a [code][table=columns][/code] tag to the tag stack.
+ Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
</description>
</method>
<method name="push_underline">
@@ -270,6 +320,46 @@
Scrolls the window's top line to match [code]line[/code].
</description>
</method>
+ <method name="set_cell_border_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Sets color of a table cell border.
+ </description>
+ </method>
+ <method name="set_cell_padding">
+ <return type="void">
+ </return>
+ <argument index="0" name="padding" type="Rect2">
+ </argument>
+ <description>
+ Sets inner padding of a table cell.
+ </description>
+ </method>
+ <method name="set_cell_row_background_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="odd_row_bg" type="Color">
+ </argument>
+ <argument index="1" name="even_row_bg" type="Color">
+ </argument>
+ <description>
+ Sets color of a table cell. Separate colors for alternating rows can be specified.
+ </description>
+ </method>
+ <method name="set_cell_size_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="min_size" type="Vector2">
+ </argument>
+ <argument index="1" name="max_size" type="Vector2">
+ </argument>
+ <description>
+ Sets minimum and maximum size overrides for a table cell.
+ </description>
+ </method>
<method name="set_table_column_expand">
<return type="void">
</return>
@@ -302,6 +392,9 @@
If [code]true[/code], the label's height will be automatically updated to fit its content.
[b]Note:[/b] This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions.
</member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
</member>
@@ -322,6 +415,12 @@
<member name="selection_enabled" type="bool" setter="set_selection_enabled" getter="is_selection_enabled" default="false">
If [code]true[/code], the label allows text selection.
</member>
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ Set additional options for BiDi override.
+ </member>
<member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4">
The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags.
</member>
@@ -329,6 +428,9 @@
The raw text of the label.
When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text].
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1">
The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed.
</member>
@@ -375,7 +477,10 @@
<constant name="LIST_LETTERS" value="1" enum="ListType">
Each list item has a letter marker.
</constant>
- <constant name="LIST_DOTS" value="2" enum="ListType">
+ <constant name="LIST_ROMAN" value="2" enum="ListType">
+ Each list item has a roman number marker.
+ </constant>
+ <constant name="LIST_DOTS" value="3" enum="ListType">
Each list item has a filled circle marker.
</constant>
<constant name="ITEM_FRAME" value="0" enum="ItemType">
@@ -388,42 +493,56 @@
</constant>
<constant name="ITEM_FONT" value="4" enum="ItemType">
</constant>
- <constant name="ITEM_COLOR" value="5" enum="ItemType">
+ <constant name="ITEM_FONT_SIZE" value="5" enum="ItemType">
+ </constant>
+ <constant name="ITEM_FONT_FEATURES" value="6" enum="ItemType">
</constant>
- <constant name="ITEM_UNDERLINE" value="6" enum="ItemType">
+ <constant name="ITEM_COLOR" value="7" enum="ItemType">
</constant>
- <constant name="ITEM_STRIKETHROUGH" value="7" enum="ItemType">
+ <constant name="ITEM_OUTLINE_SIZE" value="8" enum="ItemType">
</constant>
- <constant name="ITEM_ALIGN" value="8" enum="ItemType">
+ <constant name="ITEM_OUTLINE_COLOR" value="9" enum="ItemType">
</constant>
- <constant name="ITEM_INDENT" value="9" enum="ItemType">
+ <constant name="ITEM_UNDERLINE" value="10" enum="ItemType">
</constant>
- <constant name="ITEM_LIST" value="10" enum="ItemType">
+ <constant name="ITEM_STRIKETHROUGH" value="11" enum="ItemType">
</constant>
- <constant name="ITEM_TABLE" value="11" enum="ItemType">
+ <constant name="ITEM_PARAGRAPH" value="12" enum="ItemType">
</constant>
- <constant name="ITEM_FADE" value="12" enum="ItemType">
+ <constant name="ITEM_INDENT" value="13" enum="ItemType">
</constant>
- <constant name="ITEM_SHAKE" value="13" enum="ItemType">
+ <constant name="ITEM_LIST" value="14" enum="ItemType">
</constant>
- <constant name="ITEM_WAVE" value="14" enum="ItemType">
+ <constant name="ITEM_TABLE" value="15" enum="ItemType">
</constant>
- <constant name="ITEM_TORNADO" value="15" enum="ItemType">
+ <constant name="ITEM_FADE" value="16" enum="ItemType">
</constant>
- <constant name="ITEM_RAINBOW" value="16" enum="ItemType">
+ <constant name="ITEM_SHAKE" value="17" enum="ItemType">
</constant>
- <constant name="ITEM_CUSTOMFX" value="18" enum="ItemType">
+ <constant name="ITEM_WAVE" value="18" enum="ItemType">
</constant>
- <constant name="ITEM_META" value="17" enum="ItemType">
+ <constant name="ITEM_TORNADO" value="19" enum="ItemType">
+ </constant>
+ <constant name="ITEM_RAINBOW" value="20" enum="ItemType">
+ </constant>
+ <constant name="ITEM_CUSTOMFX" value="22" enum="ItemType">
+ </constant>
+ <constant name="ITEM_META" value="21" enum="ItemType">
</constant>
</constants>
<theme_items>
<theme_item name="bold_font" type="Font">
The font used for bold text.
</theme_item>
+ <theme_item name="bold_font_size" type="int">
+ The font size used for bold text.
+ </theme_item>
<theme_item name="bold_italics_font" type="Font">
The font used for bold italics text.
</theme_item>
+ <theme_item name="bold_italics_font_size" type="int">
+ The font size used for bold italics text.
+ </theme_item>
<theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )">
The default text color.
</theme_item>
@@ -439,18 +558,27 @@
<theme_item name="italics_font" type="Font">
The font used for italics text.
</theme_item>
+ <theme_item name="italics_font_size" type="int">
+ The font size used for italics text.
+ </theme_item>
<theme_item name="line_separation" type="int" default="1">
The vertical space between lines.
</theme_item>
<theme_item name="mono_font" type="Font">
The font used for monospace text.
</theme_item>
+ <theme_item name="mono_font_size" type="int">
+ The font size used for monospace text.
+ </theme_item>
<theme_item name="normal" type="StyleBox">
The normal background for the [RichTextLabel].
</theme_item>
<theme_item name="normal_font" type="Font">
The default text font.
</theme_item>
+ <theme_item name="normal_font_size" type="int">
+ The default text font size.
+ </theme_item>
<theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )">
The color of the selection box.
</theme_item>
@@ -463,9 +591,18 @@
<theme_item name="shadow_offset_y" type="int" default="1">
The vertical offset of the font's shadow.
</theme_item>
+ <theme_item name="table_border" type="Color" default="Color( 0, 0, 0, 0 )">
+ The default cell border color.
+ </theme_item>
+ <theme_item name="table_even_row_bg" type="Color" default="Color( 0, 0, 0, 0 )">
+ The default background color for even rows.
+ </theme_item>
<theme_item name="table_hseparation" type="int" default="3">
The horizontal separation of elements in a table.
</theme_item>
+ <theme_item name="table_odd_row_bg" type="Color" default="Color( 0, 0, 0, 0 )">
+ The default background color for odd rows.
+ </theme_item>
<theme_item name="table_vseparation" type="int" default="3">
The vertical separation of elements in a table.
</theme_item>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 6f41d5ba27..2a0b44f3f3 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -174,9 +174,6 @@
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
</member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
- The body's weight based on its mass and the [b]Default Gravity[/b] value in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b].
- </member>
</members>
<signals>
<signal name="body_entered">
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index f8dc9887a9..21321d4de0 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -198,9 +198,6 @@
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
</member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
- The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b].
- </member>
</members>
<signals>
<signal name="body_entered">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index a95ce6c663..5fc1d0b895 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -45,6 +45,7 @@
<description>
Changes the running scene to the one at the given [code]path[/code], after loading it into a [PackedScene] and creating a new instance.
Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [code]path[/code] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated.
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene] call.
</description>
</method>
<method name="change_scene_to">
@@ -55,6 +56,7 @@
<description>
Changes the running scene to a new instance of the given [PackedScene].
Returns [constant OK] on success or [constant ERR_CANT_CREATE] if the scene cannot be instantiated.
+ [b]Note:[/b] The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [method change_scene_to] call.
</description>
</method>
<method name="create_timer">
diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml
index efd6353e3c..ef9c9a48b6 100644
--- a/doc/classes/SliderJoint3D.xml
+++ b/doc/classes/SliderJoint3D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SliderJoint3D" inherits="Joint3D" version="4.0">
<brief_description>
- Piston kind of slider between two bodies in 3D.
+ Slider between two PhysicsBodies in 3D.
</brief_description>
<description>
- Slides across the X axis of the pivot object.
+ Slides across the X axis of the pivot object. See also [Generic6DOFJoint3D].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 4ee9dbf1f9..cbaf1196e3 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -135,7 +135,7 @@
Returns a copy of the string with indentation (leading tabs and spaces) removed.
</description>
</method>
- <method name="empty">
+ <method name="is_empty">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 04f8eb9d13..525dba0549 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -39,19 +39,19 @@
<method name="get_default_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the default value of the specified [enum Margin].
+ Returns the default margin of the specified [enum Side].
</description>
</method>
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the content margin offset for the specified [enum Margin].
+ Returns the content margin offset for the specified [enum Side].
Positive values reduce size inwards, unlike [Control]'s margin values.
</description>
</method>
@@ -72,12 +72,12 @@
<method name="set_default_margin">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="offset" type="float">
</argument>
<description>
- Sets the default value of the specified [enum Margin] to given [code]offset[/code] in pixels.
+ Sets the default value of the specified [enum Side] to [code]offset[/code] pixels.
</description>
</method>
<method name="test_mask" qualifiers="const">
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index d6e737b076..71f227dfb0 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -27,10 +27,10 @@
<method name="get_border_width" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values.
+ Returns the specified [enum Side]'s border width.
</description>
</method>
<method name="get_border_width_min" qualifiers="const">
@@ -52,21 +52,21 @@
<method name="get_expand_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
+ Returns the size of the specified [enum Side]'s expand margin.
</description>
</method>
<method name="set_border_width">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="width" type="int">
</argument>
<description>
- Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
+ Sets the specified [enum Side]'s border width to [code]width[/code] pixels.
</description>
</method>
<method name="set_border_width_all">
@@ -75,7 +75,7 @@
<argument index="0" name="width" type="int">
</argument>
<description>
- Sets the border width to [code]width[/code] pixels for all margins.
+ Sets the border width to [code]width[/code] pixels for all sides.
</description>
</method>
<method name="set_corner_radius">
@@ -116,12 +116,12 @@
<method name="set_expand_margin">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
<description>
- Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
+ Sets the expand margin to [code]size[/code] pixels for the specified [enum Side].
</description>
</method>
<method name="set_expand_margin_all">
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 6f5577b61b..5b17f25978 100644
--- a/doc/classes/StyleBoxTexture.xml
+++ b/doc/classes/StyleBoxTexture.xml
@@ -12,19 +12,19 @@
<method name="get_expand_margin_size" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values.
+ Returns the expand margin size of the specified [enum Side].
</description>
</method>
<method name="get_margin_size" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
- Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values.
+ Returns the margin size of the specified [enum Side].
</description>
</method>
<method name="set_expand_margin_all">
@@ -54,23 +54,23 @@
<method name="set_expand_margin_size">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
<description>
- Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
+ Sets the expand margin to [code]size[/code] pixels for the specified [enum Side].
</description>
</method>
<method name="set_margin_size">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="size" type="float">
</argument>
<description>
- Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values.
+ Sets the margin to [code]size[/code] pixels for the specified [enum Side].
</description>
</method>
</methods>
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index 4736401395..376082f417 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -45,8 +45,8 @@
<constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
Never clear the render target.
</constant>
- <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode">
- Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER].
+ <constant name="CLEAR_MODE_ONCE" value="2" enum="ClearMode">
+ Clear the render target on the next frame, then switch to [constant CLEAR_MODE_NEVER].
</constant>
<constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
Do not update the render target.
@@ -58,7 +58,7 @@
Update the render target only when it is visible. This is the default value.
</constant>
<constant name="UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="UpdateMode">
- Update the render target only when the its parent is visible.
+ Update the render target only when its parent is visible.
</constant>
<constant name="UPDATE_ALWAYS" value="4" enum="UpdateMode">
Always update the render target.
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 4f02cd00dd..82ffe86251 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -8,11 +8,11 @@
[codeblock]
var st = SurfaceTool.new()
st.begin(Mesh.PRIMITIVE_TRIANGLES)
- st.add_color(Color(1, 0, 0))
- st.add_uv(Vector2(0, 0))
- st.add_vertex(Vector3(0, 0, 0))
+ st.set_color(Color(1, 0, 0))
+ st.set_uv(Vector2(0, 0))
+ st.set_vertex(Vector3(0, 0, 0))
[/codeblock]
- The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used.
+ The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used.
Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh.
Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices.
See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation.
@@ -22,25 +22,6 @@
<link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
- <method name="add_bones">
- <return type="void">
- </return>
- <argument index="0" name="bones" type="PackedInt32Array">
- </argument>
- <description>
- Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers.
- </description>
- </method>
- <method name="add_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- Specifies a [Color] for the next vertex to use.
- [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible.
- </description>
- </method>
<method name="add_index">
<return type="void">
</return>
@@ -50,15 +31,6 @@
Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
</description>
</method>
- <method name="add_normal">
- <return type="void">
- </return>
- <argument index="0" name="normal" type="Vector3">
- </argument>
- <description>
- Specifies a normal for the next vertex to use.
- </description>
- </method>
<method name="add_smooth_group">
<return type="void">
</return>
@@ -68,15 +40,6 @@
Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
</description>
</method>
- <method name="add_tangent">
- <return type="void">
- </return>
- <argument index="0" name="tangent" type="Plane">
- </argument>
- <description>
- Specifies a tangent for the next vertex to use.
- </description>
- </method>
<method name="add_triangle_fan">
<return type="void">
</return>
@@ -97,24 +60,6 @@
Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
- <method name="add_uv">
- <return type="void">
- </return>
- <argument index="0" name="uv" type="Vector2">
- </argument>
- <description>
- Specifies a set of UV coordinates to use for the next vertex.
- </description>
- </method>
- <method name="add_uv2">
- <return type="void">
- </return>
- <argument index="0" name="uv2" type="Vector2">
- </argument>
- <description>
- Specifies an optional second set of UV coordinates to use for the next vertex.
- </description>
- </method>
<method name="add_vertex">
<return type="void">
</return>
@@ -124,15 +69,6 @@
Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
</description>
</method>
- <method name="add_weights">
- <return type="void">
- </return>
- <argument index="0" name="weights" type="PackedFloat32Array">
- </argument>
- <description>
- Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values.
- </description>
- </method>
<method name="append_from">
<return type="void">
</return>
@@ -167,11 +103,11 @@
</return>
<argument index="0" name="existing" type="ArrayMesh" default="null">
</argument>
- <argument index="1" name="flags" type="int" default="31744">
+ <argument index="1" name="flags" type="int" default="0">
</argument>
<description>
Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
- Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags.
+ [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat].
</description>
</method>
<method name="commit_to_arrays">
@@ -229,6 +165,20 @@
Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already.
</description>
</method>
+ <method name="get_custom_format" qualifiers="const">
+ <return type="int" enum="SurfaceTool.CustomFormat">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_skin_weight_count" qualifiers="const">
+ <return type="int" enum="SurfaceTool.SkinWeightCount">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="index">
<return type="void">
</return>
@@ -236,6 +186,45 @@
Shrinks the vertex array by creating an index array (avoids reusing vertices).
</description>
</method>
+ <method name="set_bones">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="PackedInt32Array">
+ </argument>
+ <description>
+ Specifies an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers.
+ </description>
+ </method>
+ <method name="set_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
+ </argument>
+ <description>
+ Specifies a [Color] for the next vertex to use.
+ [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible.
+ </description>
+ </method>
+ <method name="set_custom">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="custom" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_custom_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_material">
<return type="void">
</return>
@@ -245,7 +234,82 @@
Sets [Material] to be used by the [Mesh] you are constructing.
</description>
</method>
+ <method name="set_normal">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal" type="Vector3">
+ </argument>
+ <description>
+ Specifies a normal for the next vertex to use.
+ </description>
+ </method>
+ <method name="set_skin_weight_count">
+ <return type="void">
+ </return>
+ <argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="tangent" type="Plane">
+ </argument>
+ <description>
+ Specifies a tangent for the next vertex to use.
+ </description>
+ </method>
+ <method name="set_uv">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv" type="Vector2">
+ </argument>
+ <description>
+ Specifies a set of UV coordinates to use for the next vertex.
+ </description>
+ </method>
+ <method name="set_uv2">
+ <return type="void">
+ </return>
+ <argument index="0" name="uv2" type="Vector2">
+ </argument>
+ <description>
+ Specifies an optional second set of UV coordinates to use for the next vertex.
+ </description>
+ </method>
+ <method name="set_weights">
+ <return type="void">
+ </return>
+ <argument index="0" name="weights" type="PackedFloat32Array">
+ </argument>
+ <description>
+ Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values.
+ </description>
+ </method>
</methods>
<constants>
+ <constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat">
+ </constant>
+ <constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
+ </constant>
+ <constant name="SKIN_4_WEIGHTS" value="0" enum="SkinWeightCount">
+ </constant>
+ <constant name="SKIN_8_WEIGHTS" value="1" enum="SkinWeightCount">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index d56781105b..c9ed1aaec9 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -149,6 +149,9 @@
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true">
If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden.
</member>
+ <member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false">
+ If [code]true[/code], all tabs are drawn in front of the panel. If [code]false[/code], inactive tabs are drawn behind the panel.
+ </member>
<member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false">
If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one.
</member>
@@ -204,6 +207,9 @@
<theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Font color of the currently selected tab.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the tab names.
+ </theme_item>
<theme_item name="icon_separation" type="int" default="4">
Space between tab's name and its icon.
</theme_item>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 15c2d3504c..47cf869fe9 100644
--- a/doc/classes/Tabs.xml
+++ b/doc/classes/Tabs.xml
@@ -20,6 +20,15 @@
Adds a new tab.
</description>
</method>
+ <method name="clear_tab_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features from the tab title.
+ </description>
+ </method>
<method name="ensure_tab_visible">
<return type="void">
</return>
@@ -75,6 +84,15 @@
Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D].
</description>
</method>
+ <method name="get_tab_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Returns tab title language code.
+ </description>
+ </method>
<method name="get_tab_offset" qualifiers="const">
<return type="int">
</return>
@@ -82,6 +100,17 @@
Returns the number of hidden tabs offsetted to the left.
</description>
</method>
+ <method name="get_tab_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the tab title.
+ </description>
+ </method>
<method name="get_tab_rect" qualifiers="const">
<return type="Rect2">
</return>
@@ -91,6 +120,15 @@
Returns tab [Rect2] with local position and size.
</description>
</method>
+ <method name="get_tab_text_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <description>
+ Returns tab title text base writing direction.
+ </description>
+ </method>
<method name="get_tab_title" qualifiers="const">
<return type="String">
</return>
@@ -159,6 +197,41 @@
Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code].
</description>
</method>
+ <method name="set_tab_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
+ <method name="set_tab_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="values" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the tab title. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
+ <method name="set_tab_text_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_idx" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets tab title base writing direction.
+ </description>
+ </method>
<method name="set_tab_title">
<return type="void">
</return>
@@ -226,14 +299,14 @@
Emitted when a tab is clicked, even if it is the current tab.
</description>
</signal>
- <signal name="tab_close">
+ <signal name="tab_closed">
<argument index="0" name="tab" type="int">
</argument>
<description>
Emitted when a tab is closed.
</description>
</signal>
- <signal name="tab_hover">
+ <signal name="tab_hovered">
<argument index="0" name="tab" type="int">
</argument>
<description>
@@ -295,6 +368,9 @@
<theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Font color of the currently selected tab.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the tab names.
+ </theme_item>
<theme_item name="hseparation" type="int" default="4">
The horizontal separation between the tabs.
</theme_item>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 168cc8a1c3..eedf3b848f 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -33,6 +33,13 @@
Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code].
</description>
</method>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
<method name="clear_undo_history">
<return type="void">
</return>
@@ -213,6 +220,15 @@
Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
</description>
</method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code].
+ </description>
+ </method>
<method name="get_selection_column" qualifiers="const">
<return type="int">
</return>
@@ -573,6 +589,17 @@
<description>
</description>
</method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="tag" type="String">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="set_selection_mode">
<return type="void">
</return>
@@ -629,6 +656,10 @@
If [code]true[/code], the caret displays as a rectangle.
If [code]false[/code], the caret displays as a bar.
</member>
+ <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false">
+ Allow moving caret, selecting and removing the individual composite character components.
+ Note: [kbd]Backspace[/kbd] is always removing individual composite character components.
+ </member>
<member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret" default="true">
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.
@@ -636,6 +667,9 @@
<member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true">
If [code]true[/code], a right-click displays the context menu.
</member>
+ <member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false">
+ If [code]true[/code], control characters are displayed.
+ </member>
<member name="draw_spaces" type="bool" setter="set_draw_spaces" getter="is_drawing_spaces" default="false">
If [code]true[/code], the "space" character will have a visible representation.
</member>
@@ -652,6 +686,9 @@
<member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled" default="false">
If [code]true[/code], the line containing the cursor is highlighted.
</member>
+ <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
+ Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </member>
<member name="minimap_draw" type="bool" setter="draw_minimap" getter="is_drawing_minimap" default="false">
If [code]true[/code], a minimap is shown, providing an outline of your source code.
</member>
@@ -681,11 +718,20 @@
<member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false">
If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling.
</member>
+ <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
+ Set BiDi algorithm override for the structured text.
+ </member>
+ <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[ ]">
+ Set additional options for BiDi override.
+ </member>
<member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [TextEdit].
</member>
+ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
+ Base text writing direction.
+ </member>
<member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0">
Vertical scroll sensitivity.
</member>
@@ -799,7 +845,70 @@
<constant name="MENU_REDO" value="6" enum="MenuItems">
Redoes the previous action.
</constant>
- <constant name="MENU_MAX" value="7" enum="MenuItems">
+ <constant name="MENU_DIR_INHERITED" value="7" enum="MenuItems">
+ Sets text direction to inherited.
+ </constant>
+ <constant name="MENU_DIR_AUTO" value="8" enum="MenuItems">
+ Sets text direction to automatic.
+ </constant>
+ <constant name="MENU_DIR_LTR" value="9" enum="MenuItems">
+ Sets text direction to left-to-right.
+ </constant>
+ <constant name="MENU_DIR_RTL" value="10" enum="MenuItems">
+ Sets text direction to right-to-left.
+ </constant>
+ <constant name="MENU_DISPLAY_UCC" value="11" enum="MenuItems">
+ Toggles control character display.
+ </constant>
+ <constant name="MENU_INSERT_LRM" value="12" enum="MenuItems">
+ Inserts left-to-right mark (LRM) character.
+ </constant>
+ <constant name="MENU_INSERT_RLM" value="13" enum="MenuItems">
+ Inserts right-to-left mark (RLM) character.
+ </constant>
+ <constant name="MENU_INSERT_LRE" value="14" enum="MenuItems">
+ Inserts start of left-to-right embedding (LRE) character.
+ </constant>
+ <constant name="MENU_INSERT_RLE" value="15" enum="MenuItems">
+ Inserts start of right-to-left embedding (RLE) character.
+ </constant>
+ <constant name="MENU_INSERT_LRO" value="16" enum="MenuItems">
+ Inserts start of left-to-right override (LRO) character.
+ </constant>
+ <constant name="MENU_INSERT_RLO" value="17" enum="MenuItems">
+ Inserts start of right-to-left override (RLO) character.
+ </constant>
+ <constant name="MENU_INSERT_PDF" value="18" enum="MenuItems">
+ Inserts pop direction formatting (PDF) character.
+ </constant>
+ <constant name="MENU_INSERT_ALM" value="19" enum="MenuItems">
+ Inserts Arabic letter mark (ALM) character.
+ </constant>
+ <constant name="MENU_INSERT_LRI" value="20" enum="MenuItems">
+ Inserts left-to-right isolate (LRI) character.
+ </constant>
+ <constant name="MENU_INSERT_RLI" value="21" enum="MenuItems">
+ Inserts right-to-left isolate (RLI) character.
+ </constant>
+ <constant name="MENU_INSERT_FSI" value="22" enum="MenuItems">
+ Inserts first strong isolate (FSI) character.
+ </constant>
+ <constant name="MENU_INSERT_PDI" value="23" enum="MenuItems">
+ Inserts pop direction isolate (PDI) character.
+ </constant>
+ <constant name="MENU_INSERT_ZWJ" value="24" enum="MenuItems">
+ Inserts zero width joiner (ZWJ) character.
+ </constant>
+ <constant name="MENU_INSERT_ZWNJ" value="25" enum="MenuItems">
+ Inserts zero width non-joiner (ZWNJ) character.
+ </constant>
+ <constant name="MENU_INSERT_WJ" value="26" enum="MenuItems">
+ Inserts word joiner (WJ) character.
+ </constant>
+ <constant name="MENU_INSERT_SHY" value="27" enum="MenuItems">
+ Inserts soft hyphen (SHY) character.
+ </constant>
+ <constant name="MENU_MAX" value="28" enum="MenuItems">
Represents the size of the [enum MenuItems] enum.
</constant>
</constants>
@@ -849,6 +958,9 @@
<theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Sets default font size.
+ </theme_item>
<theme_item name="line_spacing" type="int" default="4">
Sets the spacing between the lines.
</theme_item>
@@ -865,6 +977,7 @@
Sets the highlight [Color] of text selections.
</theme_item>
<theme_item name="space" type="Texture2D">
+ Sets a custom [Texture2D] for space text characters.
</theme_item>
<theme_item name="tab" type="Texture2D">
Sets a custom [Texture2D] for tab text characters.
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
new file mode 100644
index 0000000000..c21da09edb
--- /dev/null
+++ b/doc/classes/TextLine.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextLine" inherits="Reference" version="4.0">
+ <brief_description>
+ Holds a line of text.
+ </brief_description>
+ <description>
+ Abstraction over [TextServer] for handling single line of text.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="key" type="Variant">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <argument index="3" name="length" type="int" default="1">
+ </argument>
+ <description>
+ Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ </description>
+ </method>
+ <method name="add_string">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="fonts" type="Font">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <argument index="3" name="opentype_features" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="4" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Adds text span and font to draw it.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clears text line (removes text and inline objects).
+ </description>
+ </method>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="draw_outline" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="outline_size" type="int" default="1">
+ </argument>
+ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="get_line_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
+ </description>
+ </method>
+ <method name="get_line_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
+ </description>
+ </method>
+ <method name="get_line_underline_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="get_line_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns thickness of the underline.
+ </description>
+ </method>
+ <method name="get_line_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns width (for horizontal layout) or height (for vertical) of the text.
+ </description>
+ </method>
+ <method name="get_object_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="key" type="Variant">
+ </argument>
+ <description>
+ Returns bounding rectangle of the inline object.
+ </description>
+ </method>
+ <method name="get_objects" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns array of inline objects.
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Returns TextServer buffer RID.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns size of the bounding box of the text.
+ </description>
+ </method>
+ <method name="hit_test" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="coords" type="float">
+ </argument>
+ <description>
+ Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
+ </description>
+ </method>
+ <method name="resize_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="key" type="Variant">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <description>
+ Sets new size and alignment of embedded object.
+ </description>
+ </method>
+ <method name="set_bidi_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="override" type="Array">
+ </argument>
+ <description>
+ Overrides BiDi for the structured text.
+ Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
+ </description>
+ </method>
+ <method name="tab_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_stops" type="PackedFloat32Array">
+ </argument>
+ <description>
+ Aligns text to the given tab-stops.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
+ Text horizontal alignment.
+ </member>
+ <member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
+ Text writing direction.
+ </member>
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" default="3">
+ Line Alignment rules. For more info see [TextServer].
+ </member>
+ <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0">
+ Text orientation.
+ </member>
+ <member name="preserve_control" type="bool" setter="set_preserve_control" getter="get_preserve_control" default="false">
+ If set to [code]true[/code] text will display control characters.
+ </member>
+ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
+ If set to [code]true[/code] text will display invalid characters.
+ </member>
+ <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
+ Text line width.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml
new file mode 100644
index 0000000000..fabf22eef7
--- /dev/null
+++ b/doc/classes/TextParagraph.xml
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextParagraph" inherits="Reference" version="4.0">
+ <brief_description>
+ Holds a paragraph of text.
+ </brief_description>
+ <description>
+ Abstraction over [TextServer] for handling paragraph of text.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="key" type="Variant">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <argument index="3" name="length" type="int" default="1">
+ </argument>
+ <description>
+ Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ </description>
+ </method>
+ <method name="add_string">
+ <return type="bool">
+ </return>
+ <argument index="0" name="text" type="String">
+ </argument>
+ <argument index="1" name="fonts" type="Font">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <argument index="3" name="opentype_features" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="4" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Adds text span and font to draw it.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ Clears text paragraph (removes text and inline objects).
+ </description>
+ </method>
+ <method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="draw_line" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="line" type="int">
+ </argument>
+ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="draw_line_outline" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="Vector2">
+ </argument>
+ <argument index="2" name="line" type="int">
+ </argument>
+ <argument index="3" name="outline_size" type="int" default="1">
+ </argument>
+ <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw outline of the single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="draw_outline" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="outline_size" type="Vector2">
+ </argument>
+ <argument index="2" name="color" type="int" default="1">
+ </argument>
+ <argument index="3" name="arg3" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw outline of the text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box.
+ </description>
+ </method>
+ <method name="get_line_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
+ </description>
+ </method>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns number of lines in the paragraph.
+ </description>
+ </method>
+ <method name="get_line_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
+ </description>
+ </method>
+ <method name="get_line_object_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <argument index="1" name="key" type="Variant">
+ </argument>
+ <description>
+ Returns bounding rectangle of the inline object.
+ </description>
+ </method>
+ <method name="get_line_objects" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns array of inline objects in the line.
+ </description>
+ </method>
+ <method name="get_line_range" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns character range of the line.
+ </description>
+ </method>
+ <method name="get_line_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns TextServer line buffer RID.
+ </description>
+ </method>
+ <method name="get_line_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns size of the bounding box of the line of text.
+ </description>
+ </method>
+ <method name="get_line_underline_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="get_line_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns thickness of the underline.
+ </description>
+ </method>
+ <method name="get_line_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="line" type="int">
+ </argument>
+ <description>
+ Returns width (for horizontal layout) or height (for vertical) of the line of text.
+ </description>
+ </method>
+ <method name="get_non_wraped_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the size of the bounding box of the paragraph, without line breaks.
+ </description>
+ </method>
+ <method name="get_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Returns TextServer full string buffer RID.
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns the size of the bounding box of the paragraph.
+ </description>
+ </method>
+ <method name="hit_test" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="coords" type="Vector2">
+ </argument>
+ <description>
+ Returns caret character offset at the specified coordinates. This function always returns a valid position.
+ </description>
+ </method>
+ <method name="resize_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="key" type="Variant">
+ </argument>
+ <argument index="1" name="size" type="Vector2">
+ </argument>
+ <argument index="2" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <description>
+ Sets new size and alignment of embedded object.
+ </description>
+ </method>
+ <method name="set_bidi_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="override" type="Array">
+ </argument>
+ <description>
+ Overrides BiDi for the structured text.
+ Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
+ </description>
+ </method>
+ <method name="tab_align">
+ <return type="void">
+ </return>
+ <argument index="0" name="tab_stops" type="PackedFloat32Array">
+ </argument>
+ <description>
+ Aligns paragraph to the given tab-stops.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="align" type="int" setter="set_align" getter="get_align" enum="HAlign" default="0">
+ Paragraph horizontal alignment.
+ </member>
+ <member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
+ Text writing direction.
+ </member>
+ <member name="flags" type="int" setter="set_flags" getter="get_flags" default="51">
+ Line breaking and alignment rules. For more info see [TextServer].
+ </member>
+ <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0">
+ Text orientation.
+ </member>
+ <member name="preserve_control" type="bool" setter="set_preserve_control" getter="get_preserve_control" default="false">
+ If set to [code]true[/code] text will display control characters.
+ </member>
+ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true">
+ If set to [code]true[/code] text will display invalid characters.
+ </member>
+ <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0">
+ Paragraph width.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
new file mode 100644
index 0000000000..791646000b
--- /dev/null
+++ b/doc/classes/TextServer.xml
@@ -0,0 +1,1207 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextServer" inherits="Object" version="4.0">
+ <brief_description>
+ Interface for the fonts and complex text layouts.
+ </brief_description>
+ <description>
+ [TextServer] is the API backend for managing fonts, and rendering complex text.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="create_font_memory">
+ <return type="RID">
+ </return>
+ <argument index="0" name="data" type="PackedByteArray">
+ </argument>
+ <argument index="1" name="type" type="String">
+ </argument>
+ <argument index="2" name="base_size" type="int" default="16">
+ </argument>
+ <description>
+ Creates new font from the data in memory. To free the resulting font, use [method free_rid] method.
+ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ </description>
+ </method>
+ <method name="create_font_resource">
+ <return type="RID">
+ </return>
+ <argument index="0" name="filename" type="String">
+ </argument>
+ <argument index="1" name="base_size" type="int" default="16">
+ </argument>
+ <description>
+ Creates new font from the file. To free the resulting font, use [method free_rid] method.
+ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ </description>
+ </method>
+ <method name="create_font_system">
+ <return type="RID">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="base_size" type="int" default="16">
+ </argument>
+ <description>
+ Creates new font from the system font. To free the resulting font, use [method free_rid] method.
+ Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
+ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size.
+ </description>
+ </method>
+ <method name="create_shaped_text">
+ <return type="RID">
+ </return>
+ <argument index="0" name="direction" type="int" enum="TextServer.Direction" default="0">
+ </argument>
+ <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0">
+ </argument>
+ <description>
+ Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method.
+ Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ Note: Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="draw_hex_code_box" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="canvas" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <argument index="2" name="pos" type="Vector2">
+ </argument>
+ <argument index="3" name="index" type="int">
+ </argument>
+ <argument index="4" name="color" type="Color">
+ </argument>
+ <description>
+ Draws box displaying character hexadecimal code. Used for replacing missing characters.
+ </description>
+ </method>
+ <method name="font_draw_glyph" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="canvas" type="RID">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <argument index="3" name="pos" type="Vector2">
+ </argument>
+ <argument index="4" name="index" type="int">
+ </argument>
+ <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
+ </description>
+ </method>
+ <method name="font_draw_glyph_outline" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="canvas" type="RID">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <argument index="3" name="outline_size" type="int">
+ </argument>
+ <argument index="4" name="pos" type="Vector2">
+ </argument>
+ <argument index="5" name="index" type="int">
+ </argument>
+ <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code].
+ Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index].
+ </description>
+ </method>
+ <method name="font_get_antialiased" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font anti-aliasing is supported and enabled.
+ </description>
+ </method>
+ <method name="font_get_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns the font ascent (number of pixels above the baseline).
+ </description>
+ </method>
+ <method name="font_get_base_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns the default size of the font.
+ </description>
+ </method>
+ <method name="font_get_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns the font descent (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="font_get_distance_field_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code], if distance field hint is enabled.
+ </description>
+ </method>
+ <method name="font_get_feature_list" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns list of OpenType features supported by font.
+ </description>
+ </method>
+ <method name="font_get_force_autohinter" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code], if autohinter is supported and enabled.
+ </description>
+ </method>
+ <method name="font_get_glyph_advance" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <description>
+ Returns advance of the glyph.
+ </description>
+ </method>
+ <method name="font_get_glyph_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="char" type="int">
+ </argument>
+ <argument index="2" name="variation_selector" type="int" default="0">
+ </argument>
+ <description>
+ Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code].
+ </description>
+ </method>
+ <method name="font_get_glyph_kerning" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="index_a" type="int">
+ </argument>
+ <argument index="2" name="index_b" type="int">
+ </argument>
+ <argument index="3" name="size" type="int">
+ </argument>
+ <description>
+ Returns a kerning of the pair of glyphs.
+ </description>
+ </method>
+ <method name="font_get_height" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns the total font height (ascent plus descent) in pixels.
+ </description>
+ </method>
+ <method name="font_get_hinting" qualifiers="const">
+ <return type="int" enum="TextServer.Hinting">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns the font hinting.
+ </description>
+ </method>
+ <method name="font_get_language_support_override">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]language[/code].
+ </description>
+ </method>
+ <method name="font_get_language_support_overrides">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns list of language support overrides.
+ </description>
+ </method>
+ <method name="font_get_oversampling" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the font oversampling factor, shared by all fonts in the TextServer.
+ </description>
+ </method>
+ <method name="font_get_script_support_override">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="script" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if support override is enabled for the [code]script[/code].
+ </description>
+ </method>
+ <method name="font_get_script_support_overrides">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns list of script support overrides.
+ </description>
+ </method>
+ <method name="font_get_supported_chars" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns a string containing all the characters available in the font.
+ </description>
+ </method>
+ <method name="font_get_underline_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns underline offset (number of pixels below the baseline).
+ </description>
+ </method>
+ <method name="font_get_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <description>
+ Returns underline thickness in pixels.
+ </description>
+ </method>
+ <method name="font_get_variation" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns variation coordinate [code]tag[/code].
+ </description>
+ </method>
+ <method name="font_get_variation_list" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
+ Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
+ </description>
+ </method>
+ <method name="font_has_char" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="char" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if [code]char[/code] is available in the font.
+ </description>
+ </method>
+ <method name="font_has_outline" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font supports glyph outlines.
+ </description>
+ </method>
+ <method name="font_is_language_supported" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font supports given language (ISO 639 code).
+ </description>
+ </method>
+ <method name="font_is_script_supported" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="script" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code], if font supports given script (ISO 15924 code).
+ </description>
+ </method>
+ <method name="font_remove_language_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Remove language support override.
+ </description>
+ </method>
+ <method name="font_remove_script_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="script" type="String">
+ </argument>
+ <description>
+ Removes script support override.
+ </description>
+ </method>
+ <method name="font_set_antialiased">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="antialiased" type="bool">
+ </argument>
+ <description>
+ Sets font anti-aliasing.
+ </description>
+ </method>
+ <method name="font_set_distance_field_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="distance_field" type="bool">
+ </argument>
+ <description>
+ Sets font distance field hint.
+ </description>
+ </method>
+ <method name="font_set_force_autohinter">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="enabeld" type="bool">
+ </argument>
+ <description>
+ Enables/disables default autohinter.
+ </description>
+ </method>
+ <method name="font_set_hinting">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="hinting" type="int" enum="TextServer.Hinting">
+ </argument>
+ <description>
+ Sets font hinting.
+ </description>
+ </method>
+ <method name="font_set_language_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <argument index="2" name="supported" type="bool">
+ </argument>
+ <description>
+ Adds override for [method font_is_language_supported].
+ </description>
+ </method>
+ <method name="font_set_oversampling">
+ <return type="void">
+ </return>
+ <argument index="0" name="oversampling" type="float">
+ </argument>
+ <description>
+ Sets oversampling factor, shared by all font in the TextServer.
+ </description>
+ </method>
+ <method name="font_set_script_support_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="script" type="String">
+ </argument>
+ <argument index="2" name="supported" type="bool">
+ </argument>
+ <description>
+ Adds override for [method font_is_script_supported].
+ </description>
+ </method>
+ <method name="font_set_variation">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored.
+ </description>
+ </method>
+ <method name="format_number" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="number" type="String">
+ </argument>
+ <argument index="1" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code].
+ </description>
+ </method>
+ <method name="free_rid">
+ <return type="void">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Frees an object created by this [TextServer].
+ </description>
+ </method>
+ <method name="get_hex_code_box_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <argument index="1" name="index" type="int">
+ </argument>
+ <description>
+ Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters).
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the name of the server interface.
+ </description>
+ </method>
+ <method name="get_system_fonts" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns list of available system fonts.
+ Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature.
+ </description>
+ </method>
+ <method name="has">
+ <return type="bool">
+ </return>
+ <argument index="0" name="rid" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server.
+ </description>
+ </method>
+ <method name="has_feature">
+ <return type="bool">
+ </return>
+ <argument index="0" name="feature" type="int" enum="TextServer.Feature">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the server supports a feature.
+ </description>
+ </method>
+ <method name="is_locale_right_to_left">
+ <return type="bool">
+ </return>
+ <argument index="0" name="locale" type="String">
+ </argument>
+ <description>
+ Returns [code]true[/code] if locale is right-to-left.
+ </description>
+ </method>
+ <method name="load_support_data">
+ <return type="bool">
+ </return>
+ <argument index="0" name="filename" type="String">
+ </argument>
+ <description>
+ Loads optional TextServer database (e.g. ICU break iterators and dictionaries).
+ Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect.
+ </description>
+ </method>
+ <method name="name_to_tag">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Converts readable feature, variation, script or language name to OpenType tag.
+ </description>
+ </method>
+ <method name="parse_number" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="number" type="String">
+ </argument>
+ <argument index="1" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9).
+ </description>
+ </method>
+ <method name="percent_sign" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns percent sign used in the [code]language[/code].
+ </description>
+ </method>
+ <method name="shaped_text_add_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="key" type="Variant">
+ </argument>
+ <argument index="2" name="size" type="Vector2">
+ </argument>
+ <argument index="3" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <argument index="4" name="length" type="int" default="1">
+ </argument>
+ <description>
+ Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters.
+ </description>
+ </method>
+ <method name="shaped_text_add_string">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="text" type="String">
+ </argument>
+ <argument index="2" name="fonts" type="Array">
+ </argument>
+ <argument index="3" name="size" type="int">
+ </argument>
+ <argument index="4" name="opentype_features" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="5" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Adds text span and font to draw it to the text buffer.
+ </description>
+ </method>
+ <method name="shaped_text_clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="RID">
+ </argument>
+ <description>
+ Clears text buffer (removes text and inline objects).
+ </description>
+ </method>
+ <method name="shaped_text_draw" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="canvas" type="RID">
+ </argument>
+ <argument index="2" name="pos" type="Vector2">
+ </argument>
+ <argument index="3" name="clip_l" type="float" default="-1">
+ </argument>
+ <argument index="4" name="clip_r" type="float" default="-1">
+ </argument>
+ <argument index="5" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
+ </description>
+ </method>
+ <method name="shaped_text_draw_outline" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="canvas" type="RID">
+ </argument>
+ <argument index="2" name="pos" type="Vector2">
+ </argument>
+ <argument index="3" name="clip_l" type="float" default="-1">
+ </argument>
+ <argument index="4" name="clip_r" type="float" default="-1">
+ </argument>
+ <argument index="5" name="outline_size" type="int" default="1">
+ </argument>
+ <argument index="6" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout).
+ </description>
+ </method>
+ <method name="shaped_text_fit_to_width">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="width" type="float">
+ </argument>
+ <argument index="2" name="jst_flags" type="int" default="3">
+ </argument>
+ <description>
+ Adjusts text with to fit to specified width, returns new text width.
+ </description>
+ </method>
+ <method name="shaped_text_get_ascent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical).
+ Note: overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline.
+ </description>
+ </method>
+ <method name="shaped_text_get_carets" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="position" type="int">
+ </argument>
+ <description>
+ Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle.
+ </description>
+ </method>
+ <method name="shaped_text_get_descent" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical).
+ Note: overall descent can be higher than font descent, if some glyphs are displaced from the baseline.
+ </description>
+ </method>
+ <method name="shaped_text_get_direction" qualifiers="const">
+ <return type="int" enum="TextServer.Direction">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns direction of the text.
+ </description>
+ </method>
+ <method name="shaped_text_get_dominant_direciton_in_range" qualifiers="const">
+ <return type="int" enum="TextServer.Direction">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="start" type="int">
+ </argument>
+ <argument index="2" name="end" type="int">
+ </argument>
+ <description>
+ Returns dominant direction of in the range of text.
+ </description>
+ </method>
+ <method name="shaped_text_get_glyphs" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns text glyphs.
+ </description>
+ </method>
+ <method name="shaped_text_get_line_breaks" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="width" type="float">
+ </argument>
+ <argument index="2" name="start" type="int" default="0">
+ </argument>
+ <argument index="3" name="break_flags" type="int" default="48">
+ </argument>
+ <description>
+ Breaks text to the lines and returns character ranges for each line.
+ </description>
+ </method>
+ <method name="shaped_text_get_line_breaks_adv" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="width" type="PackedFloat32Array">
+ </argument>
+ <argument index="2" name="start" type="int" default="0">
+ </argument>
+ <argument index="3" name="once" type="bool" default="true">
+ </argument>
+ <argument index="4" name="break_flags" type="int" default="48">
+ </argument>
+ <description>
+ Breaks text to the lines and columns. Returns character ranges for each segment.
+ </description>
+ </method>
+ <method name="shaped_text_get_object_rect" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="key" type="Variant">
+ </argument>
+ <description>
+ Returns bounding rectangle of the inline object.
+ </description>
+ </method>
+ <method name="shaped_text_get_objects" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns array of inline objects.
+ </description>
+ </method>
+ <method name="shaped_text_get_orientation" qualifiers="const">
+ <return type="int" enum="TextServer.Orientation">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns text orientation.
+ </description>
+ </method>
+ <method name="shaped_text_get_parent" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Sets text orientation.
+ </description>
+ </method>
+ <method name="shaped_text_get_preserve_control" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code] if text buffer is configured to display control characters.
+ </description>
+ </method>
+ <method name="shaped_text_get_preserve_invalid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters.
+ Note: If set to [code]false[/code], nothing is displayed in place of invalid characters.
+ </description>
+ </method>
+ <method name="shaped_text_get_range" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns substring buffer character range in the parent buffer.
+ </description>
+ </method>
+ <method name="shaped_text_get_selection" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="start" type="int">
+ </argument>
+ <argument index="2" name="end" type="int">
+ </argument>
+ <description>
+ Returns selection rectangles for the specified character range.
+ </description>
+ </method>
+ <method name="shaped_text_get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns size of the text.
+ </description>
+ </method>
+ <method name="shaped_text_get_underline_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns pixel offset of the underline below the baseline.
+ </description>
+ </method>
+ <method name="shaped_text_get_underline_thickness" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns thickness of the underline.
+ </description>
+ </method>
+ <method name="shaped_text_get_width" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns width (for horizontal layout) or height (for vertical) of the text.
+ </description>
+ </method>
+ <method name="shaped_text_get_word_breaks" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Breaks text into words and returns array of character ranges.
+ </description>
+ </method>
+ <method name="shaped_text_hit_test_grapheme" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="coords" type="float">
+ </argument>
+ <description>
+ Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found.
+ </description>
+ </method>
+ <method name="shaped_text_hit_test_position" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="coords" type="float">
+ </argument>
+ <description>
+ Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position.
+ </description>
+ </method>
+ <method name="shaped_text_is_ready" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Returns [code]true[/code] if buffer is successfully shaped.
+ </description>
+ </method>
+ <method name="shaped_text_next_grapheme_pos">
+ <return type="int">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="int">
+ </argument>
+ <description>
+ Returns composite character end position closest to the [code]pos[/code].
+ </description>
+ </method>
+ <method name="shaped_text_prev_grapheme_pos">
+ <return type="int">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="pos" type="int">
+ </argument>
+ <description>
+ Returns composite character start position closest to the [code]pos[/code].
+ </description>
+ </method>
+ <method name="shaped_text_resize_object">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="key" type="Variant">
+ </argument>
+ <argument index="2" name="size" type="Vector2">
+ </argument>
+ <argument index="3" name="inline_align" type="int" enum="VAlign" default="1">
+ </argument>
+ <description>
+ Sets new size and alignment of embedded object.
+ </description>
+ </method>
+ <method name="shaped_text_set_bidi_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="override" type="Array">
+ </argument>
+ <description>
+ Overrides BiDi for the structured text.
+ Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately.
+ </description>
+ </method>
+ <method name="shaped_text_set_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0">
+ </argument>
+ <description>
+ Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
+ Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="shaped_text_set_orientation">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0">
+ </argument>
+ <description>
+ Sets desired text orientation.
+ Note: Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature.
+ </description>
+ </method>
+ <method name="shaped_text_set_preserve_control">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ If set to [code]true[/code] text buffer will display control characters.
+ </description>
+ </method>
+ <method name="shaped_text_set_preserve_invalid">
+ <return type="void">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="enabled" type="bool">
+ </argument>
+ <description>
+ If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed.
+ </description>
+ </method>
+ <method name="shaped_text_shape">
+ <return type="bool">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <description>
+ Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully.
+ Note: It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested.
+ </description>
+ </method>
+ <method name="shaped_text_substr" qualifiers="const">
+ <return type="RID">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="start" type="int">
+ </argument>
+ <argument index="2" name="length" type="int">
+ </argument>
+ <description>
+ Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects).
+ </description>
+ </method>
+ <method name="shaped_text_tab_align">
+ <return type="float">
+ </return>
+ <argument index="0" name="shaped" type="RID">
+ </argument>
+ <argument index="1" name="tab_stops" type="PackedFloat32Array">
+ </argument>
+ <description>
+ Aligns shaped text to the given tab-stops.
+ </description>
+ </method>
+ <method name="tag_to_name">
+ <return type="String">
+ </return>
+ <argument index="0" name="tag" type="int">
+ </argument>
+ <description>
+ Converts OpenType tag to readable feature, variation, script or language name.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ <constant name="DIRECTION_AUTO" value="0" enum="Direction">
+ Text direction is determined based on contents and current locale.
+ </constant>
+ <constant name="DIRECTION_LTR" value="1" enum="Direction">
+ Text is written from left to right.
+ </constant>
+ <constant name="DIRECTION_RTL" value="2" enum="Direction">
+ Text is written from right to left.
+ </constant>
+ <constant name="ORIENTATION_HORIZONTAL" value="0" enum="Orientation">
+ Text is written horizontally.
+ </constant>
+ <constant name="ORIENTATION_VERTICAL" value="1" enum="Orientation">
+ Left to right text is written vertically from top to bottom.
+ Right to left text is written vertically from bottom to top.
+ </constant>
+ <constant name="JUSTIFICATION_NONE" value="0" enum="JustificationFlag">
+ Do not justify text.
+ </constant>
+ <constant name="JUSTIFICATION_KASHIDA" value="1" enum="JustificationFlag">
+ Justify text by adding and removing kashidas.
+ </constant>
+ <constant name="JUSTIFICATION_WORD_BOUND" value="2" enum="JustificationFlag">
+ Justify text by changing width of the spaces between the words.
+ </constant>
+ <constant name="JUSTIFICATION_TRIM_EDGE_SPACES" value="4" enum="JustificationFlag">
+ Remove trailing and leading spaces from the justified text.
+ </constant>
+ <constant name="JUSTIFICATION_AFTER_LAST_TAB" value="8" enum="JustificationFlag">
+ Only apply justification to the part of the text after the last tab.
+ </constant>
+ <constant name="BREAK_NONE" value="0" enum="LineBreakFlag">
+ Do not break the line.
+ </constant>
+ <constant name="BREAK_MANDATORY" value="16" enum="LineBreakFlag">
+ Break the line at the line mandatory break characters (e.g. [code]"\n"[/code]).
+ </constant>
+ <constant name="BREAK_WORD_BOUND" value="32" enum="LineBreakFlag">
+ Break the line between the words.
+ </constant>
+ <constant name="BREAK_GRAPHEME_BOUND" value="64" enum="LineBreakFlag">
+ Break the line between any unconnected graphemes.
+ </constant>
+ <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag">
+ Grapheme is part of right-to-left or bottom-to-top run.
+ </constant>
+ <constant name="GRAPHEME_IS_VIRTUAL" value="4" enum="GraphemeFlag">
+ Grapheme is not part of source text, it was added by justification process.
+ </constant>
+ <constant name="GRAPHEME_IS_SPACE" value="8" enum="GraphemeFlag">
+ Grapheme is whitespace.
+ </constant>
+ <constant name="GRAPHEME_IS_BREAK_HARD" value="16" enum="GraphemeFlag">
+ Grapheme is mandatory break point (e.g. [code]"\n"[/code]).
+ </constant>
+ <constant name="GRAPHEME_IS_BREAK_SOFT" value="32" enum="GraphemeFlag">
+ Grapheme is optional break point (e.g. space).
+ </constant>
+ <constant name="GRAPHEME_IS_TAB" value="64" enum="GraphemeFlag">
+ Grapheme is the tabulation character.
+ </constant>
+ <constant name="GRAPHEME_IS_ELONGATION" value="128" enum="GraphemeFlag">
+ Grapheme is kashida.
+ </constant>
+ <constant name="GRAPHEME_IS_PUNCTUATION" value="256" enum="GraphemeFlag">
+ Grapheme is punctuation character.
+ </constant>
+ <constant name="HINTING_NONE" value="0" enum="Hinting">
+ Disables font hinting (smoother but less crisp).
+ </constant>
+ <constant name="HINTING_LIGHT" value="1" enum="Hinting">
+ Use the light font hinting mode.
+ </constant>
+ <constant name="HINTING_NORMAL" value="2" enum="Hinting">
+ Use the default font hinting mode (crisper but less smooth).
+ </constant>
+ <constant name="FEATURE_BIDI_LAYOUT" value="1" enum="Feature">
+ TextServer supports bidirectional layouts.
+ </constant>
+ <constant name="FEATURE_VERTICAL_LAYOUT" value="2" enum="Feature">
+ TextServer supports vertical layouts.
+ </constant>
+ <constant name="FEATURE_SHAPING" value="4" enum="Feature">
+ TextServer supports complex text shaping.
+ </constant>
+ <constant name="FEATURE_KASHIDA_JUSTIFICATION" value="8" enum="Feature">
+ TextServer supports justification using kashidas.
+ </constant>
+ <constant name="FEATURE_BREAK_ITERATORS" value="16" enum="Feature">
+ TextServer supports complex line/word breaking rules (e.g. dictionary based).
+ </constant>
+ <constant name="FEATURE_FONT_SYSTEM" value="32" enum="Feature">
+ TextServer supports loading system fonts.
+ </constant>
+ <constant name="FEATURE_FONT_VARIABLE" value="64" enum="Feature">
+ TextServer supports variable fonts.
+ </constant>
+ <constant name="FEATURE_USE_SUPPORT_DATA" value="128" enum="Feature">
+ TextServer require external data file for some features.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml
new file mode 100644
index 0000000000..29586f30b4
--- /dev/null
+++ b/doc/classes/TextServerManager.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TextServerManager" inherits="Object" version="4.0">
+ <brief_description>
+ Manager for the font and complex text layout servers.
+ </brief_description>
+ <description>
+ [TextServerManager] is the API backend for loading, enumeration and switching [TextServer]s.
+ Note: Switching text server at runtime is possible, but will invalidate all fonts and text buffers. Make sure to unload all controls, fonts, and themes before doing so.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="find_interface" qualifiers="const">
+ <return type="TextServer">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Finds an interface by its name.
+ </description>
+ </method>
+ <method name="get_interface" qualifiers="const">
+ <return type="TextServer">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Returns the interface registered at a given index.
+ </description>
+ </method>
+ <method name="get_interface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of interfaces currently registered.
+ </description>
+ </method>
+ <method name="get_interface_features" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Returns text server supported features (binary OR).
+ </description>
+ </method>
+ <method name="get_interface_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Returns the interface name registered at a given index.
+ </description>
+ </method>
+ <method name="get_interfaces" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns a list of available interfaces the index and name of each interface.
+ </description>
+ </method>
+ <method name="get_primary_interface" qualifiers="const">
+ <return type="TextServer">
+ </return>
+ <description>
+ Returns the primary [TextServer] interface.
+ </description>
+ </method>
+ <method name="set_primary_interface">
+ <return type="bool">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Sets (and initializes it if required) interface registered at a given index as the primary. Invalidates all references to the fonts and text buffers.
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgressBar.xml
index 4937121ebf..cfc8f16648 100644
--- a/doc/classes/TextureProgress.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="TextureProgress" inherits="Range" version="4.0">
+<class name="TextureProgressBar" inherits="Range" version="4.0">
<brief_description>
Texture-based progress bar. Useful for loading screens and life or stamina bars.
</brief_description>
<description>
- TextureProgress works like [ProgressBar], but uses up to 3 textures instead of Godot's [Theme] resource. It can be used to create horizontal, vertical and radial progress bars.
+ TextureProgressBar works like [ProgressBar], but uses up to 3 textures instead of Godot's [Theme] resource. It can be used to create horizontal, vertical and radial progress bars.
</description>
<tutorials>
</tutorials>
@@ -12,7 +12,7 @@
<method name="get_stretch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<description>
</description>
@@ -20,7 +20,7 @@
<method name="set_stretch_margin">
<return type="void">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
+ <argument index="0" name="side" type="int" enum="Side">
</argument>
<argument index="1" name="value" type="int">
</argument>
diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml
index 783614c4af..3f7f22ebcd 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -51,6 +51,17 @@
Clears the [Font] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="clear_font_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Clears the font size [code]name[/code] if the theme has [code]node_type[/code].
+ </description>
+ </method>
<method name="clear_icon">
<return type="void">
</return>
@@ -109,6 +120,13 @@
Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="get_color_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the [Color] types as a [PackedStringArray] filled with unique type names, for use in [method get_color] and/or [method get_color_list].
+ </description>
+ </method>
<method name="get_constant" qualifiers="const">
<return type="int">
</return>
@@ -129,6 +147,13 @@
Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="get_constant_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the constant types as a [PackedStringArray] filled with unique type names, for use in [method get_constant] and/or [method get_constant_list].
+ </description>
+ </method>
<method name="get_font" qualifiers="const">
<return type="Font">
</return>
@@ -149,6 +174,33 @@
Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="get_font_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns the font size at [code]name[/code] if the theme has [code]node_type[/code].
+ </description>
+ </method>
+ <method name="get_font_size_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="node_type" type="String">
+ </argument>
+ <description>
+ Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]node_type[/code].
+ </description>
+ </method>
+ <method name="get_font_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the [Font] types as a [PackedStringArray] filled with unique type names, for use in [method get_font] and/or [method get_font_list].
+ </description>
+ </method>
<method name="get_icon" qualifiers="const">
<return type="Texture2D">
</return>
@@ -169,6 +221,13 @@
Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]node_type[/code].
</description>
</method>
+ <method name="get_icon_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the icon types as a [PackedStringArray] filled with unique type names, for use in [method get_icon] and/or [method get_icon_list].
+ </description>
+ </method>
<method name="get_stylebox" qualifiers="const">
<return type="StyleBox">
</return>
@@ -189,20 +248,18 @@
Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code].
</description>
</method>
- <method name="get_stylebox_types" qualifiers="const">
+ <method name="get_stylebox_type_list" qualifiers="const">
<return type="PackedStringArray">
</return>
<description>
- Returns all the [StyleBox] types as a [PackedStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]node_type[/code].
+ Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list].
</description>
</method>
<method name="get_type_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="node_type" type="String">
- </argument>
<description>
- Returns all the types in [code]node_type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]node_type[/code].
+ Returns all the theme types as a [PackedStringArray] filled with unique type names, for use in other [code]get_*[/code] functions of this theme.
</description>
</method>
<method name="has_color" qualifiers="const">
@@ -241,6 +298,18 @@
Returns [code]false[/code] if the theme does not have [code]node_type[/code].
</description>
</method>
+ <method name="has_font_size" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if font size with [code]name[/code] is in [code]node_type[/code].
+ Returns [code]false[/code] if the theme does not have [code]node_type[/code].
+ </description>
+ </method>
<method name="has_icon" qualifiers="const">
<return type="bool">
</return>
@@ -307,6 +376,20 @@
Does nothing if the theme does not have [code]node_type[/code].
</description>
</method>
+ <method name="set_font_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="node_type" type="StringName">
+ </argument>
+ <argument index="2" name="font_size" type="int">
+ </argument>
+ <description>
+ Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]node_type[/code].
+ Does nothing if the theme does not have [code]node_type[/code].
+ </description>
+ </method>
<method name="set_icon">
<return type="void">
</return>
@@ -340,6 +423,9 @@
<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
The theme's default font.
</member>
+ <member name="default_font_size" type="int" setter="set_default_font_size" getter="get_default_font_size" default="-1">
+ The theme's default font size. Set to [code]-1[/code] to ignore and use global default.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index ff291663fa..406774cbfe 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -107,10 +107,10 @@
</return>
<argument index="0" name="xform" type="Transform2D">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
- Returns a transform interpolated between this transform and another by a given weight (on the range of 0.0 to 1.0).
+ Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="inverse">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 73575b4309..01818e2993 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -35,6 +35,15 @@
Clears the tree. This removes all items.
</description>
</method>
+ <method name="clear_column_title_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features from the item's text.
+ </description>
+ </method>
<method name="create_item">
<return type="TreeItem">
</return>
@@ -75,6 +84,35 @@
Returns the column's title.
</description>
</method>
+ <method name="get_column_title_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Returns column title base writing direction.
+ </description>
+ </method>
+ <method name="get_column_title_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Returns column title language code.
+ </description>
+ </method>
+ <method name="get_column_title_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the column title.
+ </description>
+ </method>
<method name="get_column_width" qualifiers="const">
<return type="int">
</return>
@@ -225,6 +263,41 @@
Sets the title of a column.
</description>
</method>
+ <method name="set_column_title_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets column title base writing direction.
+ </description>
+ </method>
+ <method name="set_column_title_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
+ <method name="set_column_title_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the column title.
+ </description>
+ </method>
<method name="set_column_titles_visible">
<return type="void">
</return>
@@ -398,7 +471,10 @@
The arrow icon used when a foldable item is not collapsed.
</theme_item>
<theme_item name="arrow_collapsed" type="Texture2D">
- The arrow icon used when a foldable item is collapsed.
+ The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
+ </theme_item>
+ <theme_item name="arrow_collapsed_mirrored" type="Texture2D">
+ The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
</theme_item>
<theme_item name="bg" type="StyleBox">
Default [StyleBox] for the [Tree], i.e. used when the control is not being focused.
@@ -451,6 +527,9 @@
<theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the item is selected.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
<theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
[Color] of the guideline.
</theme_item>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 22e643a51d..e97c1e580c 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -54,6 +54,15 @@
Resets the color for the given column to default.
</description>
</method>
+ <method name="clear_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features.
+ </description>
+ </method>
<method name="deselect">
<return type="void">
</return>
@@ -184,6 +193,15 @@
Returns the icon [Texture2D] region as [Rect2].
</description>
</method>
+ <method name="get_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Returns item's text language code.
+ </description>
+ </method>
<method name="get_metadata" qualifiers="const">
<return type="Variant">
</return>
@@ -209,6 +227,17 @@
If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code].
</description>
</method>
+ <method name="get_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the item's text.
+ </description>
+ </method>
<method name="get_parent">
<return type="TreeItem">
</return>
@@ -249,6 +278,22 @@
<description>
</description>
</method>
+ <method name="get_structured_text_bidi_override" qualifiers="const">
+ <return type="int" enum="Control.StructuredTextParser">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_structured_text_bidi_override_options" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_suffix" qualifiers="const">
<return type="String">
</return>
@@ -275,6 +320,15 @@
Returns the given column's text alignment.
</description>
</method>
+ <method name="get_text_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <description>
+ Returns item's text base writing direction.
+ </description>
+ </method>
<method name="get_tooltip" qualifiers="const">
<return type="String">
</return>
@@ -533,6 +587,17 @@
Sets the given column's icon's texture region.
</description>
</method>
+ <method name="set_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
<method name="set_metadata">
<return type="void">
</return>
@@ -543,6 +608,19 @@
<description>
</description>
</method>
+ <method name="set_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the item's text.
+ </description>
+ </method>
<method name="set_range">
<return type="void">
</return>
@@ -580,6 +658,26 @@
If [code]true[/code], the given column is selectable.
</description>
</method>
+ <method name="set_structured_text_bidi_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="parser" type="int" enum="Control.StructuredTextParser">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_structured_text_bidi_override_options">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="args" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_suffix">
<return type="void">
</return>
@@ -611,6 +709,17 @@
Sets the given column's text alignment. See [enum TextAlign] for possible values.
</description>
</method>
+ <method name="set_text_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="column" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets item's text base writing direction.
+ </description>
+ </method>
<method name="set_tooltip">
<return type="void">
</return>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index f99231de39..b85f7a2623 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -137,10 +137,10 @@
</argument>
<argument index="2" name="post_b" type="Vector2">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -149,7 +149,7 @@
<argument index="0" name="b" type="Vector2">
</argument>
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code].
+ Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to">
@@ -224,9 +224,9 @@
<method name="lerp">
<return type="Vector2">
</return>
- <argument index="0" name="with" type="Vector2">
+ <argument index="0" name="to" type="Vector2">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
@@ -452,9 +452,9 @@
<method name="slerp">
<return type="Vector2">
</return>
- <argument index="0" name="with" type="Vector2">
+ <argument index="0" name="to" type="Vector2">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
@@ -479,7 +479,7 @@
Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals.
</description>
</method>
- <method name="tangent">
+ <method name="orthogonal">
<return type="Vector2">
</return>
<description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 6ba0d6ab8d..14a829d7a5 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -105,10 +105,10 @@
</argument>
<argument index="2" name="post_b" type="Vector3">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" 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 [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ 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 [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="direction_to">
@@ -117,7 +117,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Returns the normalized vector pointing from this vector to [code]b[/code].
+ Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code].
</description>
</method>
<method name="distance_squared_to">
@@ -199,12 +199,12 @@
<method name="lerp">
<return type="Vector3">
</return>
- <argument index="0" name="b" type="Vector3">
+ <argument index="0" name="to" type="Vector3">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
- Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
+ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
</description>
</method>
<method name="max_axis">
@@ -468,9 +468,9 @@
<method name="slerp">
<return type="Vector3">
</return>
- <argument index="0" name="b" type="Vector3">
+ <argument index="0" name="to" type="Vector3">
</argument>
- <argument index="1" name="t" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation.
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 1125a1da94..90d0591949 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -26,7 +26,6 @@
<member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0">
The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel3D.use_as_steering] set to [code]true[/code] will automatically be rotated.
</member>
- <member name="weight" type="float" setter="set_weight" getter="get_weight" override="true" default="392.0" />
</members>
<constants>
</constants>
diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml
index 60f0a40159..80f97c3419 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -6,6 +6,7 @@
<description>
Control node for playing video streams using [VideoStream] resources.
Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([code].webm[/code], [VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative].
+ [b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index df0c2f9bed..7b513d56c3 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -234,6 +234,10 @@
<member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0">
Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry.
</member>
+ <member name="sdf_oversize" type="int" setter="set_sdf_oversize" getter="get_sdf_oversize" enum="Viewport.SDFOversize" default="1">
+ </member>
+ <member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
+ </member>
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of the first quadrant on the shadow atlas.
</member>
@@ -428,5 +432,23 @@
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX" value="3" enum="DefaultCanvasItemTextureRepeat">
Max value for [enum DefaultCanvasItemTextureRepeat] enum.
</constant>
+ <constant name="SDF_OVERSIZE_100_PERCENT" value="0" enum="SDFOversize">
+ </constant>
+ <constant name="SDF_OVERSIZE_120_PERCENT" value="1" enum="SDFOversize">
+ </constant>
+ <constant name="SDF_OVERSIZE_150_PERCENT" value="2" enum="SDFOversize">
+ </constant>
+ <constant name="SDF_OVERSIZE_200_PERCENT" value="3" enum="SDFOversize">
+ </constant>
+ <constant name="SDF_OVERSIZE_MAX" value="4" enum="SDFOversize">
+ </constant>
+ <constant name="SDF_SCALE_100_PERCENT" value="0" enum="SDFScale">
+ </constant>
+ <constant name="SDF_SCALE_50_PERCENT" value="1" enum="SDFScale">
+ </constant>
+ <constant name="SDF_SCALE_25_PERCENT" value="2" enum="SDFScale">
+ </constant>
+ <constant name="SDF_SCALE_MAX" value="3" enum="SDFScale">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index a0711b4214..0f887c7705 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -27,6 +27,13 @@
<description>
</description>
</method>
+ <method name="get_layout_direction" qualifiers="const">
+ <return type="int" enum="Window.LayoutDirection">
+ </return>
+ <description>
+ Returns layout direction and text writing direction.
+ </description>
+ </method>
<method name="get_real_size" qualifiers="const">
<return type="Vector2i">
</return>
@@ -61,6 +68,18 @@
<argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
+ Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
+ </description>
+ </method>
+ <method name="get_theme_font_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns the font size at [code]name[/code] if the theme has [code]type[/code].
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@@ -123,6 +142,20 @@
<argument index="1" name="type" type="StringName" default="&quot;&quot;">
</argument>
<description>
+ Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
+ </description>
+ </method>
+ <method name="has_theme_font_size" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <argument index="1" name="type" type="StringName" default="&quot;&quot;">
+ </argument>
+ <description>
+ Returns [code]true[/code] if font size with [code]name[/code] is in [code]type[/code].
+ Returns [code]false[/code] if the theme does not have [code]type[/code].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
@@ -157,6 +190,13 @@
<description>
</description>
</method>
+ <method name="is_layout_rtl" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if layout is right-to-left.
+ </description>
+ </method>
<method name="is_maximize_allowed" qualifiers="const">
<return type="bool">
</return>
@@ -249,6 +289,15 @@
<description>
</description>
</method>
+ <method name="set_layout_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="direction" type="int" enum="Window.LayoutDirection">
+ </argument>
+ <description>
+ Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew).
+ </description>
+ </method>
<method name="set_use_font_oversampling">
<return type="void">
</return>
@@ -393,6 +442,18 @@
</constant>
<constant name="CONTENT_SCALE_ASPECT_EXPAND" value="4" enum="ContentScaleAspect">
</constant>
+ <constant name="LAYOUT_DIRECTION_INHERITED" value="0" enum="LayoutDirection">
+ Automatic layout direction, determined from the parent control layout direction.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_LOCALE" value="1" enum="LayoutDirection">
+ Automatic layout direction, determined from the current locale.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_LTR" value="2" enum="LayoutDirection">
+ Left-to-right layout direction.
+ </constant>
+ <constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection">
+ Right-to-left layout direction.
+ </constant>
</constants>
<theme_items>
<theme_item name="close" type="Texture2D">
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index c0f64d9e27..345e5efdee 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -19,7 +19,7 @@
If active, returns the name of the associated controller if provided by the AR/VR SDK used.
</description>
</method>
- <method name="get_hand" qualifiers="const">
+ <method name="get_tracker_hand" qualifiers="const">
<return type="int" enum="XRPositionalTracker.TrackerHand">
</return>
<description>
@@ -86,7 +86,7 @@
Emitted when a button on this controller is pressed.
</description>
</signal>
- <signal name="button_release">
+ <signal name="button_released">
<argument index="0" name="button" type="int">
</argument>
<description>
diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml
index 0b57c9478f..36ff312e4d 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -12,7 +12,7 @@
<link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
- <method name="get_hand" qualifiers="const">
+ <method name="get_tracker_hand" qualifiers="const">
<return type="int" enum="XRPositionalTracker.TrackerHand">
</return>
<description>
@@ -33,13 +33,6 @@
Returns the mesh related to a controller or anchor point if one is available.
</description>
</method>
- <method name="get_name" qualifiers="const">
- <return type="StringName">
- </return>
- <description>
- Returns the controller or anchor point's name if available.
- </description>
- </method>
<method name="get_orientation" qualifiers="const">
<return type="Basis">
</return>
@@ -61,18 +54,32 @@
Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [XRController3D] and [XRAnchor3D] nodes.
</description>
</method>
- <method name="get_tracks_orientation" qualifiers="const">
+ <method name="get_tracker_name" qualifiers="const">
+ <return type="StringName">
+ </return>
+ <description>
+ Returns the controller or anchor point's name, if applicable.
+ </description>
+ </method>
+ <method name="get_tracker_type" qualifiers="const">
+ <return type="int" enum="XRServer.TrackerType">
+ </return>
+ <description>
+ Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum.
+ </description>
+ </method>
+ <method name="is_tracking_orientation" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if this device tracks orientation.
+ Returns [code]true[/code] if this device is tracking orientation.
</description>
</method>
- <method name="get_tracks_position" qualifiers="const">
+ <method name="is_tracking_position" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if this device tracks position.
+ Returns [code]true[/code] if this device is tracking position.
</description>
</method>
<method name="get_transform" qualifiers="const">
@@ -84,13 +91,6 @@
Returns the transform combining this device's orientation and position.
</description>
</method>
- <method name="get_type" qualifiers="const">
- <return type="int" enum="XRServer.TrackerType">
- </return>
- <description>
- Returns the tracker's type.
- </description>
- </method>
</methods>
<members>
<member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0">
@@ -101,10 +101,10 @@
<constant name="TRACKER_HAND_UNKNOWN" value="0" enum="TrackerHand">
The hand this tracker is held in is unknown or not applicable.
</constant>
- <constant name="TRACKER_LEFT_HAND" value="1" enum="TrackerHand">
+ <constant name="TRACKER_HAND_LEFT" value="1" enum="TrackerHand">
This tracker is the left hand controller.
</constant>
- <constant name="TRACKER_RIGHT_HAND" value="2" enum="TrackerHand">
+ <constant name="TRACKER_HAND_RIGHT" value="2" enum="TrackerHand">
This tracker is the right hand controller.
</constant>
</constants>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index b0d0a4bd7b..a63c509937 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -70,7 +70,7 @@
<argument index="0" name="from" type="float">
</argument>
<description>
- Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2.
+ Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation.
</description>
</method>
<method name="operator !=" qualifiers="operator">