summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile11
-rw-r--r--doc/classes/@GlobalScope.xml1932
-rw-r--r--doc/classes/AABB.xml50
-rw-r--r--doc/classes/AStar.xml8
-rw-r--r--doc/classes/AStar2D.xml5
-rw-r--r--doc/classes/AcceptDialog.xml6
-rw-r--r--doc/classes/AnimatedSprite3D.xml5
-rw-r--r--doc/classes/Animation.xml14
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml13
-rw-r--r--doc/classes/AnimationPlayer.xml14
-rw-r--r--doc/classes/AnimationTree.xml10
-rw-r--r--doc/classes/Area2D.xml56
-rw-r--r--doc/classes/Area3D.xml58
-rw-r--r--doc/classes/Array.xml84
-rw-r--r--doc/classes/ArrayMesh.xml80
-rw-r--r--doc/classes/AspectRatioContainer.xml51
-rw-r--r--doc/classes/AtlasTexture.xml5
-rw-r--r--doc/classes/AudioEffectCapture.xml75
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml28
-rw-r--r--doc/classes/BackBufferCopy.xml2
-rw-r--r--doc/classes/BakedLightmapData.xml6
-rw-r--r--doc/classes/BaseButton.xml5
-rw-r--r--doc/classes/BaseMaterial3D.xml72
-rw-r--r--doc/classes/Basis.xml34
-rw-r--r--doc/classes/BitmapFont.xml112
-rw-r--r--doc/classes/BoxContainer.xml2
-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.xml67
-rw-r--r--doc/classes/CPUParticles2D.xml26
-rw-r--r--doc/classes/CPUParticles3D.xml44
-rw-r--r--doc/classes/Callable.xml42
-rw-r--r--doc/classes/Camera2D.xml64
-rw-r--r--doc/classes/Camera3D.xml6
-rw-r--r--doc/classes/CanvasItem.xml81
-rw-r--r--doc/classes/CharFXTransform.xml33
-rw-r--r--doc/classes/CheckBox.xml25
-rw-r--r--doc/classes/CheckButton.xml37
-rw-r--r--doc/classes/ClassDB.xml1
-rw-r--r--doc/classes/ClippedCamera3D.xml8
-rw-r--r--doc/classes/CodeEdit.xml17
-rw-r--r--doc/classes/CodeHighlighter.xml40
-rw-r--r--doc/classes/CollisionPolygon3D.xml3
-rw-r--r--doc/classes/Color.xml158
-rw-r--r--doc/classes/ColorPicker.xml3
-rw-r--r--doc/classes/ColorPickerButton.xml15
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml5
-rw-r--r--doc/classes/ConeTwistJoint3D.xml4
-rw-r--r--doc/classes/ConfigFile.xml8
-rw-r--r--doc/classes/ConfirmationDialog.xml2
-rw-r--r--doc/classes/Control.xml408
-rw-r--r--doc/classes/Crypto.xml26
-rw-r--r--doc/classes/CryptoKey.xml4
-rw-r--r--doc/classes/Curve2D.xml10
-rw-r--r--doc/classes/Curve3D.xml12
-rw-r--r--doc/classes/Decal.xml6
-rw-r--r--doc/classes/Dictionary.xml112
-rw-r--r--doc/classes/DirectionalLight3D.xml3
-rw-r--r--doc/classes/Directory.xml5
-rw-r--r--doc/classes/DisplayServer.xml38
-rw-r--r--doc/classes/DynamicFont.xml146
-rw-r--r--doc/classes/DynamicFontData.xml36
-rw-r--r--doc/classes/EditorExportPlugin.xml15
-rw-r--r--doc/classes/EditorFileSystem.xml2
-rw-r--r--doc/classes/EditorImportPlugin.xml12
-rw-r--r--doc/classes/EditorInspector.xml8
-rw-r--r--doc/classes/EditorInspectorPlugin.xml4
-rw-r--r--doc/classes/EditorInterface.xml14
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml18
-rw-r--r--doc/classes/EditorPlugin.xml19
-rw-r--r--doc/classes/EditorSceneImporter.xml16
-rw-r--r--doc/classes/EditorSceneImporterAssimp.xml36
-rw-r--r--doc/classes/EditorSceneImporterMesh.xml176
-rw-r--r--doc/classes/EditorSceneImporterMeshNode3D.xml21
-rw-r--r--doc/classes/EditorScenePostImport.xml7
-rw-r--r--doc/classes/EditorSettings.xml10
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml6
-rw-r--r--doc/classes/EditorVCSInterface.xml2
-rw-r--r--doc/classes/EncodedObjectAsID.xml4
-rw-r--r--doc/classes/Engine.xml18
-rw-r--r--doc/classes/Environment.xml55
-rw-r--r--doc/classes/File.xml60
-rw-r--r--doc/classes/FileDialog.xml10
-rw-r--r--doc/classes/Font.xml289
-rw-r--r--doc/classes/FontData.xml416
-rw-r--r--doc/classes/GIProbe.xml3
-rw-r--r--doc/classes/GPUParticles2D.xml3
-rw-r--r--doc/classes/GPUParticles3D.xml3
-rw-r--r--doc/classes/Generic6DOFJoint3D.xml2
-rw-r--r--doc/classes/Geometry2D.xml15
-rw-r--r--doc/classes/Geometry3D.xml2
-rw-r--r--doc/classes/GeometryInstance3D.xml2
-rw-r--r--doc/classes/Gradient.xml4
-rw-r--r--doc/classes/GraphEdit.xml25
-rw-r--r--doc/classes/GraphNode.xml52
-rw-r--r--doc/classes/HMACContext.xml88
-rw-r--r--doc/classes/HTTPClient.xml38
-rw-r--r--doc/classes/HTTPRequest.xml96
-rw-r--r--doc/classes/HashingContext.xml36
-rw-r--r--doc/classes/HingeJoint3D.xml4
-rw-r--r--doc/classes/IP.xml2
-rw-r--r--doc/classes/Image.xml121
-rw-r--r--doc/classes/ImageTexture.xml35
-rw-r--r--doc/classes/Input.xml128
-rw-r--r--doc/classes/InputEvent.xml8
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventJoypadButton.xml2
-rw-r--r--doc/classes/InputEventJoypadMotion.xml2
-rw-r--r--doc/classes/InputEventKey.xml4
-rw-r--r--doc/classes/InputEventMouse.xml2
-rw-r--r--doc/classes/InputEventMouseButton.xml2
-rw-r--r--doc/classes/InputEventWithModifiers.xml4
-rw-r--r--doc/classes/InputMap.xml4
-rw-r--r--doc/classes/ItemList.xml133
-rw-r--r--doc/classes/JSONParseResult.xml19
-rw-r--r--doc/classes/JSONParser.xml57
-rw-r--r--doc/classes/Joint3D.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml18
-rw-r--r--doc/classes/KinematicBody3D.xml5
-rw-r--r--doc/classes/Label.xml63
-rw-r--r--doc/classes/Light3D.xml4
-rw-r--r--doc/classes/LightOccluder2D.xml8
-rw-r--r--doc/classes/LineEdit.xml143
-rw-r--r--doc/classes/LinkButton.xml53
-rw-r--r--doc/classes/MainLoop.xml27
-rw-r--r--doc/classes/MarginContainer.xml25
-rw-r--r--doc/classes/Material.xml6
-rw-r--r--doc/classes/MenuButton.xml18
-rw-r--r--doc/classes/Mesh.xml129
-rw-r--r--doc/classes/MeshDataTool.xml8
-rw-r--r--doc/classes/MultiMesh.xml2
-rw-r--r--doc/classes/MultiplayerAPI.xml17
-rw-r--r--doc/classes/Navigation2D.xml59
-rw-r--r--doc/classes/Navigation3D.xml84
-rw-r--r--doc/classes/NavigationAgent2D.xml20
-rw-r--r--doc/classes/NavigationAgent3D.xml20
-rw-r--r--doc/classes/NavigationMesh.xml5
-rw-r--r--doc/classes/NavigationObstacle2D.xml18
-rw-r--r--doc/classes/NavigationObstacle3D.xml18
-rw-r--r--doc/classes/NavigationPolygon.xml29
-rw-r--r--doc/classes/NavigationRegion2D.xml9
-rw-r--r--doc/classes/NavigationRegion3D.xml6
-rw-r--r--doc/classes/NavigationServer2D.xml71
-rw-r--r--doc/classes/NavigationServer3D.xml75
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml3
-rw-r--r--doc/classes/NinePatchRect.xml8
-rw-r--r--doc/classes/Node.xml104
-rw-r--r--doc/classes/Node3D.xml10
-rw-r--r--doc/classes/NodePath.xml68
-rw-r--r--doc/classes/OS.xml148
-rw-r--r--doc/classes/Object.xml252
-rw-r--r--doc/classes/OptimizedTranslation.xml (renamed from doc/classes/PHashTranslation.xml)2
-rw-r--r--doc/classes/OptionButton.xml35
-rw-r--r--doc/classes/PCKPacker.xml12
-rw-r--r--doc/classes/PackedByteArray.xml46
-rw-r--r--doc/classes/PackedColorArray.xml20
-rw-r--r--doc/classes/PackedFloat32Array.xml20
-rw-r--r--doc/classes/PackedFloat64Array.xml20
-rw-r--r--doc/classes/PackedInt32Array.xml20
-rw-r--r--doc/classes/PackedInt64Array.xml20
-rw-r--r--doc/classes/PackedScene.xml51
-rw-r--r--doc/classes/PackedStringArray.xml20
-rw-r--r--doc/classes/PackedVector2Array.xml20
-rw-r--r--doc/classes/PackedVector3Array.xml20
-rw-r--r--doc/classes/PacketPeerUDP.xml39
-rw-r--r--doc/classes/ParticlesMaterial.xml74
-rw-r--r--doc/classes/PathFollow2D.xml4
-rw-r--r--doc/classes/Performance.xml66
-rw-r--r--doc/classes/PhysicalBone3D.xml5
-rw-r--r--doc/classes/PhysicalSkyMaterial.xml8
-rw-r--r--doc/classes/PhysicsDirectSpaceState2D.xml5
-rw-r--r--doc/classes/PhysicsDirectSpaceState3D.xml5
-rw-r--r--doc/classes/PhysicsServer2D.xml106
-rw-r--r--doc/classes/PhysicsServer3D.xml229
-rw-r--r--doc/classes/PhysicsShapeQueryParameters2D.xml35
-rw-r--r--doc/classes/PhysicsShapeQueryParameters3D.xml35
-rw-r--r--doc/classes/PinJoint3D.xml4
-rw-r--r--doc/classes/Plane.xml22
-rw-r--r--doc/classes/PlaneMesh.xml1
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/PopupMenu.xml115
-rw-r--r--doc/classes/PrimitiveMesh.xml19
-rw-r--r--doc/classes/ProgressBar.xml11
-rw-r--r--doc/classes/ProjectSettings.xml963
-rw-r--r--doc/classes/ProximityGroup3D.xml4
-rw-r--r--doc/classes/Quat.xml44
-rw-r--r--doc/classes/RDTextureFormat.xml2
-rw-r--r--doc/classes/RDUniform.xml2
-rw-r--r--doc/classes/RID.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml22
-rw-r--r--doc/classes/RayCast3D.xml7
-rw-r--r--doc/classes/Rect2.xml57
-rw-r--r--doc/classes/Rect2i.xml55
-rw-r--r--doc/classes/RectangleShape2D.xml4
-rw-r--r--doc/classes/Reference.xml3
-rw-r--r--doc/classes/ReflectionProbe.xml2
-rw-r--r--doc/classes/RenderingDevice.xml134
-rw-r--r--doc/classes/RenderingServer.xml239
-rw-r--r--doc/classes/Resource.xml19
-rw-r--r--doc/classes/ResourceFormatLoader.xml13
-rw-r--r--doc/classes/ResourceLoader.xml14
-rw-r--r--doc/classes/RichTextEffect.xml10
-rw-r--r--doc/classes/RichTextLabel.xml272
-rw-r--r--doc/classes/RigidBody2D.xml23
-rw-r--r--doc/classes/RigidBody3D.xml25
-rw-r--r--doc/classes/SceneTree.xml54
-rw-r--r--doc/classes/SceneTreeTimer.xml14
-rw-r--r--doc/classes/ScriptCreateDialog.xml20
-rw-r--r--doc/classes/ScriptEditor.xml6
-rw-r--r--doc/classes/ScriptEditorBase.xml11
-rw-r--r--doc/classes/Shape3D.xml3
-rw-r--r--doc/classes/Signal.xml14
-rw-r--r--doc/classes/Skeleton3D.xml2
-rw-r--r--doc/classes/Sky.xml6
-rw-r--r--doc/classes/SliderJoint3D.xml4
-rw-r--r--doc/classes/SoftBody3D.xml12
-rw-r--r--doc/classes/SpinBox.xml14
-rw-r--r--doc/classes/Sprite2D.xml29
-rw-r--r--doc/classes/Sprite3D.xml2
-rw-r--r--doc/classes/SpriteBase3D.xml4
-rw-r--r--doc/classes/StreamPeer.xml18
-rw-r--r--doc/classes/String.xml372
-rw-r--r--doc/classes/StringName.xml2
-rw-r--r--doc/classes/StyleBox.xml12
-rw-r--r--doc/classes/StyleBoxFlat.xml26
-rw-r--r--doc/classes/StyleBoxTexture.xml16
-rw-r--r--doc/classes/SubViewport.xml6
-rw-r--r--doc/classes/SurfaceTool.xml269
-rw-r--r--doc/classes/SyntaxHighlighter.xml37
-rw-r--r--doc/classes/TabContainer.xml30
-rw-r--r--doc/classes/Tabs.xml111
-rw-r--r--doc/classes/TextEdit.xml147
-rw-r--r--doc/classes/TextLine.xml212
-rw-r--r--doc/classes/TextParagraph.xml393
-rw-r--r--doc/classes/TextServer.xml1330
-rw-r--r--doc/classes/TextServerManager.xml82
-rw-r--r--doc/classes/Texture2D.xml3
-rw-r--r--doc/classes/TextureProgressBar.xml (renamed from doc/classes/TextureProgress.xml)8
-rw-r--r--doc/classes/Theme.xml418
-rw-r--r--doc/classes/TileMap.xml20
-rw-r--r--doc/classes/Timer.xml10
-rw-r--r--doc/classes/TouchScreenButton.xml7
-rw-r--r--doc/classes/Transform.xml20
-rw-r--r--doc/classes/Transform2D.xml30
-rw-r--r--doc/classes/Tree.xml148
-rw-r--r--doc/classes/TreeItem.xml127
-rw-r--r--doc/classes/Tween.xml15
-rw-r--r--doc/classes/UDPServer.xml86
-rw-r--r--doc/classes/UndoRedo.xml64
-rw-r--r--doc/classes/Variant.xml2
-rw-r--r--doc/classes/Vector2.xml106
-rw-r--r--doc/classes/Vector2i.xml6
-rw-r--r--doc/classes/Vector3.xml105
-rw-r--r--doc/classes/Vector3i.xml8
-rw-r--r--doc/classes/VehicleBody3D.xml1
-rw-r--r--doc/classes/VideoPlayer.xml2
-rw-r--r--doc/classes/Viewport.xml46
-rw-r--r--doc/classes/VisualShader.xml13
-rw-r--r--doc/classes/VisualShaderNodeBooleanConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeClamp.xml32
-rw-r--r--doc/classes/VisualShaderNodeColorConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeConstant.xml14
-rw-r--r--doc/classes/VisualShaderNodeCubemap.xml2
-rw-r--r--doc/classes/VisualShaderNodeCustom.xml2
-rw-r--r--doc/classes/VisualShaderNodeDeterminant.xml2
-rw-r--r--doc/classes/VisualShaderNodeExpression.xml2
-rw-r--r--doc/classes/VisualShaderNodeFaceForward.xml2
-rw-r--r--doc/classes/VisualShaderNodeFloatConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeGroupBase.xml4
-rw-r--r--doc/classes/VisualShaderNodeIf.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeIntFunc.xml9
-rw-r--r--doc/classes/VisualShaderNodeMix.xml32
-rw-r--r--doc/classes/VisualShaderNodeSDFRaymarch.xml15
-rw-r--r--doc/classes/VisualShaderNodeSDFToScreenUV.xml15
-rw-r--r--doc/classes/VisualShaderNodeScalarClamp.xml15
-rw-r--r--doc/classes/VisualShaderNodeScalarInterp.xml15
-rw-r--r--doc/classes/VisualShaderNodeScalarSmoothStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeScalarSwitch.xml15
-rw-r--r--doc/classes/VisualShaderNodeScreenUVToSDF.xml15
-rw-r--r--doc/classes/VisualShaderNodeSmoothStep.xml33
-rw-r--r--doc/classes/VisualShaderNodeStep.xml33
-rw-r--r--doc/classes/VisualShaderNodeSwitch.xml27
-rw-r--r--doc/classes/VisualShaderNodeTexture.xml2
-rw-r--r--doc/classes/VisualShaderNodeTextureSDF.xml15
-rw-r--r--doc/classes/VisualShaderNodeTextureSDFNormal.xml15
-rw-r--r--doc/classes/VisualShaderNodeTextureUniform.xml2
-rw-r--r--doc/classes/VisualShaderNodeTransformConstant.xml2
-rw-r--r--doc/classes/VisualShaderNodeVec3Constant.xml2
-rw-r--r--doc/classes/VisualShaderNodeVectorClamp.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorInterp.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarMix.xml15
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeVectorScalarStep.xml16
-rw-r--r--doc/classes/VisualShaderNodeVectorSmoothStep.xml16
-rw-r--r--doc/classes/WeakRef.xml2
-rw-r--r--doc/classes/Window.xml74
-rw-r--r--doc/classes/World2D.xml5
-rw-r--r--doc/classes/World3D.xml5
-rw-r--r--doc/classes/XRController3D.xml18
-rw-r--r--doc/classes/XRPositionalTracker.xml50
-rw-r--r--doc/classes/bool.xml7
-rw-r--r--doc/classes/float.xml45
-rw-r--r--doc/classes/int.xml122
-rwxr-xr-xdoc/tools/makerst.py15
-rw-r--r--doc/translations/README.md1
-rw-r--r--doc/translations/ar.po4
-rw-r--r--doc/translations/ca.po4
-rw-r--r--doc/translations/classes.pot18
-rw-r--r--doc/translations/cs.po4
-rw-r--r--doc/translations/de.po4
-rw-r--r--doc/translations/es.po4
-rw-r--r--doc/translations/extract.py4
-rw-r--r--doc/translations/fa.po4
-rw-r--r--doc/translations/fi.po4
-rw-r--r--doc/translations/fr.po18
-rw-r--r--doc/translations/id.po4
-rw-r--r--doc/translations/it.po4
-rw-r--r--doc/translations/ja.po4
-rw-r--r--doc/translations/ko.po4
-rw-r--r--doc/translations/nl.po4
-rw-r--r--doc/translations/pl.po4
-rw-r--r--doc/translations/pt_BR.po4
-rw-r--r--doc/translations/ro.po4
-rw-r--r--doc/translations/ru.po4
-rw-r--r--doc/translations/sr_Cyrl.po4
-rw-r--r--doc/translations/th.po4
-rw-r--r--doc/translations/tr.po4
-rw-r--r--doc/translations/uk.po4
-rw-r--r--doc/translations/zh_Hans.po4
-rw-r--r--doc/translations/zh_Hant.po4
332 files changed, 12312 insertions, 4012 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 9534da9bd5..d4bc53bcf9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -2,6 +2,7 @@ BASEDIR = $(CURDIR)
CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
+JSDIR = $(BASEDIR)/../platform/javascript
.ONESHELL:
@@ -16,6 +17,10 @@ doxygen:
rst:
rm -rf $(OUTPUTDIR)/rst
mkdir -p $(OUTPUTDIR)/rst
- pushd $(OUTPUTDIR)/rst
- python3 $(TOOLSDIR)/makerst.py $(CLASSES)
- popd
+ python3 $(TOOLSDIR)/makerst.py -o $(OUTPUTDIR)/rst $(CLASSES)
+
+rstjs:
+ rm -rf $(OUTPUTDIR)/rstjs
+ mkdir -p $(OUTPUTDIR)/rstjs
+ npm --prefix $(JSDIR) ci
+ npm --prefix $(JSDIR) run docs -- --destination $(OUTPUTDIR)/rstjs/html5_shell_classref.rst
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index ee65bbc07e..25f8f22d44 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -10,6 +10,1147 @@
<tutorials>
</tutorials>
<methods>
+ <method name="abs">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="x" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="absf">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the absolute value of float parameter [code]x[/code] (i.e. positive value).
+ [codeblock]
+ # a is 1.2
+ a = absf(-1.2)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="absi">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <description>
+ Returns the absolute value of int parameter [code]x[/code] (i.e. positive value).
+ [codeblock]
+ # a is 1
+ a = absi(-1)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="acos">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
+ [codeblock]
+ # c is 0.523599 or 30 degrees if converted with rad2deg(c)
+ c = acos(0.866025)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="asin">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
+ [codeblock]
+ # s is 0.523599 or 30 degrees if converted with rad2deg(s)
+ s = asin(0.5)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code].
+ The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
+ [codeblock]
+ a = atan(0.5) # a is 0.463648
+ [/codeblock]
+ </description>
+ </method>
+ <method name="atan2">
+ <return type="float">
+ </return>
+ <argument index="0" name="y" type="float">
+ </argument>
+ <argument index="1" name="x" type="float">
+ </argument>
+ <description>
+ Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.
+ Important note: The Y coordinate comes first, by convention.
+ [codeblock]
+ a = atan2(0, -1) # a is 3.141593
+ [/codeblock]
+ </description>
+ </method>
+ <method name="bytes2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="bytes" type="PackedByteArray">
+ </argument>
+ <description>
+ Decodes a byte array back to a [Variant] value, without decoding objects.
+ [b]Note:[/b] If you need object deserialization, see [method bytes2var_with_objects].
+ </description>
+ </method>
+ <method name="bytes2var_with_objects">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="bytes" type="PackedByteArray">
+ </argument>
+ <description>
+ Decodes a byte array back to a [Variant] value. Decoding objects is allowed.
+ [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution).
+ </description>
+ </method>
+ <method name="cartesian2polar">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).
+ </description>
+ </method>
+ <method name="ceil">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code].
+ [codeblock]
+ i = ceil(1.45) # i is 2
+ i = ceil(1.001) # i is 2
+ [/codeblock]
+ See also [method floor], [method round], and [method snapped].
+ </description>
+ </method>
+ <method name="clamp">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="value" type="Variant">
+ </argument>
+ <argument index="1" name="min" type="Variant">
+ </argument>
+ <argument index="2" name="max" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clampf">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <description>
+ Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ [codeblock]
+ speed = 42.1
+ # a is 20.0
+ a = clampf(speed, 1.0, 20.0)
+
+ speed = -10.0
+ # a is -1.0
+ a = clampf(speed, -1.0, 1.0)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="clampi">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <argument index="1" name="min" type="int">
+ </argument>
+ <argument index="2" name="max" type="int">
+ </argument>
+ <description>
+ Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code].
+ [codeblock]
+ speed = 42
+ # a is 20
+ a = clampi(speed, 1, 20)
+
+ speed = -10
+ # a is -1
+ a = clampi(speed, -1, 1)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cos">
+ <return type="float">
+ </return>
+ <argument index="0" name="angle_rad" type="float">
+ </argument>
+ <description>
+ Returns the cosine of angle [code]angle_rad[/code] in radians.
+ [codeblock]
+ # Prints 1 then -1
+ print(cos(PI * 2))
+ print(cos(PI))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="cosh">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic cosine of [code]x[/code] in radians.
+ [codeblock]
+ # Prints 1.543081
+ print(cosh(1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="db2linear">
+ <return type="float">
+ </return>
+ <argument index="0" name="db" type="float">
+ </argument>
+ <description>
+ Converts from decibels to linear energy (audio).
+ </description>
+ </method>
+ <method name="dectime">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="amount" type="float">
+ </argument>
+ <argument index="2" name="step" type="float">
+ </argument>
+ <description>
+ Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code].
+ [codeblock]
+ # a = 59
+ a = dectime(60, 10, 0.1))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="deg2rad">
+ <return type="float">
+ </return>
+ <argument index="0" name="deg" type="float">
+ </argument>
+ <description>
+ Converts an angle expressed in degrees to radians.
+ [codeblock]
+ # r is 3.141593
+ r = deg2rad(180)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="ease">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="curve" type="float">
+ </argument>
+ <description>
+ Easing function, based on exponent. The curve values are: 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in.
+ </description>
+ </method>
+ <method name="exp">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]x[/code] and returns it.
+ [b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].
+ For exponents to other bases use the method [method pow].
+ [codeblock]
+ a = exp(2) # Approximately 7.39
+ [/codeblock]
+ </description>
+ </method>
+ <method name="floor">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code].
+ [codeblock]
+ # a is 2.0
+ a = floor(2.99)
+ # a is -3.0
+ a = floor(-2.99)
+ [/codeblock]
+ See also [method ceil], [method round], and [method snapped].
+ [b]Note:[/b] This method returns a float. If you need an integer, you can use [code]int(x)[/code] directly.
+ </description>
+ </method>
+ <method name="fmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [code]x[/code].
+ [codeblock]
+ # Remainder is 1.5
+ var remainder = fmod(7, 5.5)
+ [/codeblock]
+ For the integer remainder operation, use the [code]%[/code] operator.
+ </description>
+ </method>
+ <method name="fposmod">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="y" type="float">
+ </argument>
+ <description>
+ Returns the floating-point modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ [codeblock]
+ for i in 7:
+ var x = 0.5 * i - 1.5
+ print("%4.1f %4.1f %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
+ [/codeblock]
+ Produces:
+ [codeblock]
+ -1.5 -0.0 0.0
+ -1.0 -1.0 0.5
+ -0.5 -0.5 1.0
+ 0.0 0.0 0.0
+ 0.5 0.5 0.5
+ 1.0 1.0 1.0
+ 1.5 0.0 0.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="hash">
+ <return type="int">
+ </return>
+ <argument index="0" name="variable" type="Variant">
+ </argument>
+ <description>
+ Returns the integer hash of the variable passed.
+ [codeblock]
+ print(hash("a")) # Prints 177670
+ [/codeblock]
+ </description>
+ </method>
+ <method name="instance_from_id">
+ <return type="Object">
+ </return>
+ <argument index="0" name="instance_id" type="int">
+ </argument>
+ <description>
+ Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID.
+ [codeblock]
+ var foo = "bar"
+ func _ready():
+ var id = get_instance_id()
+ var inst = instance_from_id(id)
+ print(inst.foo) # Prints bar
+ [/codeblock]
+ </description>
+ </method>
+ <method name="inverse_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Returns a normalized value considering the given range. This is the opposite of [method lerp].
+ [codeblock]
+ var middle = lerp(20, 30, 0.75)
+ # `middle` is now 27.5.
+ # Now, we pretend to have forgotten the original ratio and want to get it back.
+ var ratio = inverse_lerp(20, 30, 27.5)
+ # `ratio` is now 0.75.
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_equal_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other.
+ Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
+ Infinity values of the same sign are considered equal.
+ </description>
+ </method>
+ <method name="is_inf">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity).
+ </description>
+ </method>
+ <method name="is_instance_id_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_instance_valid">
+ <return type="bool">
+ </return>
+ <argument index="0" name="instance" type="Variant">
+ </argument>
+ <description>
+ Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory).
+ </description>
+ </method>
+ <method name="is_nan">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value.
+ </description>
+ </method>
+ <method name="is_zero_approx">
+ <return type="bool">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns [code]true[/code] if [code]x[/code] is zero or almost zero.
+ This method is faster than using [method is_equal_approx] with one value as zero.
+ </description>
+ </method>
+ <method name="lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp].
+ [codeblock]
+ lerp(0, 4, 0.75) # Returns 3.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="lerp_angle">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="weight" type="float">
+ </argument>
+ <description>
+ Linearly interpolates between two angles (in radians) by a normalized value.
+ Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].
+ [codeblock]
+ extends Sprite
+ var elapsed = 0.0
+ func _process(delta):
+ var min_angle = deg2rad(0.0)
+ var max_angle = deg2rad(90.0)
+ rotation = lerp_angle(min_angle, max_angle, elapsed)
+ elapsed += delta
+ [/codeblock]
+ </description>
+ </method>
+ <method name="linear2db">
+ <return type="float">
+ </return>
+ <argument index="0" name="lin" type="float">
+ </argument>
+ <description>
+ Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example:
+ [codeblock]
+ # "Slider" refers to a node that inherits Range such as HSlider or VSlider.
+ # Its range must be configured to go from 0 to 1.
+ # Change the bus name if you'd like to change the volume of a specific bus only.
+ AudioServer.set_bus_volume_db(AudioServer.get_bus_index("Master"), linear2db($Slider.value))
+ [/codeblock]
+ </description>
+ </method>
+ <method name="log">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
+ [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
+ [codeblock]
+ log(10) # Returns 2.302585
+ [/codeblock]
+ [b]Note:[/b] The logarithm of [code]0[/code] returns [code]-inf[/code], while negative values return [code]-nan[/code].
+ </description>
+ </method>
+ <method name="max" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <description>
+ Returns the maximum of the given values. This method can take any number of arguments.
+ [codeblock]
+ max(1, 7, 3, -6, 5) # Returns 7
+ [/codeblock]
+ </description>
+ </method>
+ <method name="maxf">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the maximum of two float values.
+ [codeblock]
+ maxf(3.6, 24) # Returns 24.0
+ maxf(-3.99, -4) # Returns -3.99
+ [/codeblock]
+ </description>
+ </method>
+ <method name="maxi">
+ <return type="int">
+ </return>
+ <argument index="0" name="a" type="int">
+ </argument>
+ <argument index="1" name="b" type="int">
+ </argument>
+ <description>
+ Returns the maximum of two int values.
+ [codeblock]
+ maxi(1, 2) # Returns 2
+ maxi(-3, -4) # Returns -3
+ [/codeblock]
+ </description>
+ </method>
+ <method name="min" qualifiers="vararg">
+ <return type="Variant">
+ </return>
+ <description>
+ Returns the minimum of the given values. This method can take any number of arguments.
+ [codeblock]
+ min(1, 7, 3, -6, 5) # Returns -6
+ [/codeblock]
+ </description>
+ </method>
+ <method name="minf">
+ <return type="float">
+ </return>
+ <argument index="0" name="a" type="float">
+ </argument>
+ <argument index="1" name="b" type="float">
+ </argument>
+ <description>
+ Returns the minimum of two float values.
+ [codeblock]
+ minf(3.6, 24) # Returns 3.6
+ minf(-3.99, -4) # Returns -4.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="mini">
+ <return type="int">
+ </return>
+ <argument index="0" name="a" type="int">
+ </argument>
+ <argument index="1" name="b" type="int">
+ </argument>
+ <description>
+ Returns the minimum of two int values.
+ [codeblock]
+ mini(1, 2) # Returns 1
+ mini(-3, -4) # Returns -4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="move_toward">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="delta" type="float">
+ </argument>
+ <description>
+ Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value.
+ Use a negative [code]delta[/code] value to move away.
+ [codeblock]
+ move_toward(5, 10, 4) # Returns 9
+ move_toward(10, 5, 4) # Returns 6
+ move_toward(10, 5, -1.5) # Returns 11.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="nearest_po2">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <description>
+ Returns the nearest equal or larger power of 2 for integer [code]value[/code].
+ In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value &lt;= a[/code] for some non-negative integer [code]n[/code].
+ [codeblock]
+ nearest_po2(3) # Returns 4
+ nearest_po2(4) # Returns 4
+ nearest_po2(5) # Returns 8
+
+ nearest_po2(0) # Returns 0 (this may not be what you expect)
+ nearest_po2(-1) # Returns 0 (this may not be what you expect)
+ [/codeblock]
+ [b]WARNING:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2).
+ </description>
+ </method>
+ <method name="polar2cartesian">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="r" type="float">
+ </argument>
+ <argument index="1" name="th" type="float">
+ </argument>
+ <description>
+ Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis).
+ </description>
+ </method>
+ <method name="pow">
+ <return type="float">
+ </return>
+ <argument index="0" name="base" type="float">
+ </argument>
+ <argument index="1" name="exp" type="float">
+ </argument>
+ <description>
+ Returns the result of [code]base[/code] raised to the power of [code]exp[/code].
+ [codeblock]
+ pow(2, 5) # Returns 32
+ [/codeblock]
+ </description>
+ </method>
+ <method name="print" qualifiers="vararg">
+ <description>
+ Converts one or more arguments of any type to string in the best way possible and prints them to the console.
+ [codeblock]
+ a = [1, 2, 3]
+ print("a", "b", a) # Prints ab[1, 2, 3]
+ [/codeblock]
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
+ </description>
+ </method>
+ <method name="printerr" qualifiers="vararg">
+ <description>
+ Prints one or more arguments to strings in the best way possible to standard error line.
+ [codeblock]
+ printerr("prints to stderr")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printraw" qualifiers="vararg">
+ <description>
+ Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ [codeblock]
+ printraw("A")
+ printraw("B")
+ # Prints AB
+ [/codeblock]
+ [b]Note:[/b] Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as [method print].
+ </description>
+ </method>
+ <method name="prints" qualifiers="vararg">
+ <description>
+ Prints one or more arguments to the console with a space between each argument.
+ [codeblock]
+ prints("A", "B", "C") # Prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="printt" qualifiers="vararg">
+ <description>
+ Prints one or more arguments to the console with a tab between each argument.
+ [codeblock]
+ printt("A", "B", "C") # Prints A B C
+ [/codeblock]
+ </description>
+ </method>
+ <method name="push_error" qualifiers="vararg">
+ <description>
+ Pushes an error message to Godot's built-in debugger and to the OS terminal.
+ [codeblock]
+ push_error("test error") # Prints "test error" to debugger and terminal as error call
+ [/codeblock]
+ [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
+ </description>
+ </method>
+ <method name="push_warning" qualifiers="vararg">
+ <description>
+ Pushes a warning message to Godot's built-in debugger and to the OS terminal.
+ [codeblock]
+ push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rad2deg">
+ <return type="float">
+ </return>
+ <argument index="0" name="rad" type="float">
+ </argument>
+ <description>
+ Converts an angle expressed in radians to degrees.
+ [codeblock]
+ rad2deg(0.523599) # Returns 30
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rand_from_seed">
+ <return type="PackedInt64Array">
+ </return>
+ <argument index="0" name="seed" type="int">
+ </argument>
+ <description>
+ Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ </description>
+ </method>
+ <method name="randf">
+ <return type="float">
+ </return>
+ <description>
+ Returns a random floating point value on the interval [code][0, 1][/code].
+ [codeblock]
+ randf() # Returns e.g. 0.375671
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randf_range">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <description>
+ Random range, any floating point value between [code]from[/code] and [code]to[/code].
+ [codeblock]
+ prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randi">
+ <return type="int">
+ </return>
+ <description>
+ Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32).
+ [codeblock]
+ randi() # Returns random integer between 0 and 2^32 - 1
+ randi() % 20 # Returns random integer between 0 and 19
+ randi() % 100 # Returns random integer between 0 and 99
+ randi() % 100 + 1 # Returns random integer between 1 and 100
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randi_range">
+ <return type="int">
+ </return>
+ <argument index="0" name="from" type="int">
+ </argument>
+ <argument index="1" name="to" type="int">
+ </argument>
+ <description>
+ Random range, any 32-bit integer value between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code] they are swapped.
+ [codeblock]
+ print(randi_range(0, 1)) # Prints 0 or 1
+ print(randi_range(-10, 1000)) # Prints any number from -10 to 1000
+ [/codeblock]
+ </description>
+ </method>
+ <method name="randomize">
+ <description>
+ Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
+ [codeblock]
+ func _ready():
+ randomize()
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="istart" type="float">
+ </argument>
+ <argument index="2" name="istop" type="float">
+ </argument>
+ <argument index="3" name="ostart" type="float">
+ </argument>
+ <argument index="4" name="ostop" type="float">
+ </argument>
+ <description>
+ Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code].
+ [codeblock]
+ range_lerp(75, 0, 100, -1, 1) # Returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="range_step_decimals">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="round">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero.
+ [codeblock]
+ round(2.6) # Returns 3
+ [/codeblock]
+ See also [method floor], [method ceil], and [method snapped].
+ </description>
+ </method>
+ <method name="seed">
+ <argument index="0" name="base" type="int">
+ </argument>
+ <description>
+ Sets seed for the random number generator.
+ [codeblock]
+ my_seed = "Godot Rocks"
+ seed(my_seed.hash())
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sign">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="x" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="signf">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the sign of [code]x[/code] as a float: -1.0 or 1.0. Returns 0.0 if [code]x[/code] is 0.
+ [codeblock]
+ sign(-6.0) # Returns -1.0
+ sign(0.0) # Returns 0.0
+ sign(6.0) # Returns 1.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="signi">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="int">
+ </argument>
+ <description>
+ Returns the sign of [code]x[/code] as an integer: -1 or 1. Returns 0 if [code]x[/code] is 0.
+ [codeblock]
+ sign(-6) # Returns -1
+ sign(0) # Returns 0
+ sign(6) # Returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sin">
+ <return type="float">
+ </return>
+ <argument index="0" name="angle_rad" type="float">
+ </argument>
+ <description>
+ Returns the sine of angle [code]angle_rad[/code] in radians.
+ [codeblock]
+ sin(0.523599) # Returns 0.5
+ [/codeblock]
+ </description>
+ </method>
+ <method name="sinh">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic sine of [code]x[/code].
+ [codeblock]
+ a = log(2.0) # Returns 0.693147
+ sinh(a) # Returns 0.75
+ [/codeblock]
+ </description>
+ </method>
+ <method name="smoothstep">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="x" type="float">
+ </argument>
+ <description>
+ Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code].
+ The return value is [code]0[/code] if [code]x &lt;= from[/code], and [code]1[/code] if [code]x &gt;= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code].
+ This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].
+ [codeblock]
+ smoothstep(0, 2, -5.0) # Returns 0.0
+ smoothstep(0, 2, 0.5) # Returns 0.15625
+ smoothstep(0, 2, 1.0) # Returns 0.5
+ smoothstep(0, 2, 2.0) # Returns 1.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="snapped">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <argument index="1" name="step" type="float">
+ </argument>
+ <description>
+ Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals.
+ [codeblock]
+ snapped(100, 32) # Returns 96
+ snapped(3.14159, 0.01) # Returns 3.14
+ [/codeblock]
+ See also [method ceil], [method floor], and [method round].
+ </description>
+ </method>
+ <method name="sqrt">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the square root of [code]x[/code], where [code]x[/code] is a non-negative number.
+ [codeblock]
+ sqrt(9) # Returns 3
+ [/codeblock]
+ [b]Note:[/b]Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
+ </description>
+ </method>
+ <method name="step_decimals">
+ <return type="int">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
+ [codeblock]
+ # n is 0
+ n = step_decimals(5)
+ # n is 4
+ n = step_decimals(1.0005)
+ # n is 9
+ n = step_decimals(0.000000005)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="str" qualifiers="vararg">
+ <return type="String">
+ </return>
+ <description>
+ Converts one or more arguments of any type to string in the best way possible.
+ </description>
+ </method>
+ <method name="str2var">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <description>
+ Converts a formatted string that was returned by [method var2str] to the original value.
+ [codeblock]
+ a = '{ "a": 1, "b": 2 }'
+ b = str2var(a)
+ print(b["a"]) # Prints 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tan">
+ <return type="float">
+ </return>
+ <argument index="0" name="angle_rad" type="float">
+ </argument>
+ <description>
+ Returns the tangent of angle [code]angle_rad[/code] in radians.
+ [codeblock]
+ tan(deg2rad(45)) # Returns 1
+ [/codeblock]
+ </description>
+ </method>
+ <method name="tanh">
+ <return type="float">
+ </return>
+ <argument index="0" name="x" type="float">
+ </argument>
+ <description>
+ Returns the hyperbolic tangent of [code]x[/code].
+ [codeblock]
+ a = log(2.0) # Returns 0.693147
+ tanh(a) # Returns 0.6
+ [/codeblock]
+ </description>
+ </method>
+ <method name="typeof">
+ <return type="int">
+ </return>
+ <argument index="0" name="variable" type="Variant">
+ </argument>
+ <description>
+ Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
+ [codeblock]
+ p = parse_json('["a", "b", "c"]')
+ if typeof(p) == TYPE_ARRAY:
+ print(p[0]) # Prints a
+ else:
+ print("unexpected results")
+ [/codeblock]
+ </description>
+ </method>
+ <method name="var2bytes">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="variable" type="Variant">
+ </argument>
+ <description>
+ Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes2var].
+ [b]Note:[/b] If you need object serialization, see [method var2bytes_with_objects].
+ </description>
+ </method>
+ <method name="var2bytes_with_objects">
+ <return type="PackedByteArray">
+ </return>
+ <argument index="0" name="variable" type="Variant">
+ </argument>
+ <description>
+ Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with [method bytes2var_with_objects].
+ </description>
+ </method>
+ <method name="var2str">
+ <return type="String">
+ </return>
+ <argument index="0" name="variable" type="Variant">
+ </argument>
+ <description>
+ Converts a Variant [code]variable[/code] to a formatted string that can later be parsed using [method str2var].
+ [codeblock]
+ a = { "a": 1, "b": 2 }
+ print(var2str(a))
+ [/codeblock]
+ prints
+ [codeblock]
+ {
+ "a": 1,
+ "b": 2
+ }
+ [/codeblock]
+ </description>
+ </method>
+ <method name="weakref">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="obj" type="Variant">
+ </argument>
+ <description>
+ Returns a weak reference to an object, or [code]null[/code] is the argument is invalid.
+ A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
+ </description>
+ </method>
+ <method name="wrapf">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="min" type="float">
+ </argument>
+ <argument index="2" name="max" type="float">
+ </argument>
+ <description>
+ Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Usable for creating loop-alike behavior or infinite surfaces.
+ [codeblock]
+ # Infinite loop between 5.0 and 9.9
+ value = wrapf(value + 0.1, 5.0, 10.0)
+ [/codeblock]
+ [codeblock]
+ # Infinite rotation (in radians)
+ angle = wrapf(angle + 0.1, 0.0, TAU)
+ [/codeblock]
+ [codeblock]
+ # Infinite rotation (in radians)
+ angle = wrapf(angle + 0.1, -PI, PI)
+ [/codeblock]
+ [b]Note:[/b] If [code]min[/code] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
+ [code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
+ </description>
+ </method>
+ <method name="wrapi">
+ <return type="int">
+ </return>
+ <argument index="0" name="value" type="int">
+ </argument>
+ <argument index="1" name="min" type="int">
+ </argument>
+ <argument index="2" name="max" type="int">
+ </argument>
+ <description>
+ Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code].
+ Usable for creating loop-alike behavior or infinite surfaces.
+ [codeblock]
+ # Infinite loop between 5 and 9
+ frame = wrapi(frame + 1, 5, 10)
+ [/codeblock]
+ [codeblock]
+ # result is -2
+ var result = wrapi(-6, -5, -1)
+ [/codeblock]
+ </description>
+ </method>
</methods>
<members>
<member name="AudioServer" type="AudioServer" setter="" getter="">
@@ -95,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>
@@ -106,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.
@@ -136,6 +1280,10 @@
<constant name="HORIZONTAL" value="0" enum="Orientation">
General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
</constant>
+ <constant name="CLOCKWISE" value="0" enum="ClockDirection">
+ </constant>
+ <constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
+ </constant>
<constant name="HALIGN_LEFT" value="0" enum="HAlign">
Horizontal left alignment, usually for text-derived classes.
</constant>
@@ -145,6 +1293,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>
@@ -157,730 +1308,730 @@
<constant name="SPKEY" value="16777216">
Keycodes with this bit applied are non-printable.
</constant>
- <constant name="KEY_ESCAPE" value="16777217" enum="KeyList">
+ <constant name="KEY_ESCAPE" value="16777217" enum="Key">
Escape key.
</constant>
- <constant name="KEY_TAB" value="16777218" enum="KeyList">
+ <constant name="KEY_TAB" value="16777218" enum="Key">
Tab key.
</constant>
- <constant name="KEY_BACKTAB" value="16777219" enum="KeyList">
+ <constant name="KEY_BACKTAB" value="16777219" enum="Key">
Shift + Tab key.
</constant>
- <constant name="KEY_BACKSPACE" value="16777220" enum="KeyList">
+ <constant name="KEY_BACKSPACE" value="16777220" enum="Key">
Backspace key.
</constant>
- <constant name="KEY_ENTER" value="16777221" enum="KeyList">
+ <constant name="KEY_ENTER" value="16777221" enum="Key">
Return key (on the main keyboard).
</constant>
- <constant name="KEY_KP_ENTER" value="16777222" enum="KeyList">
+ <constant name="KEY_KP_ENTER" value="16777222" enum="Key">
Enter key on the numeric keypad.
</constant>
- <constant name="KEY_INSERT" value="16777223" enum="KeyList">
+ <constant name="KEY_INSERT" value="16777223" enum="Key">
Insert key.
</constant>
- <constant name="KEY_DELETE" value="16777224" enum="KeyList">
+ <constant name="KEY_DELETE" value="16777224" enum="Key">
Delete key.
</constant>
- <constant name="KEY_PAUSE" value="16777225" enum="KeyList">
+ <constant name="KEY_PAUSE" value="16777225" enum="Key">
Pause key.
</constant>
- <constant name="KEY_PRINT" value="16777226" enum="KeyList">
+ <constant name="KEY_PRINT" value="16777226" enum="Key">
Print Screen key.
</constant>
- <constant name="KEY_SYSREQ" value="16777227" enum="KeyList">
+ <constant name="KEY_SYSREQ" value="16777227" enum="Key">
System Request key.
</constant>
- <constant name="KEY_CLEAR" value="16777228" enum="KeyList">
+ <constant name="KEY_CLEAR" value="16777228" enum="Key">
Clear key.
</constant>
- <constant name="KEY_HOME" value="16777229" enum="KeyList">
+ <constant name="KEY_HOME" value="16777229" enum="Key">
Home key.
</constant>
- <constant name="KEY_END" value="16777230" enum="KeyList">
+ <constant name="KEY_END" value="16777230" enum="Key">
End key.
</constant>
- <constant name="KEY_LEFT" value="16777231" enum="KeyList">
+ <constant name="KEY_LEFT" value="16777231" enum="Key">
Left arrow key.
</constant>
- <constant name="KEY_UP" value="16777232" enum="KeyList">
+ <constant name="KEY_UP" value="16777232" enum="Key">
Up arrow key.
</constant>
- <constant name="KEY_RIGHT" value="16777233" enum="KeyList">
+ <constant name="KEY_RIGHT" value="16777233" enum="Key">
Right arrow key.
</constant>
- <constant name="KEY_DOWN" value="16777234" enum="KeyList">
+ <constant name="KEY_DOWN" value="16777234" enum="Key">
Down arrow key.
</constant>
- <constant name="KEY_PAGEUP" value="16777235" enum="KeyList">
+ <constant name="KEY_PAGEUP" value="16777235" enum="Key">
Page Up key.
</constant>
- <constant name="KEY_PAGEDOWN" value="16777236" enum="KeyList">
+ <constant name="KEY_PAGEDOWN" value="16777236" enum="Key">
Page Down key.
</constant>
- <constant name="KEY_SHIFT" value="16777237" enum="KeyList">
+ <constant name="KEY_SHIFT" value="16777237" enum="Key">
Shift key.
</constant>
- <constant name="KEY_CONTROL" value="16777238" enum="KeyList">
+ <constant name="KEY_CONTROL" value="16777238" enum="Key">
Control key.
</constant>
- <constant name="KEY_META" value="16777239" enum="KeyList">
+ <constant name="KEY_META" value="16777239" enum="Key">
Meta key.
</constant>
- <constant name="KEY_ALT" value="16777240" enum="KeyList">
+ <constant name="KEY_ALT" value="16777240" enum="Key">
Alt key.
</constant>
- <constant name="KEY_CAPSLOCK" value="16777241" enum="KeyList">
+ <constant name="KEY_CAPSLOCK" value="16777241" enum="Key">
Caps Lock key.
</constant>
- <constant name="KEY_NUMLOCK" value="16777242" enum="KeyList">
+ <constant name="KEY_NUMLOCK" value="16777242" enum="Key">
Num Lock key.
</constant>
- <constant name="KEY_SCROLLLOCK" value="16777243" enum="KeyList">
+ <constant name="KEY_SCROLLLOCK" value="16777243" enum="Key">
Scroll Lock key.
</constant>
- <constant name="KEY_F1" value="16777244" enum="KeyList">
+ <constant name="KEY_F1" value="16777244" enum="Key">
F1 key.
</constant>
- <constant name="KEY_F2" value="16777245" enum="KeyList">
+ <constant name="KEY_F2" value="16777245" enum="Key">
F2 key.
</constant>
- <constant name="KEY_F3" value="16777246" enum="KeyList">
+ <constant name="KEY_F3" value="16777246" enum="Key">
F3 key.
</constant>
- <constant name="KEY_F4" value="16777247" enum="KeyList">
+ <constant name="KEY_F4" value="16777247" enum="Key">
F4 key.
</constant>
- <constant name="KEY_F5" value="16777248" enum="KeyList">
+ <constant name="KEY_F5" value="16777248" enum="Key">
F5 key.
</constant>
- <constant name="KEY_F6" value="16777249" enum="KeyList">
+ <constant name="KEY_F6" value="16777249" enum="Key">
F6 key.
</constant>
- <constant name="KEY_F7" value="16777250" enum="KeyList">
+ <constant name="KEY_F7" value="16777250" enum="Key">
F7 key.
</constant>
- <constant name="KEY_F8" value="16777251" enum="KeyList">
+ <constant name="KEY_F8" value="16777251" enum="Key">
F8 key.
</constant>
- <constant name="KEY_F9" value="16777252" enum="KeyList">
+ <constant name="KEY_F9" value="16777252" enum="Key">
F9 key.
</constant>
- <constant name="KEY_F10" value="16777253" enum="KeyList">
+ <constant name="KEY_F10" value="16777253" enum="Key">
F10 key.
</constant>
- <constant name="KEY_F11" value="16777254" enum="KeyList">
+ <constant name="KEY_F11" value="16777254" enum="Key">
F11 key.
</constant>
- <constant name="KEY_F12" value="16777255" enum="KeyList">
+ <constant name="KEY_F12" value="16777255" enum="Key">
F12 key.
</constant>
- <constant name="KEY_F13" value="16777256" enum="KeyList">
+ <constant name="KEY_F13" value="16777256" enum="Key">
F13 key.
</constant>
- <constant name="KEY_F14" value="16777257" enum="KeyList">
+ <constant name="KEY_F14" value="16777257" enum="Key">
F14 key.
</constant>
- <constant name="KEY_F15" value="16777258" enum="KeyList">
+ <constant name="KEY_F15" value="16777258" enum="Key">
F15 key.
</constant>
- <constant name="KEY_F16" value="16777259" enum="KeyList">
+ <constant name="KEY_F16" value="16777259" enum="Key">
F16 key.
</constant>
- <constant name="KEY_KP_MULTIPLY" value="16777345" enum="KeyList">
+ <constant name="KEY_KP_MULTIPLY" value="16777345" enum="Key">
Multiply (*) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_DIVIDE" value="16777346" enum="KeyList">
+ <constant name="KEY_KP_DIVIDE" value="16777346" enum="Key">
Divide (/) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_SUBTRACT" value="16777347" enum="KeyList">
+ <constant name="KEY_KP_SUBTRACT" value="16777347" enum="Key">
Subtract (-) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_PERIOD" value="16777348" enum="KeyList">
+ <constant name="KEY_KP_PERIOD" value="16777348" enum="Key">
Period (.) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_ADD" value="16777349" enum="KeyList">
+ <constant name="KEY_KP_ADD" value="16777349" enum="Key">
Add (+) key on the numeric keypad.
</constant>
- <constant name="KEY_KP_0" value="16777350" enum="KeyList">
+ <constant name="KEY_KP_0" value="16777350" enum="Key">
Number 0 on the numeric keypad.
</constant>
- <constant name="KEY_KP_1" value="16777351" enum="KeyList">
+ <constant name="KEY_KP_1" value="16777351" enum="Key">
Number 1 on the numeric keypad.
</constant>
- <constant name="KEY_KP_2" value="16777352" enum="KeyList">
+ <constant name="KEY_KP_2" value="16777352" enum="Key">
Number 2 on the numeric keypad.
</constant>
- <constant name="KEY_KP_3" value="16777353" enum="KeyList">
+ <constant name="KEY_KP_3" value="16777353" enum="Key">
Number 3 on the numeric keypad.
</constant>
- <constant name="KEY_KP_4" value="16777354" enum="KeyList">
+ <constant name="KEY_KP_4" value="16777354" enum="Key">
Number 4 on the numeric keypad.
</constant>
- <constant name="KEY_KP_5" value="16777355" enum="KeyList">
+ <constant name="KEY_KP_5" value="16777355" enum="Key">
Number 5 on the numeric keypad.
</constant>
- <constant name="KEY_KP_6" value="16777356" enum="KeyList">
+ <constant name="KEY_KP_6" value="16777356" enum="Key">
Number 6 on the numeric keypad.
</constant>
- <constant name="KEY_KP_7" value="16777357" enum="KeyList">
+ <constant name="KEY_KP_7" value="16777357" enum="Key">
Number 7 on the numeric keypad.
</constant>
- <constant name="KEY_KP_8" value="16777358" enum="KeyList">
+ <constant name="KEY_KP_8" value="16777358" enum="Key">
Number 8 on the numeric keypad.
</constant>
- <constant name="KEY_KP_9" value="16777359" enum="KeyList">
+ <constant name="KEY_KP_9" value="16777359" enum="Key">
Number 9 on the numeric keypad.
</constant>
- <constant name="KEY_SUPER_L" value="16777260" enum="KeyList">
+ <constant name="KEY_SUPER_L" value="16777260" enum="Key">
Left Super key (Windows key).
</constant>
- <constant name="KEY_SUPER_R" value="16777261" enum="KeyList">
+ <constant name="KEY_SUPER_R" value="16777261" enum="Key">
Right Super key (Windows key).
</constant>
- <constant name="KEY_MENU" value="16777262" enum="KeyList">
+ <constant name="KEY_MENU" value="16777262" enum="Key">
Context menu key.
</constant>
- <constant name="KEY_HYPER_L" value="16777263" enum="KeyList">
+ <constant name="KEY_HYPER_L" value="16777263" enum="Key">
Left Hyper key.
</constant>
- <constant name="KEY_HYPER_R" value="16777264" enum="KeyList">
+ <constant name="KEY_HYPER_R" value="16777264" enum="Key">
Right Hyper key.
</constant>
- <constant name="KEY_HELP" value="16777265" enum="KeyList">
+ <constant name="KEY_HELP" value="16777265" enum="Key">
Help key.
</constant>
- <constant name="KEY_DIRECTION_L" value="16777266" enum="KeyList">
+ <constant name="KEY_DIRECTION_L" value="16777266" enum="Key">
Left Direction key.
</constant>
- <constant name="KEY_DIRECTION_R" value="16777267" enum="KeyList">
+ <constant name="KEY_DIRECTION_R" value="16777267" enum="Key">
Right Direction key.
</constant>
- <constant name="KEY_BACK" value="16777280" enum="KeyList">
+ <constant name="KEY_BACK" value="16777280" enum="Key">
Media back key. Not to be confused with the Back button on an Android device.
</constant>
- <constant name="KEY_FORWARD" value="16777281" enum="KeyList">
+ <constant name="KEY_FORWARD" value="16777281" enum="Key">
Media forward key.
</constant>
- <constant name="KEY_STOP" value="16777282" enum="KeyList">
+ <constant name="KEY_STOP" value="16777282" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_REFRESH" value="16777283" enum="KeyList">
+ <constant name="KEY_REFRESH" value="16777283" enum="Key">
Media refresh key.
</constant>
- <constant name="KEY_VOLUMEDOWN" value="16777284" enum="KeyList">
+ <constant name="KEY_VOLUMEDOWN" value="16777284" enum="Key">
Volume down key.
</constant>
- <constant name="KEY_VOLUMEMUTE" value="16777285" enum="KeyList">
+ <constant name="KEY_VOLUMEMUTE" value="16777285" enum="Key">
Mute volume key.
</constant>
- <constant name="KEY_VOLUMEUP" value="16777286" enum="KeyList">
+ <constant name="KEY_VOLUMEUP" value="16777286" enum="Key">
Volume up key.
</constant>
- <constant name="KEY_BASSBOOST" value="16777287" enum="KeyList">
+ <constant name="KEY_BASSBOOST" value="16777287" enum="Key">
Bass Boost key.
</constant>
- <constant name="KEY_BASSUP" value="16777288" enum="KeyList">
+ <constant name="KEY_BASSUP" value="16777288" enum="Key">
Bass up key.
</constant>
- <constant name="KEY_BASSDOWN" value="16777289" enum="KeyList">
+ <constant name="KEY_BASSDOWN" value="16777289" enum="Key">
Bass down key.
</constant>
- <constant name="KEY_TREBLEUP" value="16777290" enum="KeyList">
+ <constant name="KEY_TREBLEUP" value="16777290" enum="Key">
Treble up key.
</constant>
- <constant name="KEY_TREBLEDOWN" value="16777291" enum="KeyList">
+ <constant name="KEY_TREBLEDOWN" value="16777291" enum="Key">
Treble down key.
</constant>
- <constant name="KEY_MEDIAPLAY" value="16777292" enum="KeyList">
+ <constant name="KEY_MEDIAPLAY" value="16777292" enum="Key">
Media play key.
</constant>
- <constant name="KEY_MEDIASTOP" value="16777293" enum="KeyList">
+ <constant name="KEY_MEDIASTOP" value="16777293" enum="Key">
Media stop key.
</constant>
- <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="KeyList">
+ <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="Key">
Previous song key.
</constant>
- <constant name="KEY_MEDIANEXT" value="16777295" enum="KeyList">
+ <constant name="KEY_MEDIANEXT" value="16777295" enum="Key">
Next song key.
</constant>
- <constant name="KEY_MEDIARECORD" value="16777296" enum="KeyList">
+ <constant name="KEY_MEDIARECORD" value="16777296" enum="Key">
Media record key.
</constant>
- <constant name="KEY_HOMEPAGE" value="16777297" enum="KeyList">
+ <constant name="KEY_HOMEPAGE" value="16777297" enum="Key">
Home page key.
</constant>
- <constant name="KEY_FAVORITES" value="16777298" enum="KeyList">
+ <constant name="KEY_FAVORITES" value="16777298" enum="Key">
Favorites key.
</constant>
- <constant name="KEY_SEARCH" value="16777299" enum="KeyList">
+ <constant name="KEY_SEARCH" value="16777299" enum="Key">
Search key.
</constant>
- <constant name="KEY_STANDBY" value="16777300" enum="KeyList">
+ <constant name="KEY_STANDBY" value="16777300" enum="Key">
Standby key.
</constant>
- <constant name="KEY_OPENURL" value="16777301" enum="KeyList">
+ <constant name="KEY_OPENURL" value="16777301" enum="Key">
Open URL / Launch Browser key.
</constant>
- <constant name="KEY_LAUNCHMAIL" value="16777302" enum="KeyList">
+ <constant name="KEY_LAUNCHMAIL" value="16777302" enum="Key">
Launch Mail key.
</constant>
- <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="KeyList">
+ <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="Key">
Launch Media key.
</constant>
- <constant name="KEY_LAUNCH0" value="16777304" enum="KeyList">
+ <constant name="KEY_LAUNCH0" value="16777304" enum="Key">
Launch Shortcut 0 key.
</constant>
- <constant name="KEY_LAUNCH1" value="16777305" enum="KeyList">
+ <constant name="KEY_LAUNCH1" value="16777305" enum="Key">
Launch Shortcut 1 key.
</constant>
- <constant name="KEY_LAUNCH2" value="16777306" enum="KeyList">
+ <constant name="KEY_LAUNCH2" value="16777306" enum="Key">
Launch Shortcut 2 key.
</constant>
- <constant name="KEY_LAUNCH3" value="16777307" enum="KeyList">
+ <constant name="KEY_LAUNCH3" value="16777307" enum="Key">
Launch Shortcut 3 key.
</constant>
- <constant name="KEY_LAUNCH4" value="16777308" enum="KeyList">
+ <constant name="KEY_LAUNCH4" value="16777308" enum="Key">
Launch Shortcut 4 key.
</constant>
- <constant name="KEY_LAUNCH5" value="16777309" enum="KeyList">
+ <constant name="KEY_LAUNCH5" value="16777309" enum="Key">
Launch Shortcut 5 key.
</constant>
- <constant name="KEY_LAUNCH6" value="16777310" enum="KeyList">
+ <constant name="KEY_LAUNCH6" value="16777310" enum="Key">
Launch Shortcut 6 key.
</constant>
- <constant name="KEY_LAUNCH7" value="16777311" enum="KeyList">
+ <constant name="KEY_LAUNCH7" value="16777311" enum="Key">
Launch Shortcut 7 key.
</constant>
- <constant name="KEY_LAUNCH8" value="16777312" enum="KeyList">
+ <constant name="KEY_LAUNCH8" value="16777312" enum="Key">
Launch Shortcut 8 key.
</constant>
- <constant name="KEY_LAUNCH9" value="16777313" enum="KeyList">
+ <constant name="KEY_LAUNCH9" value="16777313" enum="Key">
Launch Shortcut 9 key.
</constant>
- <constant name="KEY_LAUNCHA" value="16777314" enum="KeyList">
+ <constant name="KEY_LAUNCHA" value="16777314" enum="Key">
Launch Shortcut A key.
</constant>
- <constant name="KEY_LAUNCHB" value="16777315" enum="KeyList">
+ <constant name="KEY_LAUNCHB" value="16777315" enum="Key">
Launch Shortcut B key.
</constant>
- <constant name="KEY_LAUNCHC" value="16777316" enum="KeyList">
+ <constant name="KEY_LAUNCHC" value="16777316" enum="Key">
Launch Shortcut C key.
</constant>
- <constant name="KEY_LAUNCHD" value="16777317" enum="KeyList">
+ <constant name="KEY_LAUNCHD" value="16777317" enum="Key">
Launch Shortcut D key.
</constant>
- <constant name="KEY_LAUNCHE" value="16777318" enum="KeyList">
+ <constant name="KEY_LAUNCHE" value="16777318" enum="Key">
Launch Shortcut E key.
</constant>
- <constant name="KEY_LAUNCHF" value="16777319" enum="KeyList">
+ <constant name="KEY_LAUNCHF" value="16777319" enum="Key">
Launch Shortcut F key.
</constant>
- <constant name="KEY_UNKNOWN" value="33554431" enum="KeyList">
+ <constant name="KEY_UNKNOWN" value="33554431" enum="Key">
Unknown key.
</constant>
- <constant name="KEY_SPACE" value="32" enum="KeyList">
+ <constant name="KEY_SPACE" value="32" enum="Key">
Space key.
</constant>
- <constant name="KEY_EXCLAM" value="33" enum="KeyList">
+ <constant name="KEY_EXCLAM" value="33" enum="Key">
! key.
</constant>
- <constant name="KEY_QUOTEDBL" value="34" enum="KeyList">
+ <constant name="KEY_QUOTEDBL" value="34" enum="Key">
" key.
</constant>
- <constant name="KEY_NUMBERSIGN" value="35" enum="KeyList">
+ <constant name="KEY_NUMBERSIGN" value="35" enum="Key">
# key.
</constant>
- <constant name="KEY_DOLLAR" value="36" enum="KeyList">
+ <constant name="KEY_DOLLAR" value="36" enum="Key">
$ key.
</constant>
- <constant name="KEY_PERCENT" value="37" enum="KeyList">
+ <constant name="KEY_PERCENT" value="37" enum="Key">
% key.
</constant>
- <constant name="KEY_AMPERSAND" value="38" enum="KeyList">
+ <constant name="KEY_AMPERSAND" value="38" enum="Key">
&amp; key.
</constant>
- <constant name="KEY_APOSTROPHE" value="39" enum="KeyList">
+ <constant name="KEY_APOSTROPHE" value="39" enum="Key">
' key.
</constant>
- <constant name="KEY_PARENLEFT" value="40" enum="KeyList">
+ <constant name="KEY_PARENLEFT" value="40" enum="Key">
( key.
</constant>
- <constant name="KEY_PARENRIGHT" value="41" enum="KeyList">
+ <constant name="KEY_PARENRIGHT" value="41" enum="Key">
) key.
</constant>
- <constant name="KEY_ASTERISK" value="42" enum="KeyList">
+ <constant name="KEY_ASTERISK" value="42" enum="Key">
* key.
</constant>
- <constant name="KEY_PLUS" value="43" enum="KeyList">
+ <constant name="KEY_PLUS" value="43" enum="Key">
+ key.
</constant>
- <constant name="KEY_COMMA" value="44" enum="KeyList">
+ <constant name="KEY_COMMA" value="44" enum="Key">
, key.
</constant>
- <constant name="KEY_MINUS" value="45" enum="KeyList">
+ <constant name="KEY_MINUS" value="45" enum="Key">
- key.
</constant>
- <constant name="KEY_PERIOD" value="46" enum="KeyList">
+ <constant name="KEY_PERIOD" value="46" enum="Key">
. key.
</constant>
- <constant name="KEY_SLASH" value="47" enum="KeyList">
+ <constant name="KEY_SLASH" value="47" enum="Key">
/ key.
</constant>
- <constant name="KEY_0" value="48" enum="KeyList">
+ <constant name="KEY_0" value="48" enum="Key">
Number 0.
</constant>
- <constant name="KEY_1" value="49" enum="KeyList">
+ <constant name="KEY_1" value="49" enum="Key">
Number 1.
</constant>
- <constant name="KEY_2" value="50" enum="KeyList">
+ <constant name="KEY_2" value="50" enum="Key">
Number 2.
</constant>
- <constant name="KEY_3" value="51" enum="KeyList">
+ <constant name="KEY_3" value="51" enum="Key">
Number 3.
</constant>
- <constant name="KEY_4" value="52" enum="KeyList">
+ <constant name="KEY_4" value="52" enum="Key">
Number 4.
</constant>
- <constant name="KEY_5" value="53" enum="KeyList">
+ <constant name="KEY_5" value="53" enum="Key">
Number 5.
</constant>
- <constant name="KEY_6" value="54" enum="KeyList">
+ <constant name="KEY_6" value="54" enum="Key">
Number 6.
</constant>
- <constant name="KEY_7" value="55" enum="KeyList">
+ <constant name="KEY_7" value="55" enum="Key">
Number 7.
</constant>
- <constant name="KEY_8" value="56" enum="KeyList">
+ <constant name="KEY_8" value="56" enum="Key">
Number 8.
</constant>
- <constant name="KEY_9" value="57" enum="KeyList">
+ <constant name="KEY_9" value="57" enum="Key">
Number 9.
</constant>
- <constant name="KEY_COLON" value="58" enum="KeyList">
+ <constant name="KEY_COLON" value="58" enum="Key">
: key.
</constant>
- <constant name="KEY_SEMICOLON" value="59" enum="KeyList">
+ <constant name="KEY_SEMICOLON" value="59" enum="Key">
; key.
</constant>
- <constant name="KEY_LESS" value="60" enum="KeyList">
+ <constant name="KEY_LESS" value="60" enum="Key">
&lt; key.
</constant>
- <constant name="KEY_EQUAL" value="61" enum="KeyList">
+ <constant name="KEY_EQUAL" value="61" enum="Key">
= key.
</constant>
- <constant name="KEY_GREATER" value="62" enum="KeyList">
+ <constant name="KEY_GREATER" value="62" enum="Key">
&gt; key.
</constant>
- <constant name="KEY_QUESTION" value="63" enum="KeyList">
+ <constant name="KEY_QUESTION" value="63" enum="Key">
? key.
</constant>
- <constant name="KEY_AT" value="64" enum="KeyList">
+ <constant name="KEY_AT" value="64" enum="Key">
@ key.
</constant>
- <constant name="KEY_A" value="65" enum="KeyList">
+ <constant name="KEY_A" value="65" enum="Key">
A key.
</constant>
- <constant name="KEY_B" value="66" enum="KeyList">
+ <constant name="KEY_B" value="66" enum="Key">
B key.
</constant>
- <constant name="KEY_C" value="67" enum="KeyList">
+ <constant name="KEY_C" value="67" enum="Key">
C key.
</constant>
- <constant name="KEY_D" value="68" enum="KeyList">
+ <constant name="KEY_D" value="68" enum="Key">
D key.
</constant>
- <constant name="KEY_E" value="69" enum="KeyList">
+ <constant name="KEY_E" value="69" enum="Key">
E key.
</constant>
- <constant name="KEY_F" value="70" enum="KeyList">
+ <constant name="KEY_F" value="70" enum="Key">
F key.
</constant>
- <constant name="KEY_G" value="71" enum="KeyList">
+ <constant name="KEY_G" value="71" enum="Key">
G key.
</constant>
- <constant name="KEY_H" value="72" enum="KeyList">
+ <constant name="KEY_H" value="72" enum="Key">
H key.
</constant>
- <constant name="KEY_I" value="73" enum="KeyList">
+ <constant name="KEY_I" value="73" enum="Key">
I key.
</constant>
- <constant name="KEY_J" value="74" enum="KeyList">
+ <constant name="KEY_J" value="74" enum="Key">
J key.
</constant>
- <constant name="KEY_K" value="75" enum="KeyList">
+ <constant name="KEY_K" value="75" enum="Key">
K key.
</constant>
- <constant name="KEY_L" value="76" enum="KeyList">
+ <constant name="KEY_L" value="76" enum="Key">
L key.
</constant>
- <constant name="KEY_M" value="77" enum="KeyList">
+ <constant name="KEY_M" value="77" enum="Key">
M key.
</constant>
- <constant name="KEY_N" value="78" enum="KeyList">
+ <constant name="KEY_N" value="78" enum="Key">
N key.
</constant>
- <constant name="KEY_O" value="79" enum="KeyList">
+ <constant name="KEY_O" value="79" enum="Key">
O key.
</constant>
- <constant name="KEY_P" value="80" enum="KeyList">
+ <constant name="KEY_P" value="80" enum="Key">
P key.
</constant>
- <constant name="KEY_Q" value="81" enum="KeyList">
+ <constant name="KEY_Q" value="81" enum="Key">
Q key.
</constant>
- <constant name="KEY_R" value="82" enum="KeyList">
+ <constant name="KEY_R" value="82" enum="Key">
R key.
</constant>
- <constant name="KEY_S" value="83" enum="KeyList">
+ <constant name="KEY_S" value="83" enum="Key">
S key.
</constant>
- <constant name="KEY_T" value="84" enum="KeyList">
+ <constant name="KEY_T" value="84" enum="Key">
T key.
</constant>
- <constant name="KEY_U" value="85" enum="KeyList">
+ <constant name="KEY_U" value="85" enum="Key">
U key.
</constant>
- <constant name="KEY_V" value="86" enum="KeyList">
+ <constant name="KEY_V" value="86" enum="Key">
V key.
</constant>
- <constant name="KEY_W" value="87" enum="KeyList">
+ <constant name="KEY_W" value="87" enum="Key">
W key.
</constant>
- <constant name="KEY_X" value="88" enum="KeyList">
+ <constant name="KEY_X" value="88" enum="Key">
X key.
</constant>
- <constant name="KEY_Y" value="89" enum="KeyList">
+ <constant name="KEY_Y" value="89" enum="Key">
Y key.
</constant>
- <constant name="KEY_Z" value="90" enum="KeyList">
+ <constant name="KEY_Z" value="90" enum="Key">
Z key.
</constant>
- <constant name="KEY_BRACKETLEFT" value="91" enum="KeyList">
+ <constant name="KEY_BRACKETLEFT" value="91" enum="Key">
[ key.
</constant>
- <constant name="KEY_BACKSLASH" value="92" enum="KeyList">
+ <constant name="KEY_BACKSLASH" value="92" enum="Key">
\ key.
</constant>
- <constant name="KEY_BRACKETRIGHT" value="93" enum="KeyList">
+ <constant name="KEY_BRACKETRIGHT" value="93" enum="Key">
] key.
</constant>
- <constant name="KEY_ASCIICIRCUM" value="94" enum="KeyList">
+ <constant name="KEY_ASCIICIRCUM" value="94" enum="Key">
^ key.
</constant>
- <constant name="KEY_UNDERSCORE" value="95" enum="KeyList">
+ <constant name="KEY_UNDERSCORE" value="95" enum="Key">
_ key.
</constant>
- <constant name="KEY_QUOTELEFT" value="96" enum="KeyList">
+ <constant name="KEY_QUOTELEFT" value="96" enum="Key">
` key.
</constant>
- <constant name="KEY_BRACELEFT" value="123" enum="KeyList">
+ <constant name="KEY_BRACELEFT" value="123" enum="Key">
{ key.
</constant>
- <constant name="KEY_BAR" value="124" enum="KeyList">
+ <constant name="KEY_BAR" value="124" enum="Key">
| key.
</constant>
- <constant name="KEY_BRACERIGHT" value="125" enum="KeyList">
+ <constant name="KEY_BRACERIGHT" value="125" enum="Key">
} key.
</constant>
- <constant name="KEY_ASCIITILDE" value="126" enum="KeyList">
+ <constant name="KEY_ASCIITILDE" value="126" enum="Key">
~ key.
</constant>
- <constant name="KEY_NOBREAKSPACE" value="160" enum="KeyList">
+ <constant name="KEY_NOBREAKSPACE" value="160" enum="Key">
Non-breakable space key.
</constant>
- <constant name="KEY_EXCLAMDOWN" value="161" enum="KeyList">
+ <constant name="KEY_EXCLAMDOWN" value="161" enum="Key">
¡ key.
</constant>
- <constant name="KEY_CENT" value="162" enum="KeyList">
+ <constant name="KEY_CENT" value="162" enum="Key">
¢ key.
</constant>
- <constant name="KEY_STERLING" value="163" enum="KeyList">
+ <constant name="KEY_STERLING" value="163" enum="Key">
£ key.
</constant>
- <constant name="KEY_CURRENCY" value="164" enum="KeyList">
+ <constant name="KEY_CURRENCY" value="164" enum="Key">
¤ key.
</constant>
- <constant name="KEY_YEN" value="165" enum="KeyList">
+ <constant name="KEY_YEN" value="165" enum="Key">
¥ key.
</constant>
- <constant name="KEY_BROKENBAR" value="166" enum="KeyList">
+ <constant name="KEY_BROKENBAR" value="166" enum="Key">
¦ key.
</constant>
- <constant name="KEY_SECTION" value="167" enum="KeyList">
+ <constant name="KEY_SECTION" value="167" enum="Key">
§ key.
</constant>
- <constant name="KEY_DIAERESIS" value="168" enum="KeyList">
+ <constant name="KEY_DIAERESIS" value="168" enum="Key">
¨ key.
</constant>
- <constant name="KEY_COPYRIGHT" value="169" enum="KeyList">
+ <constant name="KEY_COPYRIGHT" value="169" enum="Key">
© key.
</constant>
- <constant name="KEY_ORDFEMININE" value="170" enum="KeyList">
+ <constant name="KEY_ORDFEMININE" value="170" enum="Key">
ª key.
</constant>
- <constant name="KEY_GUILLEMOTLEFT" value="171" enum="KeyList">
+ <constant name="KEY_GUILLEMOTLEFT" value="171" enum="Key">
« key.
</constant>
- <constant name="KEY_NOTSIGN" value="172" enum="KeyList">
+ <constant name="KEY_NOTSIGN" value="172" enum="Key">
¬ key.
</constant>
- <constant name="KEY_HYPHEN" value="173" enum="KeyList">
+ <constant name="KEY_HYPHEN" value="173" enum="Key">
Soft hyphen key.
</constant>
- <constant name="KEY_REGISTERED" value="174" enum="KeyList">
+ <constant name="KEY_REGISTERED" value="174" enum="Key">
® key.
</constant>
- <constant name="KEY_MACRON" value="175" enum="KeyList">
+ <constant name="KEY_MACRON" value="175" enum="Key">
¯ key.
</constant>
- <constant name="KEY_DEGREE" value="176" enum="KeyList">
+ <constant name="KEY_DEGREE" value="176" enum="Key">
° key.
</constant>
- <constant name="KEY_PLUSMINUS" value="177" enum="KeyList">
+ <constant name="KEY_PLUSMINUS" value="177" enum="Key">
± key.
</constant>
- <constant name="KEY_TWOSUPERIOR" value="178" enum="KeyList">
+ <constant name="KEY_TWOSUPERIOR" value="178" enum="Key">
² key.
</constant>
- <constant name="KEY_THREESUPERIOR" value="179" enum="KeyList">
+ <constant name="KEY_THREESUPERIOR" value="179" enum="Key">
³ key.
</constant>
- <constant name="KEY_ACUTE" value="180" enum="KeyList">
+ <constant name="KEY_ACUTE" value="180" enum="Key">
´ key.
</constant>
- <constant name="KEY_MU" value="181" enum="KeyList">
+ <constant name="KEY_MU" value="181" enum="Key">
µ key.
</constant>
- <constant name="KEY_PARAGRAPH" value="182" enum="KeyList">
+ <constant name="KEY_PARAGRAPH" value="182" enum="Key">
¶ key.
</constant>
- <constant name="KEY_PERIODCENTERED" value="183" enum="KeyList">
+ <constant name="KEY_PERIODCENTERED" value="183" enum="Key">
· key.
</constant>
- <constant name="KEY_CEDILLA" value="184" enum="KeyList">
+ <constant name="KEY_CEDILLA" value="184" enum="Key">
¸ key.
</constant>
- <constant name="KEY_ONESUPERIOR" value="185" enum="KeyList">
+ <constant name="KEY_ONESUPERIOR" value="185" enum="Key">
¹ key.
</constant>
- <constant name="KEY_MASCULINE" value="186" enum="KeyList">
+ <constant name="KEY_MASCULINE" value="186" enum="Key">
º key.
</constant>
- <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="KeyList">
+ <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="Key">
» key.
</constant>
- <constant name="KEY_ONEQUARTER" value="188" enum="KeyList">
+ <constant name="KEY_ONEQUARTER" value="188" enum="Key">
¼ key.
</constant>
- <constant name="KEY_ONEHALF" value="189" enum="KeyList">
+ <constant name="KEY_ONEHALF" value="189" enum="Key">
½ key.
</constant>
- <constant name="KEY_THREEQUARTERS" value="190" enum="KeyList">
+ <constant name="KEY_THREEQUARTERS" value="190" enum="Key">
¾ key.
</constant>
- <constant name="KEY_QUESTIONDOWN" value="191" enum="KeyList">
+ <constant name="KEY_QUESTIONDOWN" value="191" enum="Key">
¿ key.
</constant>
- <constant name="KEY_AGRAVE" value="192" enum="KeyList">
+ <constant name="KEY_AGRAVE" value="192" enum="Key">
À key.
</constant>
- <constant name="KEY_AACUTE" value="193" enum="KeyList">
+ <constant name="KEY_AACUTE" value="193" enum="Key">
Á key.
</constant>
- <constant name="KEY_ACIRCUMFLEX" value="194" enum="KeyList">
+ <constant name="KEY_ACIRCUMFLEX" value="194" enum="Key">
 key.
</constant>
- <constant name="KEY_ATILDE" value="195" enum="KeyList">
+ <constant name="KEY_ATILDE" value="195" enum="Key">
à key.
</constant>
- <constant name="KEY_ADIAERESIS" value="196" enum="KeyList">
+ <constant name="KEY_ADIAERESIS" value="196" enum="Key">
Ä key.
</constant>
- <constant name="KEY_ARING" value="197" enum="KeyList">
+ <constant name="KEY_ARING" value="197" enum="Key">
Å key.
</constant>
- <constant name="KEY_AE" value="198" enum="KeyList">
+ <constant name="KEY_AE" value="198" enum="Key">
Æ key.
</constant>
- <constant name="KEY_CCEDILLA" value="199" enum="KeyList">
+ <constant name="KEY_CCEDILLA" value="199" enum="Key">
Ç key.
</constant>
- <constant name="KEY_EGRAVE" value="200" enum="KeyList">
+ <constant name="KEY_EGRAVE" value="200" enum="Key">
È key.
</constant>
- <constant name="KEY_EACUTE" value="201" enum="KeyList">
+ <constant name="KEY_EACUTE" value="201" enum="Key">
É key.
</constant>
- <constant name="KEY_ECIRCUMFLEX" value="202" enum="KeyList">
+ <constant name="KEY_ECIRCUMFLEX" value="202" enum="Key">
Ê key.
</constant>
- <constant name="KEY_EDIAERESIS" value="203" enum="KeyList">
+ <constant name="KEY_EDIAERESIS" value="203" enum="Key">
Ë key.
</constant>
- <constant name="KEY_IGRAVE" value="204" enum="KeyList">
+ <constant name="KEY_IGRAVE" value="204" enum="Key">
Ì key.
</constant>
- <constant name="KEY_IACUTE" value="205" enum="KeyList">
+ <constant name="KEY_IACUTE" value="205" enum="Key">
Í key.
</constant>
- <constant name="KEY_ICIRCUMFLEX" value="206" enum="KeyList">
+ <constant name="KEY_ICIRCUMFLEX" value="206" enum="Key">
Î key.
</constant>
- <constant name="KEY_IDIAERESIS" value="207" enum="KeyList">
+ <constant name="KEY_IDIAERESIS" value="207" enum="Key">
Ï key.
</constant>
- <constant name="KEY_ETH" value="208" enum="KeyList">
+ <constant name="KEY_ETH" value="208" enum="Key">
Ð key.
</constant>
- <constant name="KEY_NTILDE" value="209" enum="KeyList">
+ <constant name="KEY_NTILDE" value="209" enum="Key">
Ñ key.
</constant>
- <constant name="KEY_OGRAVE" value="210" enum="KeyList">
+ <constant name="KEY_OGRAVE" value="210" enum="Key">
Ò key.
</constant>
- <constant name="KEY_OACUTE" value="211" enum="KeyList">
+ <constant name="KEY_OACUTE" value="211" enum="Key">
Ó key.
</constant>
- <constant name="KEY_OCIRCUMFLEX" value="212" enum="KeyList">
+ <constant name="KEY_OCIRCUMFLEX" value="212" enum="Key">
Ô key.
</constant>
- <constant name="KEY_OTILDE" value="213" enum="KeyList">
+ <constant name="KEY_OTILDE" value="213" enum="Key">
Õ key.
</constant>
- <constant name="KEY_ODIAERESIS" value="214" enum="KeyList">
+ <constant name="KEY_ODIAERESIS" value="214" enum="Key">
Ö key.
</constant>
- <constant name="KEY_MULTIPLY" value="215" enum="KeyList">
+ <constant name="KEY_MULTIPLY" value="215" enum="Key">
× key.
</constant>
- <constant name="KEY_OOBLIQUE" value="216" enum="KeyList">
+ <constant name="KEY_OOBLIQUE" value="216" enum="Key">
Ø key.
</constant>
- <constant name="KEY_UGRAVE" value="217" enum="KeyList">
+ <constant name="KEY_UGRAVE" value="217" enum="Key">
Ù key.
</constant>
- <constant name="KEY_UACUTE" value="218" enum="KeyList">
+ <constant name="KEY_UACUTE" value="218" enum="Key">
Ú key.
</constant>
- <constant name="KEY_UCIRCUMFLEX" value="219" enum="KeyList">
+ <constant name="KEY_UCIRCUMFLEX" value="219" enum="Key">
Û key.
</constant>
- <constant name="KEY_UDIAERESIS" value="220" enum="KeyList">
+ <constant name="KEY_UDIAERESIS" value="220" enum="Key">
Ü key.
</constant>
- <constant name="KEY_YACUTE" value="221" enum="KeyList">
+ <constant name="KEY_YACUTE" value="221" enum="Key">
Ý key.
</constant>
- <constant name="KEY_THORN" value="222" enum="KeyList">
+ <constant name="KEY_THORN" value="222" enum="Key">
Þ key.
</constant>
- <constant name="KEY_SSHARP" value="223" enum="KeyList">
+ <constant name="KEY_SSHARP" value="223" enum="Key">
ß key.
</constant>
- <constant name="KEY_DIVISION" value="247" enum="KeyList">
+ <constant name="KEY_DIVISION" value="247" enum="Key">
÷ key.
</constant>
- <constant name="KEY_YDIAERESIS" value="255" enum="KeyList">
+ <constant name="KEY_YDIAERESIS" value="255" enum="Key">
ÿ key.
</constant>
<constant name="KEY_CODE_MASK" value="33554431" enum="KeyModifierMask">
@@ -910,247 +2061,166 @@
<constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask">
Group Switch key mask.
</constant>
- <constant name="BUTTON_LEFT" value="1" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton">
Left mouse button.
</constant>
- <constant name="BUTTON_RIGHT" value="2" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton">
Right mouse button.
</constant>
- <constant name="BUTTON_MIDDLE" value="3" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
Middle mouse button.
</constant>
- <constant name="BUTTON_XBUTTON1" value="8" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
Extra mouse button 1 (only present on some mice).
</constant>
- <constant name="BUTTON_XBUTTON2" value="9" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
Extra mouse button 2 (only present on some mice).
</constant>
- <constant name="BUTTON_WHEEL_UP" value="4" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_WHEEL_UP" value="4" enum="MouseButton">
Mouse wheel up.
</constant>
- <constant name="BUTTON_WHEEL_DOWN" value="5" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_WHEEL_DOWN" value="5" enum="MouseButton">
Mouse wheel down.
</constant>
- <constant name="BUTTON_WHEEL_LEFT" value="6" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_WHEEL_LEFT" value="6" enum="MouseButton">
Mouse wheel left button (only present on some mice).
</constant>
- <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_WHEEL_RIGHT" value="7" enum="MouseButton">
Mouse wheel right button (only present on some mice).
</constant>
- <constant name="BUTTON_MASK_LEFT" value="1" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton">
Left mouse button mask.
</constant>
- <constant name="BUTTON_MASK_RIGHT" value="2" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton">
Right mouse button mask.
</constant>
- <constant name="BUTTON_MASK_MIDDLE" value="4" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton">
Middle mouse button mask.
</constant>
- <constant name="BUTTON_MASK_XBUTTON1" value="128" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="MouseButton">
Extra mouse button 1 mask.
</constant>
- <constant name="BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList">
+ <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="MouseButton">
Extra mouse button 2 mask.
</constant>
- <constant name="JOY_INVALID_BUTTON" value="-1" enum="JoyButtonList">
+ <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton">
An invalid game controller button.
</constant>
- <constant name="JOY_BUTTON_A" value="0" enum="JoyButtonList">
- Game controller SDL button A.
- </constant>
- <constant name="JOY_BUTTON_B" value="1" enum="JoyButtonList">
- Game controller SDL button B.
- </constant>
- <constant name="JOY_BUTTON_X" value="2" enum="JoyButtonList">
- Game controller SDL button X.
- </constant>
- <constant name="JOY_BUTTON_Y" value="3" enum="JoyButtonList">
- Game controller SDL button Y.
- </constant>
- <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButtonList">
- Game controller SDL back button.
- </constant>
- <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButtonList">
- Game controller SDL guide button.
- </constant>
- <constant name="JOY_BUTTON_START" value="6" enum="JoyButtonList">
- Game controller SDL start button.
- </constant>
- <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButtonList">
- Game controller SDL left stick button.
- </constant>
- <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButtonList">
- Game controller SDL right stick button.
- </constant>
- <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButtonList">
- Game controller SDL left shoulder button.
- </constant>
- <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButtonList">
- Game controller SDL right shoulder button.
- </constant>
- <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButtonList">
- Game controller SDL D-pad up button.
- </constant>
- <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButtonList">
- Game controller SDL D-pad down button.
- </constant>
- <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButtonList">
- Game controller SDL D-pad left button.
- </constant>
- <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList">
- Game controller SDL D-pad right button.
- </constant>
- <constant name="JOY_SDL_BUTTONS" value="15" enum="JoyButtonList">
- The number of SDL game controller buttons.
+ <constant name="JOY_BUTTON_A" value="0" enum="JoyButton">
+ Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B.
</constant>
- <constant name="JOY_SONY_X" value="0" enum="JoyButtonList">
- Sony DualShock controller X button maps to SDL button A.
+ <constant name="JOY_BUTTON_B" value="1" enum="JoyButton">
+ Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A.
</constant>
- <constant name="JOY_SONY_CROSS" value="0" enum="JoyButtonList">
- Sony DualShock controller cross button maps to SDL button A.
+ <constant name="JOY_BUTTON_X" value="2" enum="JoyButton">
+ Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y.
</constant>
- <constant name="JOY_SONY_CIRCLE" value="1" enum="JoyButtonList">
- Sony DualShock controller circle button maps to SDL button B.
+ <constant name="JOY_BUTTON_Y" value="3" enum="JoyButton">
+ Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X.
</constant>
- <constant name="JOY_SONY_SQUARE" value="2" enum="JoyButtonList">
- Sony DualShock controller square button maps to SDL button X.
+ <constant name="JOY_BUTTON_BACK" value="4" enum="JoyButton">
+ Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button.
</constant>
- <constant name="JOY_SONY_TRIANGLE" value="3" enum="JoyButtonList">
- Sony DualShock controller triangle button maps to SDL button Y.
+ <constant name="JOY_BUTTON_GUIDE" value="5" enum="JoyButton">
+ Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button.
</constant>
- <constant name="JOY_SONY_SELECT" value="4" enum="JoyButtonList">
- Sony DualShock controller select button maps to SDL back button.
+ <constant name="JOY_BUTTON_START" value="6" enum="JoyButton">
+ Game controller SDL start button. Corresponds to the Nintendo + button.
</constant>
- <constant name="JOY_SONY_START" value="6" enum="JoyButtonList">
- Sony DualShock controller start button maps to SDL start button.
+ <constant name="JOY_BUTTON_LEFT_STICK" value="7" enum="JoyButton">
+ Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button.
</constant>
- <constant name="JOY_SONY_PS" value="5" enum="JoyButtonList">
- Sony DualShock controller PS button maps to SDL guide button.
+ <constant name="JOY_BUTTON_RIGHT_STICK" value="8" enum="JoyButton">
+ Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button.
</constant>
- <constant name="JOY_SONY_L1" value="9" enum="JoyButtonList">
- Sony DualShock controller L1 button maps to SDL left shoulder button.
+ <constant name="JOY_BUTTON_LEFT_SHOULDER" value="9" enum="JoyButton">
+ Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button.
</constant>
- <constant name="JOY_SONY_R1" value="10" enum="JoyButtonList">
- Sony DualShock controller R1 button maps to SDL right shoulder button.
+ <constant name="JOY_BUTTON_RIGHT_SHOULDER" value="10" enum="JoyButton">
+ Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button.
</constant>
- <constant name="JOY_SONY_L3" value="7" enum="JoyButtonList">
- Sony DualShock controller L3 button maps to SDL left stick button.
+ <constant name="JOY_BUTTON_DPAD_UP" value="11" enum="JoyButton">
+ Game controller D-pad up button.
</constant>
- <constant name="JOY_SONY_R3" value="8" enum="JoyButtonList">
- Sony DualShock controller R3 button maps to SDL right stick button.
+ <constant name="JOY_BUTTON_DPAD_DOWN" value="12" enum="JoyButton">
+ Game controller D-pad down button.
</constant>
- <constant name="JOY_XBOX_A" value="0" enum="JoyButtonList">
- Xbox game controller A button maps to SDL button A.
+ <constant name="JOY_BUTTON_DPAD_LEFT" value="13" enum="JoyButton">
+ Game controller D-pad left button.
</constant>
- <constant name="JOY_XBOX_B" value="1" enum="JoyButtonList">
- Xbox game controller B button maps to SDL button B.
+ <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButton">
+ Game controller D-pad right button.
</constant>
- <constant name="JOY_XBOX_X" value="2" enum="JoyButtonList">
- Xbox game controller X button maps to SDL button X.
+ <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton">
+ Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button.
</constant>
- <constant name="JOY_XBOX_Y" value="3" enum="JoyButtonList">
- Xbox game controller Y button maps to SDL button Y.
+ <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton">
+ Game controller SDL paddle 1 button.
</constant>
- <constant name="JOY_XBOX_BACK" value="4" enum="JoyButtonList">
- Xbox game controller back button maps to SDL back button.
+ <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButton">
+ Game controller SDL paddle 2 button.
</constant>
- <constant name="JOY_XBOX_START" value="6" enum="JoyButtonList">
- Xbox game controller start button maps to SDL start button.
+ <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButton">
+ Game controller SDL paddle 3 button.
</constant>
- <constant name="JOY_XBOX_HOME" value="5" enum="JoyButtonList">
- Xbox game controller home button maps to SDL guide button.
+ <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButton">
+ Game controller SDL paddle 4 button.
</constant>
- <constant name="JOY_XBOX_LS" value="7" enum="JoyButtonList">
- Xbox game controller left stick button maps to SDL left stick button.
+ <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButton">
+ Game controller SDL touchpad button.
</constant>
- <constant name="JOY_XBOX_RS" value="8" enum="JoyButtonList">
- Xbox game controller right stick button maps to SDL right stick button.
- </constant>
- <constant name="JOY_XBOX_LB" value="9" enum="JoyButtonList">
- Xbox game controller left bumper button maps to SDL left shoulder button.
- </constant>
- <constant name="JOY_XBOX_RB" value="10" enum="JoyButtonList">
- Xbox game controller right bumper button maps to SDL right shoulder button.
+ <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton">
+ The number of SDL game controller buttons.
</constant>
- <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList">
- The maximum number of game controller buttons.
+ <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButton">
+ The maximum number of game controller buttons: Android supports up to 36 buttons.
</constant>
- <constant name="JOY_INVALID_AXIS" value="-1" enum="JoyAxisList">
+ <constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis">
An invalid game controller axis.
</constant>
- <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxisList">
+ <constant name="JOY_AXIS_LEFT_X" value="0" enum="JoyAxis">
Game controller left joystick x-axis.
</constant>
- <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxisList">
+ <constant name="JOY_AXIS_LEFT_Y" value="1" enum="JoyAxis">
Game controller left joystick y-axis.
</constant>
- <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxisList">
+ <constant name="JOY_AXIS_RIGHT_X" value="2" enum="JoyAxis">
Game controller right joystick x-axis.
</constant>
- <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxisList">
+ <constant name="JOY_AXIS_RIGHT_Y" value="3" enum="JoyAxis">
Game controller right joystick y-axis.
</constant>
- <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxisList">
+ <constant name="JOY_AXIS_TRIGGER_LEFT" value="4" enum="JoyAxis">
Game controller left trigger axis.
</constant>
- <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxisList">
+ <constant name="JOY_AXIS_TRIGGER_RIGHT" value="5" enum="JoyAxis">
Game controller right trigger axis.
</constant>
- <constant name="JOY_SDL_AXES" value="6" enum="JoyAxisList">
+ <constant name="JOY_AXIS_SDL_MAX" value="6" enum="JoyAxis">
The number of SDL game controller axes.
</constant>
- <constant name="JOY_AXIS_0_X" value="0" enum="JoyAxisList">
- Game controller joystick 0 x-axis.
- </constant>
- <constant name="JOY_AXIS_0_Y" value="1" enum="JoyAxisList">
- Game controller joystick 0 y-axis.
- </constant>
- <constant name="JOY_AXIS_1_X" value="2" enum="JoyAxisList">
- Game controller joystick 1 x-axis.
- </constant>
- <constant name="JOY_AXIS_1_Y" value="3" enum="JoyAxisList">
- Game controller joystick 1 y-axis.
- </constant>
- <constant name="JOY_AXIS_2_X" value="4" enum="JoyAxisList">
- Game controller joystick 2 x-axis.
- </constant>
- <constant name="JOY_AXIS_2_Y" value="5" enum="JoyAxisList">
- Game controller joystick 2 y-axis.
- </constant>
- <constant name="JOY_AXIS_3_X" value="6" enum="JoyAxisList">
- Game controller joystick 3 x-axis.
- </constant>
- <constant name="JOY_AXIS_3_Y" value="7" enum="JoyAxisList">
- Game controller joystick 3 y-axis.
+ <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxis">
+ The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
</constant>
- <constant name="JOY_AXIS_4_X" value="8" enum="JoyAxisList">
- Game controller joystick 4 x-axis.
- </constant>
- <constant name="JOY_AXIS_4_Y" value="9" enum="JoyAxisList">
- Game controller joystick 4 y-axis.
- </constant>
- <constant name="JOY_AXIS_MAX" value="10" enum="JoyAxisList">
- The maximum number of game controller axes.
- </constant>
- <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
MIDI note OFF message.
</constant>
- <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
MIDI note ON message.
</constant>
- <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
MIDI aftertouch message.
</constant>
- <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
MIDI control change message.
</constant>
- <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
MIDI program change message.
</constant>
- <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
MIDI channel pressure message.
</constant>
- <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MidiMessageList">
+ <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
MIDI pitch bend message.
</constant>
<constant name="OK" value="0" enum="Error">
@@ -1339,42 +2409,58 @@
<constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 2D physics layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint">
+ Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ </constant>
+ <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D render layers.
</constant>
- <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint">
Hints that an integer property is a bitmask using the optionally named 3D physics layers.
</constant>
- <constant name="PROPERTY_HINT_FILE" value="12" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint">
+ Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ </constant>
+ <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint">
Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_DIR" value="13" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint">
Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_FILE" value="14" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint">
Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
- <constant name="PROPERTY_HINT_GLOBAL_DIR" value="15" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint">
Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
- <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="16" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
- <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="17" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="19" enum="PropertyHint">
Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
- <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="18" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
</constant>
- <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint">
Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint">
Hints that an image is compressed using lossy compression.
</constant>
- <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint">
Hints that an image is compressed using lossless compression.
</constant>
+ <constant name="PROPERTY_HINT_TYPE_STRING" value="25" 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>
@@ -1444,6 +2530,8 @@
<constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags">
Deprecated method flag, unused.
</constant>
+ <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags">
+ </constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
Default method flags.
</constant>
@@ -1456,7 +2544,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/AABB.xml b/doc/classes/AABB.xml
index baea84df65..a28bde9946 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -41,14 +41,14 @@
Constructs an [AABB] from a position and size.
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="AABB">
</return>
<description>
Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive.
</description>
</method>
- <method name="encloses">
+ <method name="encloses" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="with" type="AABB">
@@ -57,7 +57,7 @@
Returns [code]true[/code] if this [AABB] completely encloses another one.
</description>
</method>
- <method name="expand">
+ <method name="expand" qualifiers="const">
<return type="AABB">
</return>
<argument index="0" name="to_point" type="Vector3">
@@ -66,14 +66,14 @@
Returns this [AABB] expanded to include a given point.
</description>
</method>
- <method name="get_area">
+ <method name="get_area" qualifiers="const">
<return type="float">
</return>
<description>
Returns the volume of the [AABB].
</description>
</method>
- <method name="get_endpoint">
+ <method name="get_endpoint" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="idx" type="int">
@@ -82,49 +82,49 @@
Gets the position of the 8 endpoints of the [AABB] in space.
</description>
</method>
- <method name="get_longest_axis">
+ <method name="get_longest_axis" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns the normalized longest axis of the [AABB].
</description>
</method>
- <method name="get_longest_axis_index">
+ <method name="get_longest_axis_index" qualifiers="const">
<return type="int">
</return>
<description>
Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
</description>
</method>
- <method name="get_longest_axis_size">
+ <method name="get_longest_axis_size" qualifiers="const">
<return type="float">
</return>
<description>
Returns the scalar length of the longest axis of the [AABB].
</description>
</method>
- <method name="get_shortest_axis">
+ <method name="get_shortest_axis" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns the normalized shortest axis of the [AABB].
</description>
</method>
- <method name="get_shortest_axis_index">
+ <method name="get_shortest_axis_index" qualifiers="const">
<return type="int">
</return>
<description>
Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
</description>
</method>
- <method name="get_shortest_axis_size">
+ <method name="get_shortest_axis_size" qualifiers="const">
<return type="float">
</return>
<description>
Returns the scalar length of the shortest axis of the [AABB].
</description>
</method>
- <method name="get_support">
+ <method name="get_support" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="dir" type="Vector3">
@@ -133,7 +133,7 @@
Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
- <method name="grow">
+ <method name="grow" qualifiers="const">
<return type="AABB">
</return>
<argument index="0" name="by" type="float">
@@ -142,21 +142,21 @@
Returns a copy of the [AABB] grown a given amount of units towards all the sides.
</description>
</method>
- <method name="has_no_area">
+ <method name="has_no_area" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [AABB] is flat or empty.
</description>
</method>
- <method name="has_no_surface">
+ <method name="has_no_surface" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [AABB] is empty.
</description>
</method>
- <method name="has_point">
+ <method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="point" type="Vector3">
@@ -165,7 +165,7 @@
Returns [code]true[/code] if the [AABB] contains a point.
</description>
</method>
- <method name="intersection">
+ <method name="intersection" qualifiers="const">
<return type="AABB">
</return>
<argument index="0" name="with" type="AABB">
@@ -174,7 +174,7 @@
Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
</description>
</method>
- <method name="intersects">
+ <method name="intersects" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="with" type="AABB">
@@ -183,7 +183,7 @@
Returns [code]true[/code] if the [AABB] overlaps with another.
</description>
</method>
- <method name="intersects_plane">
+ <method name="intersects_plane" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="plane" type="Plane">
@@ -192,7 +192,7 @@
Returns [code]true[/code] if the [AABB] is on both sides of a plane.
</description>
</method>
- <method name="intersects_ray">
+ <method name="intersects_ray" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="from" type="Vector3">
@@ -202,7 +202,7 @@
<description>
</description>
</method>
- <method name="intersects_segment">
+ <method name="intersects_segment" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="from" type="Vector3">
@@ -213,16 +213,16 @@
Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="aabb" type="AABB">
</argument>
<description>
- Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="merge">
+ <method name="merge" qualifiers="const">
<return type="AABB">
</return>
<argument index="0" name="with" type="AABB">
@@ -264,7 +264,7 @@
Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )">
- Size from [member position] to [member end]. Typically all components are positive.
+ Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 0cd7d3dc25..e975b8ed28 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AStar" inherits="Reference" version="4.0">
<brief_description>
- An implementation of A* to find shortest paths among connected points in space.
+ An implementation of A* to find the shortest paths among connected points in space.
</brief_description>
<description>
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default.
@@ -33,6 +33,7 @@
[/csharp]
[/codeblocks]
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
+ If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the end points of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals to the sum of Euclidean distances of all segments in the path.
</description>
<tutorials>
</tutorials>
@@ -71,7 +72,8 @@
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<description>
- Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblocks]
[gdscript]
var astar = AStar.new()
@@ -380,7 +382,7 @@
<argument index="1" name="weight_scale" type="float">
</argument>
<description>
- Sets the [code]weight_scale[/code] for the point with the given [code]id[/code].
+ Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 1540d8dacc..2a51678209 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -43,7 +43,8 @@
<argument index="2" name="weight_scale" type="float" default="1.0">
</argument>
<description>
- Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
+ The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
[codeblocks]
[gdscript]
var astar = AStar2D.new()
@@ -350,7 +351,7 @@
<argument index="1" name="weight_scale" type="float">
</argument>
<description>
- Sets the [code]weight_scale[/code] for the point with the given [code]id[/code].
+ Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
</description>
</method>
</methods>
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/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml
index e1fb78e5b5..02ccab4e05 100644
--- a/doc/classes/AnimatedSprite3D.xml
+++ b/doc/classes/AnimatedSprite3D.xml
@@ -49,6 +49,11 @@
</member>
</members>
<signals>
+ <signal name="animation_finished">
+ <description>
+ Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
+ </description>
+ </signal>
<signal name="frame_changed">
<description>
Emitted when [member frame] changed.
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index d34308501c..7ceb21d22e 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -168,7 +168,7 @@
<argument index="2" name="stream" type="Resource">
</argument>
<description>
- Sets the stream of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
+ Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
@@ -409,7 +409,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
- Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
+ Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
@@ -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">
@@ -592,7 +592,7 @@
<argument index="2" name="transition" type="float">
</argument>
<description>
- Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
+ Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]).
</description>
</method>
<method name="track_set_key_value">
@@ -710,7 +710,7 @@
[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
</member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false">
- A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
+ A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
</member>
<member name="step" type="float" setter="set_step" getter="get_step" default="0.1">
The animation step value.
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index 60ff425cdb..c8468f9c8f 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -21,6 +21,12 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
+ <method name="get_current_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_current_node" qualifiers="const">
<return type="StringName">
</return>
@@ -28,6 +34,13 @@
Returns the currently playing animation state.
</description>
</method>
+ <method name="get_current_play_position" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Returns the playback position within the current animation state.
+ </description>
+ </method>
<method name="get_travel_path" qualifiers="const">
<return type="PackedStringArray">
</return>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index de2087d930..7696f36009 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -237,7 +237,7 @@
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
- [b]Note[/b]: while this property appears in the inspector, it's not meant to be edited and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
+ [b]Note[/b]: while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
The length (in seconds) of the currently being played animation.
@@ -254,12 +254,16 @@
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0">
The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision.
</member>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode" default="1">
+ <member name="playback_process_mode" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationPlayer.AnimationProcessCallback" default="1">
The process notification in which to update animations.
</member>
<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>
@@ -295,13 +299,13 @@
</signal>
</signals>
<constants>
- <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback">
Process animation during the physics process. This is especially useful when animating physics bodies.
</constant>
- <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback">
Process animation during the idle process.
</constant>
- <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback">
Do not process animation. Use [method advance] to process the animation manually.
</constant>
<constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode">
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index 262b5addb7..2517941133 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -45,8 +45,8 @@
<member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
The path to the [AnimationPlayer] used for animating.
</member>
- <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
- The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
+ <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationTree.AnimationProcessCallback" default="1">
+ The process mode of this [AnimationTree]. See [enum AnimationProcessCallback] for available modes.
</member>
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
@@ -57,13 +57,13 @@
</member>
</members>
<constants>
- <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback">
The animations will progress during the physics frame (i.e. [method Node._physics_process]).
</constant>
- <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback">
The animations will progress during the idle frame (i.e. [method Node._process]).
</constant>
- <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
+ <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback">
The animations will only progress manually (see [method advance]).
</constant>
</constants>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index 72c40478bb..9711a2a35b 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -140,14 +140,16 @@
<argument index="0" name="area" type="Area2D">
</argument>
<description>
- Emitted when another area enters.
+ Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area2D">
</argument>
<description>
- Emitted when another area exits.
+ Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area[/code] the other Area2D.
</description>
</signal>
<signal name="area_shape_entered">
@@ -157,10 +159,14 @@
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
- <argument index="3" name="self_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code].
+ Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area[/code] the other Area2D.
+ [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="area_shape_exited">
@@ -170,54 +176,64 @@
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
- <argument index="3" name="self_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when another area exits, reporting which shapes were overlapping.
+ Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]area[/code] the other Area2D.
+ [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="body_entered">
- <argument index="0" name="body" type="Node">
+ <argument index="0" name="body" type="Node2D">
</argument>
<description>
- Emitted when a physics body enters.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="Node">
+ <argument index="0" name="body" type="Node2D">
</argument>
<description>
- Emitted when a physics body exits.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Node">
+ <argument index="1" name="body" type="Node2D">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
- <argument index="3" name="area_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a physics body enters, reporting which shapes overlapped.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
+ [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Node">
+ <argument index="1" name="body" type="Node2D">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
- <argument index="3" name="area_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a physics body exits, reporting which shapes were overlapping.
- The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap].
+ [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D].
</description>
</signal>
</signals>
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index 92a8465762..4271769155 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">
@@ -150,14 +150,16 @@
<argument index="0" name="area" type="Area3D">
</argument>
<description>
- Emitted when another area enters.
+ Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area[/code] the other Area3D.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Area3D">
</argument>
<description>
- Emitted when another area exits.
+ Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area[/code] the other Area3D.
</description>
</signal>
<signal name="area_shape_entered">
@@ -167,10 +169,14 @@
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
- <argument index="3" name="self_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code].
+ Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area[/code] the other Area3D.
+ [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
</description>
</signal>
<signal name="area_shape_exited">
@@ -180,54 +186,64 @@
</argument>
<argument index="2" name="area_shape" type="int">
</argument>
- <argument index="3" name="self_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when another area exits, reporting which areas were overlapping.
+ Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code].
+ [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]area[/code] the other Area3D.
+ [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
</description>
</signal>
<signal name="body_entered">
- <argument index="0" name="body" type="Node">
+ <argument index="0" name="body" type="Node3D">
</argument>
<description>
- Emitted when a physics body enters.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_exited">
- <argument index="0" name="body" type="Node">
+ <argument index="0" name="body" type="Node3D">
</argument>
<description>
- Emitted when a physics body exits.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Node">
+ <argument index="1" name="body" type="Node3D">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
- <argument index="3" name="area_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a physics body enters, reporting which shapes overlapped.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
+ [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
</description>
</signal>
<signal name="body_shape_exited">
<argument index="0" name="body_id" type="int">
</argument>
- <argument index="1" name="body" type="Node">
+ <argument index="1" name="body" type="Node3D">
</argument>
<argument index="2" name="body_shape" type="int">
</argument>
- <argument index="3" name="area_shape" type="int">
+ <argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a physics body exits, reporting which shapes were overlapping.
- The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
+ Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap].
+ [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D].
</description>
</signal>
</signals>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 0ad5960d4a..dcfb91eb61 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -38,8 +38,9 @@
GD.Print(array1 + array2); // Prints [One, 2, 3, Four]
[/csharp]
[/codeblocks]
- Note that concatenating with [code]+=[/code] operator will create a new array. If you want to append another array to an existing array, [method append_array] is more efficient.
+ [b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate].
+ [b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
</tutorials>
@@ -165,7 +166,7 @@
[/codeblock]
</description>
</method>
- <method name="back">
+ <method name="back" qualifiers="const">
<return type="Variant">
</return>
<description>
@@ -190,15 +191,13 @@
</return>
<argument index="0" name="value" type="Variant">
</argument>
- <argument index="1" name="obj" type="Object">
+ <argument index="1" name="func" type="Callable">
</argument>
- <argument index="2" name="func" type="StringName">
- </argument>
- <argument index="3" name="before" type="bool" default="true">
+ <argument index="2" name="before" type="bool" default="true">
</argument>
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
- [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
+ [b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior.
</description>
</method>
<method name="clear">
@@ -208,7 +207,7 @@
Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
</description>
</method>
- <method name="count">
+ <method name="count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
@@ -217,7 +216,7 @@
Returns the number of times an element is in the array.
</description>
</method>
- <method name="duplicate">
+ <method name="duplicate" qualifiers="const">
<return type="Array">
</return>
<argument index="0" name="deep" type="bool" default="false">
@@ -227,23 +226,18 @@
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">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the array is empty.
- </description>
- </method>
<method name="erase">
<return type="void">
</return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Removes the first occurrence of a value from the array.
+ Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
- <method name="find">
+ <method name="find" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="Variant">
@@ -254,7 +248,7 @@
Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
</description>
</method>
- <method name="find_last">
+ <method name="find_last" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="value" type="Variant">
@@ -263,7 +257,7 @@
Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found.
</description>
</method>
- <method name="front">
+ <method name="front" qualifiers="const">
<return type="Variant">
</return>
<description>
@@ -271,7 +265,7 @@
[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="value" type="Variant">
@@ -313,11 +307,12 @@
[/codeblocks]
</description>
</method>
- <method name="hash">
+ <method name="hash" qualifiers="const">
<return type="int">
</return>
<description>
- Returns a hashed integer value representing the array contents.
+ Returns a hashed integer value representing the array and its contents.
+ [b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value.
</description>
</method>
<method name="insert">
@@ -329,6 +324,8 @@
</argument>
<description>
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed.
</description>
</method>
<method name="invert">
@@ -338,14 +335,21 @@
Reverses the order of the elements in the array.
</description>
</method>
- <method name="max">
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
+ <method name="max" qualifiers="const">
<return type="Variant">
</return>
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
- <method name="min">
+ <method name="min" qualifiers="const">
<return type="Variant">
</return>
<description>
@@ -420,14 +424,15 @@
<return type="Variant">
</return>
<description>
- Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message.
+ Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front].
</description>
</method>
<method name="pop_front">
<return type="Variant">
</return>
<description>
- Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message.
+ Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].
+ [b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be.
</description>
</method>
<method name="push_back">
@@ -436,7 +441,7 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Appends an element at the end of the array.
+ Appends an element at the end of the array. See also [method push_front].
</description>
</method>
<method name="push_front">
@@ -445,7 +450,8 @@
<argument index="0" name="value" type="Variant">
</argument>
<description>
- Adds an element at the beginning of the array.
+ Adds an element at the beginning of the array. See also [method push_back].
+ [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
</description>
</method>
<method name="remove">
@@ -454,7 +460,9 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Removes an element from the array by index. If the index does not exist in the array, nothing happens.
+ Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
+ [b]Note:[/b] This method acts in-place and doesn't return a value.
+ [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>
</method>
<method name="resize">
@@ -466,7 +474,7 @@
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code].
</description>
</method>
- <method name="rfind">
+ <method name="rfind" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="Variant">
@@ -481,17 +489,17 @@
<return type="void">
</return>
<description>
- Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
+ Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GlobalScope.randi]. Call [method @GlobalScope.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
Returns the number of elements in the array.
</description>
</method>
- <method name="slice">
+ <method name="slice" qualifiers="const">
<return type="Array">
</return>
<argument index="0" name="begin" type="int">
@@ -527,12 +535,10 @@
<method name="sort_custom">
<return type="void">
</return>
- <argument index="0" name="obj" type="Object">
- </argument>
- <argument index="1" name="func" type="StringName">
+ <argument index="0" name="func" type="Callable">
</argument>
<description>
- Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
+ Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
@@ -543,7 +549,7 @@
return false
var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
- my_items.sort_custom(MyCustomSorter, "sort_ascending")
+ my_items.sort_custom(MyCustomSorter.sort_ascending)
print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
[/gdscript]
[csharp]
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index dc834474ad..e2c4ed1430 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>
@@ -121,7 +121,7 @@
Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping.
</description>
</method>
- <method name="regen_normalmaps">
+ <method name="regen_normal_maps">
<return type="void">
</return>
<description>
@@ -215,71 +215,9 @@
<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>
+ <member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh">
+ </member>
</members>
<constants>
- <constant name="NO_INDEX_ARRAY" value="-1">
- Default value used for index_array_len when no indices are present.
- </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>
</constants>
</class>
diff --git a/doc/classes/AspectRatioContainer.xml b/doc/classes/AspectRatioContainer.xml
new file mode 100644
index 0000000000..7b41133139
--- /dev/null
+++ b/doc/classes/AspectRatioContainer.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AspectRatioContainer" inherits="Container" version="4.0">
+ <brief_description>
+ Container that preserves its child controls' aspect ratio.
+ </brief_description>
+ <description>
+ Arranges child controls in a way to preserve their aspect ratio automatically whenever the container is resized. Solves the problem where the container size is dynamic and the contents' size needs to adjust accordingly without losing proportions.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="alignment_horizontal" type="int" setter="set_alignment_horizontal" getter="get_alignment_horizontal" enum="AspectRatioContainer.AlignMode" default="1">
+ Specifies the horizontal relative position of child controls.
+ </member>
+ <member name="alignment_vertical" type="int" setter="set_alignment_vertical" getter="get_alignment_vertical" enum="AspectRatioContainer.AlignMode" default="1">
+ Specifies the vertical relative position of child controls.
+ </member>
+ <member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="1.0">
+ The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [member stretch_mode].
+ </member>
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="AspectRatioContainer.StretchMode" default="2">
+ The stretch mode used to align child controls.
+ </member>
+ </members>
+ <constants>
+ <constant name="STRETCH_WIDTH_CONTROLS_HEIGHT" value="0" enum="StretchMode">
+ The height of child controls is automatically adjusted based on the width of the container.
+ </constant>
+ <constant name="STRETCH_HEIGHT_CONTROLS_WIDTH" value="1" enum="StretchMode">
+ The width of child controls is automatically adjusted based on the height of the container.
+ </constant>
+ <constant name="STRETCH_FIT" value="2" enum="StretchMode">
+ The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio.
+ </constant>
+ <constant name="STRETCH_COVER" value="3" enum="StretchMode">
+ The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio.
+ When the bounding rectangle of child controls exceed the container's size and [member Control.rect_clip_content] is enabled, this allows to show only the container's area restricted by its own bounding rectangle.
+ </constant>
+ <constant name="ALIGN_BEGIN" value="0" enum="AlignMode">
+ Aligns child controls with the beginning (left or top) of the container.
+ </constant>
+ <constant name="ALIGN_CENTER" value="1" enum="AlignMode">
+ Aligns child controls with the center of the container.
+ </constant>
+ <constant name="ALIGN_END" value="2" enum="AlignMode">
+ Aligns child controls with the end (right or bottom) of the container.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 5bc077ef49..9865319419 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AtlasTexture" inherits="Texture2D" version="4.0">
<brief_description>
- Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
+ Crops out one part of a texture, such as a texture from a texture atlas.
</brief_description>
<description>
- [Texture2D] resource aimed at managing big textures files that pack multiple smaller textures. Consists of a [Texture2D], a margin that defines the border width, and a region that defines the actual area of the AtlasTexture.
+ [Texture2D] resource that crops out one part of the [member atlas] texture, defined by [member region]. The main use case is cropping out textures from a texture atlas, which is a big texture file that packs multiple smaller textures. Consists of a [Texture2D] for the [member atlas], a [member region] that defines the area of [member atlas] to use, and a [member margin] that defines the border width.
+ [AtlasTexture] cannot be used in an [AnimatedTexture], cannot be tiled in nodes such as [TextureRect], and does not work properly if used inside of other [AtlasTexture] resources. Multiple [AtlasTexture] resources can be used to crop multiple textures from the atlas. Using a texture atlas helps to optimize video memory costs and render calls compared to using multiple small files.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml
new file mode 100644
index 0000000000..c7ee621ca6
--- /dev/null
+++ b/doc/classes/AudioEffectCapture.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AudioEffectCapture" inherits="AudioEffect" version="4.0">
+ <brief_description>
+ Captures audio from an audio bus in real-time.
+ </brief_description>
+ <description>
+ AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.
+ Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="can_get_buffer" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
+ </description>
+ </method>
+ <method name="clear_buffer">
+ <return type="void">
+ </return>
+ <description>
+ Clears the internal ring buffer.
+ </description>
+ </method>
+ <method name="get_buffer">
+ <return type="PackedVector2Array">
+ </return>
+ <argument index="0" name="frames" type="int">
+ </argument>
+ <description>
+ Gets the next [code]frames[/code] audio samples from the internal ring buffer.
+ Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available.
+ </description>
+ </method>
+ <method name="get_buffer_length_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total size of the internal ring buffer in frames.
+ </description>
+ </method>
+ <method name="get_discarded_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of audio frames discarded from the audio bus due to full buffer.
+ </description>
+ </method>
+ <method name="get_frames_available" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of frames available to read using [method get_buffer].
+ </description>
+ </method>
+ <method name="get_pushed_frames" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of audio frames inserted from the audio bus.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1">
+ Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index aadbc865bb..7a8c4b2cc7 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -4,7 +4,7 @@
Plays 3D sound in 3D space.
</brief_description>
<description>
- Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space.
+ Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
By default, audio is heard from the camera position. This can be changed by adding a [Listener3D] node to the scene and enabling it by calling [method Listener3D.make_current] on it.
</description>
<tutorials>
@@ -56,19 +56,19 @@
Areas in which this sound plays.
</member>
<member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz" default="5000.0">
- Dampens audio above this frequency, in Hz.
+ Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to [code]20500[/code] as this frequency is above the human hearing limit.
</member>
<member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db" default="-24.0">
- Amount how much the filter affects the loudness, in dB.
+ Amount how much the filter affects the loudness, in decibels.
</member>
<member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel" default="0">
Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation.
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false">
- If [code]true[/code], audio plays when added to scene tree.
+ If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added to scene tree.
</member>
<member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="@&quot;Master&quot;">
- Bus on which this audio is playing.
+ The bus on which this audio is playing.
</member>
<member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0">
Decides in which step the Doppler effect should be calculated.
@@ -80,10 +80,10 @@
If [code]true[/code], the audio should be dampened according to the direction of the sound.
</member>
<member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db" default="-12.0">
- Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in dB.
+ Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in decibels.
</member>
<member name="max_db" type="float" setter="set_max_db" getter="get_max_db" default="3.0">
- Sets the absolute maximum of the soundlevel, in dB.
+ Sets the absolute maximum of the soundlevel, in decibels.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0.
@@ -98,16 +98,16 @@
If [code]true[/code], audio is playing.
</member>
<member name="stream" type="AudioStream" setter="set_stream" getter="get_stream">
- The [AudioStream] object to be played.
+ The [AudioStream] resource to be played.
</member>
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
- If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
+ If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code].
</member>
<member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0">
- Base sound level unaffected by dampening, in dB.
+ The base sound level unaffected by dampening, in decibels.
</member>
<member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0">
- Factor for the attenuation effect.
+ The factor for the attenuation effect. Higher values make the sound audible over a larger distance.
</member>
</members>
<signals>
@@ -128,13 +128,13 @@
Logarithmic dampening of loudness according to distance.
</constant>
<constant name="ATTENUATION_DISABLED" value="3" enum="AttenuationModel">
- No dampening of loudness according to distance.
+ No dampening of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer].
</constant>
<constant name="OUT_OF_RANGE_MIX" value="0" enum="OutOfRangeMode">
- Mix this audio in, even when it's out of range.
+ Mix this audio in, even when it's out of range. This increases CPU usage, but keeps the sound playing at the correct position if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
</constant>
<constant name="OUT_OF_RANGE_PAUSE" value="1" enum="OutOfRangeMode">
- Pause this audio when it gets out of range.
+ Pause this audio when it gets out of range. This decreases CPU usage, but will cause the sound to restart if the camera leaves and enters the [AudioStreamPlayer3D]'s [member max_distance] radius.
</constant>
<constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking">
Disables doppler tracking.
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 7cc6a5613b..9a70b8f20c 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -4,7 +4,7 @@
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
</brief_description>
<description>
- Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
+ Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the BackBufferCopy node instead of adding them as children.
</description>
<tutorials>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml
index 026477782a..904555c48e 100644
--- a/doc/classes/BakedLightmapData.xml
+++ b/doc/classes/BakedLightmapData.xml
@@ -12,11 +12,11 @@
</return>
<argument index="0" name="path" type="NodePath">
</argument>
- <argument index="1" name="lightmap" type="Rect2">
+ <argument index="1" name="uv_scale" type="Rect2">
</argument>
- <argument index="2" name="offset" type="int">
+ <argument index="2" name="slice_index" type="int">
</argument>
- <argument index="3" name="arg3" type="int">
+ <argument index="3" name="sub_instance" type="int">
</argument>
<description>
</description>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 378df1ce65..f7e31f5f9c 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -49,7 +49,7 @@
</member>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
- To allow both left-click and right-click, use [code]BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT[/code].
+ To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
@@ -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/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 31e6ea5e54..c87398ac8f 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -82,7 +82,7 @@
Texture to multiply by [member albedo_color]. Used for basic texturing of objects.
</member>
<member name="alpha_antialiasing_edge" type="float" setter="set_alpha_antialiasing_edge" getter="get_alpha_antialiasing_edge">
- Threshold at which antialiasing will by applied on the alpha channel.
+ Threshold at which antialiasing will be applied on the alpha channel.
</member>
<member name="alpha_antialiasing_mode" type="int" setter="set_alpha_antialiasing" getter="get_alpha_antialiasing" enum="BaseMaterial3D.AlphaAntiAliasing">
The type of alpha antialiasing to apply. See [enum AlphaAntiAliasing].
@@ -93,7 +93,7 @@
<member name="alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold">
Threshold at which the alpha scissor will discard values.
</member>
- <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy">
+ <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy" default="0.0">
The strength of the anisotropy effect.
</member>
<member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -105,19 +105,19 @@
<member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture].
</member>
- <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect">
+ <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect" default="0.0">
Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.
</member>
- <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+ <member name="ao_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture].
</member>
<member name="ao_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture that defines the amount of ambient occlusion for a given point on the object.
</member>
- <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel">
+ <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
</member>
- <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight">
+ <member name="backlight" type="Color" setter="set_backlight" getter="get_backlight" default="Color( 0, 0, 0, 1 )">
The color used by the backlight effect. Represents the light passing through an object.
</member>
<member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -127,7 +127,7 @@
Texture used to control the backlight effect per-pixel. Added to [member backlight].
</member>
<member name="billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED].
+ If [code]true[/code], the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED].
</member>
<member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
Controls how the object faces the camera. See [enum BillboardMode].
@@ -137,13 +137,13 @@
The material's blend mode.
[b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode].
</member>
- <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat">
+ <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat" default="1.0">
Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect.
</member>
<member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.
</member>
- <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss">
+ <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss" default="0.5">
Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat.
</member>
<member name="clearcoat_texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -158,7 +158,7 @@
<member name="detail_albedo" type="Texture2D" setter="set_texture" getter="get_texture">
Texture that specifies the color of the detail overlay.
</member>
- <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode">
+ <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="BaseMaterial3D.BlendMode" default="0">
Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options.
</member>
<member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -171,7 +171,7 @@
Texture that specifies the per-pixel normal of the detail overlay.
[b]Note:[/b] Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
- <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV">
+ <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="BaseMaterial3D.DetailUV" default="0">
Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.
</member>
<member name="diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="BaseMaterial3D.DiffuseMode" default="0">
@@ -183,30 +183,30 @@
<member name="disable_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], the object receives no shadow that would otherwise be cast onto it.
</member>
- <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
+ <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance" default="10.0">
Distance at which the object appears fully opaque.
[b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
- <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
+ <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance" default="0.0">
Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
[b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
<member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0">
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
</member>
- <member name="emission" type="Color" setter="set_emission" getter="get_emission">
+ <member name="emission" type="Color" setter="set_emission" getter="get_emission" default="Color( 0, 0, 0, 1 )">
The emitted light's color. See [member emission_enabled].
</member>
<member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [GIProbe] is used and this object is used in baked lighting.
</member>
- <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy">
+ <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy" default="1.0">
The emitted light's strength. See [member emission_enabled].
</member>
- <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+ <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag" default="false">
Use [code]UV2[/code] to read from the [member emission_texture].
</member>
- <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator">
+ <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="BaseMaterial3D.EmissionOperator" default="0">
Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options.
</member>
<member name="emission_texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -221,21 +221,23 @@
<member name="grow_amount" type="float" setter="set_grow" getter="get_grow" default="0.0">
Grows object vertices in the direction of their normals.
</member>
- <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled">
+ <member name="heightmap_deep_parallax" type="bool" setter="set_heightmap_deep_parallax" getter="is_heightmap_deep_parallax_enabled" default="false">
</member>
<member name="heightmap_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled].
+ [b]Note:[/b] Height mapping is not supported if triplanar mapping is used on the same material. The value of [member heightmap_enabled] will be ignored if [member uv1_triplanar] is enabled.
</member>
- <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal">
+ <member name="heightmap_flip_binormal" type="bool" setter="set_heightmap_deep_parallax_flip_binormal" getter="get_heightmap_deep_parallax_flip_binormal" default="false">
</member>
- <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent">
+ <member name="heightmap_flip_tangent" type="bool" setter="set_heightmap_deep_parallax_flip_tangent" getter="get_heightmap_deep_parallax_flip_tangent" default="false">
</member>
- <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag">
+ <member name="heightmap_flip_texture" type="bool" setter="set_flag" getter="get_flag" default="false">
</member>
<member name="heightmap_max_layers" type="int" setter="set_heightmap_deep_parallax_max_layers" getter="get_heightmap_deep_parallax_max_layers">
</member>
<member name="heightmap_min_layers" type="int" setter="set_heightmap_deep_parallax_min_layers" getter="get_heightmap_deep_parallax_min_layers">
</member>
- <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale">
+ <member name="heightmap_scale" type="float" setter="set_heightmap_scale" getter="get_heightmap_scale" default="0.05">
</member>
<member name="heightmap_texture" type="Texture2D" setter="set_texture" getter="get_texture">
</member>
@@ -258,7 +260,7 @@
<member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], normal mapping is enabled.
</member>
- <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale">
+ <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale" default="1.0">
The strength of the normal map's effect.
</member>
<member name="normal_texture" type="Texture2D" setter="set_texture" getter="get_texture">
@@ -279,7 +281,7 @@
<member name="point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0">
The point size in pixels. See [member use_point_size].
</member>
- <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance">
+ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance" default="1.0">
Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
</member>
<member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false">
@@ -288,16 +290,16 @@
<member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object.
</member>
- <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
+ <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction" default="0.05">
The strength of the refraction effect.
</member>
<member name="refraction_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale].
</member>
- <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel">
+ <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" enum="BaseMaterial3D.TextureChannel" default="0">
Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
</member>
- <member name="rim" type="float" setter="set_rim" getter="get_rim">
+ <member name="rim" type="float" setter="set_rim" getter="get_rim" default="1.0">
Sets the strength of the rim lighting effect.
</member>
<member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -306,7 +308,7 @@
<member name="rim_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim].
</member>
- <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint">
+ <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint" default="0.5">
The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best.
</member>
<member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0">
@@ -330,24 +332,24 @@
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
</member>
- <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag">
+ <member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin.
</member>
- <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength">
+ <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0">
The strength of the subsurface scattering effect.
</member>
<member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
</member>
- <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost">
+ <member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0">
</member>
- <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color">
+ <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color( 1, 1, 1, 1 )">
</member>
- <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve">
+ <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve" default="1.0">
</member>
- <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth">
+ <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1">
</member>
- <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature">
+ <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
</member>
<member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture">
</member>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 877d3ca85a..55ae58ee3a 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -78,7 +78,7 @@
Constructs a basis matrix from 3 axis vectors (matrix columns).
</description>
</method>
- <method name="determinant">
+ <method name="determinant" qualifiers="const">
<return type="float">
</return>
<description>
@@ -86,7 +86,7 @@
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
</description>
</method>
- <method name="get_euler">
+ <method name="get_euler" qualifiers="const">
<return type="Vector3">
</return>
<description>
@@ -94,35 +94,35 @@
Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles.
</description>
</method>
- <method name="get_orthogonal_index">
+ <method name="get_orthogonal_index" qualifiers="const">
<return type="int">
</return>
<description>
This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code.
</description>
</method>
- <method name="get_rotation_quat">
+ <method name="get_rotation_quat" qualifiers="const">
<return type="Quat">
</return>
<description>
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
</description>
</method>
- <method name="get_scale">
+ <method name="get_scale" qualifiers="const">
<return type="Vector3">
</return>
<description>
Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
</description>
</method>
- <method name="inverse">
+ <method name="inverse" qualifiers="const">
<return type="Basis">
</return>
<description>
Returns the inverse of the matrix.
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="b" type="Basis">
@@ -171,14 +171,14 @@
<description>
</description>
</method>
- <method name="orthonormalized">
+ <method name="orthonormalized" qualifiers="const">
<return type="Basis">
</return>
<description>
Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
</description>
</method>
- <method name="rotated">
+ <method name="rotated" qualifiers="const">
<return type="Basis">
</return>
<argument index="0" name="axis" type="Vector3">
@@ -189,7 +189,7 @@
Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector.
</description>
</method>
- <method name="scaled">
+ <method name="scaled" qualifiers="const">
<return type="Basis">
</return>
<argument index="0" name="scale" type="Vector3">
@@ -198,18 +198,18 @@
Introduce an additional scaling specified by the given 3D scaling factor.
</description>
</method>
- <method name="slerp">
+ <method name="slerp" qualifiers="const">
<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.
</description>
</method>
- <method name="tdotx">
+ <method name="tdotx" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector3">
@@ -218,7 +218,7 @@
Transposed dot product with the X axis of the matrix.
</description>
</method>
- <method name="tdoty">
+ <method name="tdoty" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector3">
@@ -227,7 +227,7 @@
Transposed dot product with the Y axis of the matrix.
</description>
</method>
- <method name="tdotz">
+ <method name="tdotz" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector3">
@@ -236,7 +236,7 @@
Transposed dot product with the Z axis of the matrix.
</description>
</method>
- <method name="transposed">
+ <method name="transposed" qualifiers="const">
<return type="Basis">
</return>
<description>
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/BoxContainer.xml b/doc/classes/BoxContainer.xml
index 0d8233e6ff..ffa7c9066a 100644
--- a/doc/classes/BoxContainer.xml
+++ b/doc/classes/BoxContainer.xml
@@ -10,7 +10,7 @@
</tutorials>
<methods>
<method name="add_spacer">
- <return type="void">
+ <return type="Control">
</return>
<argument index="0" name="begin" type="bool">
</argument>
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..51c35b15ce 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -34,12 +34,40 @@
[/codeblocks]
Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code.
See also [BaseButton] which contains common properties and methods associated with this node.
+ [b]Note:[/b] Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use [TouchScreenButton] for buttons that trigger gameplay movement or actions, as [TouchScreenButton] supports multitouch.
</description>
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
<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 +85,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">
@@ -85,24 +119,51 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [Button].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Text [Color] used when the [Button] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [Button] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [Button] is being hovered and pressed.
+ </theme_item>
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [Button].
+ </theme_item>
+ <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [Button] is being pressed.
</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>
<theme_item name="hseparation" type="int" default="2">
The horizontal space between [Button]'s icon and text.
</theme_item>
+ <theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is disabled.
+ </theme_item>
+ <theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being hovered.
+ </theme_item>
+ <theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being hovered and pressed.
+ </theme_item>
+ <theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Default icon modulate [Color] of the [Button].
+ </theme_item>
+ <theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Icon modulate [Color] used when the [Button] is being pressed.
+ </theme_item>
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the 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/Callable.xml b/doc/classes/Callable.xml
index f137ede90f..0cfbd0270c 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -8,26 +8,26 @@
[b]Example:[/b]
[codeblocks]
[gdscript]
- var callable = Callable(self, "print_args")
func print_args(arg1, arg2, arg3 = ""):
prints(arg1, arg2, arg3)
func test():
- callable.call("hello", "world") # Prints "hello world".
+ var callable = Callable(self, "print_args")
+ callable.call("hello", "world") # Prints "hello world ".
callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args".
callable.call("invalid") # Invalid call, should have at least 2 arguments.
[/gdscript]
[csharp]
- Callable callable = new Callable(this, "print_args");
- public void PrintArgs(object arg1, object arg2, object arg3 = "")
+ public void PrintArgs(object arg1, object arg2, object arg3 = null)
{
GD.PrintS(arg1, arg2, arg3);
}
public void Test()
{
- callable.Call("hello", "world"); // Prints "hello world".
- callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.gd)::print_args".
+ Callable callable = new Callable(this, nameof(PrintArgs));
+ callable.Call("hello", "world"); // Prints "hello world null".
+ callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs".
callable.Call("invalid"); // Invalid call, should have at least 2 arguments.
}
[/csharp]
@@ -63,69 +63,74 @@
Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code].
</description>
</method>
- <method name="bind" qualifiers="vararg">
+ <method name="bind" qualifiers="vararg const">
<return type="Callable">
</return>
<description>
+ Returns a copy of this [Callable] with the arguments bound. Bound arguments are passed after the arguments supplied by [method call].
</description>
</method>
- <method name="call" qualifiers="vararg">
+ <method name="call" qualifiers="vararg const">
<return type="Variant">
</return>
<description>
Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature.
</description>
</method>
- <method name="call_deferred" qualifiers="vararg">
+ <method name="call_deferred" qualifiers="vararg const">
<return type="void">
</return>
<description>
Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature.
</description>
</method>
- <method name="get_method">
+ <method name="get_method" qualifiers="const">
<return type="StringName">
</return>
<description>
Returns the name of the method represented by this [Callable].
</description>
</method>
- <method name="get_object">
+ <method name="get_object" qualifiers="const">
<return type="Object">
</return>
<description>
Returns the object on which this [Callable] is called.
</description>
</method>
- <method name="get_object_id">
+ <method name="get_object_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]).
</description>
</method>
- <method name="hash">
+ <method name="hash" qualifiers="const">
<return type="int">
</return>
<description>
+ Returns the hash value of this [Callable]'s object.
</description>
</method>
- <method name="is_custom">
+ <method name="is_custom" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if this [Callable] is a custom callable whose behavior differs based on implementation details. Custom callables are used in the engine for various reasons. If [code]true[/code], you can't use [method get_method].
</description>
</method>
- <method name="is_null">
+ <method name="is_null" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if this [Callable] has no target to call the method on.
</description>
</method>
- <method name="is_standard">
+ <method name="is_standard" qualifiers="const">
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if this [Callable] is a standard callable, referencing an object and a method using a [StringName].
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -134,6 +139,7 @@
<argument index="0" name="right" type="Callable">
</argument>
<description>
+ Returns [code]true[/code] if both [Callable]s invoke different targets.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -142,14 +148,16 @@
<argument index="0" name="right" type="Callable">
</argument>
<description>
+ Returns [code]true[/code] if both [Callable]s invoke the same custom target.
</description>
</method>
- <method name="unbind">
+ <method name="unbind" qualifiers="const">
<return type="Callable">
</return>
<argument index="0" name="argcount" type="int">
</argument>
<description>
+ Returns a copy of this [Callable] with the arguments unbound. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method.
</description>
</method>
</methods>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index c7ee915109..d40567bdcb 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="margin" 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="margin" 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="margin" 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="margin" 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_drag_horizontal_enabled" getter="is_drag_horizontal_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_drag_horizontal_offset" getter="get_drag_horizontal_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_vertical_offset" 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,16 +168,8 @@
<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 name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
+ The camera's process callback. See [enum Camera2DProcessCallback].
</member>
<member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false">
If [code]true[/code], the camera rotates with the target.
@@ -191,10 +191,10 @@
<constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode">
The camera's position takes into account vertical/horizontal offsets and the screen size.
</constant>
- <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode">
+ <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessCallback">
The camera updates with the [code]_physics_process[/code] callback.
</constant>
- <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode">
+ <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessCallback">
The camera updates with the [code]_process[/code] callback.
</constant>
</constants>
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index b3fe452b12..9f1d6d8e31 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -189,12 +189,12 @@
<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">
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
- For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to an horizontal FOV of:
+ For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to a horizontal FOV of:
- ~91.31 degrees in a 4:3 viewport
- ~101.67 degrees in a 16:10 viewport
- ~107.51 degrees in a 16:9 viewport
@@ -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..87b157db4e 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -9,7 +9,7 @@
Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.
A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
- [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
@@ -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,21 +294,31 @@
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.
+ Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). 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.
[b]Example using the default project font:[/b]
[codeblocks]
[gdscript]
@@ -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..850098f741 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -13,29 +13,11 @@
<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>
<member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0">
- The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
+ The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused depending on the value of the [RichTextLabel]'s [member Node.process_mode].
[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.
</member>
<member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}">
@@ -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..05e412e9da 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -24,6 +24,8 @@
<theme_item name="checked" type="Texture2D">
The check icon to display when the [CheckBox] is checked.
</theme_item>
+ <theme_item name="checked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="disabled" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is disabled.
</theme_item>
@@ -36,18 +38,24 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The [CheckBox] text's font color.
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
The [CheckBox] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The [CheckBox] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckBox] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CheckBox].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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>
@@ -60,17 +68,26 @@
<theme_item name="normal" type="StyleBox">
The [StyleBox] to display as a background.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
The [StyleBox] to display as a background when the [CheckBox] is pressed.
</theme_item>
<theme_item name="radio_checked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked.
</theme_item>
+ <theme_item name="radio_checked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="radio_unchecked" type="Texture2D">
If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked.
</theme_item>
+ <theme_item name="radio_unchecked_disabled" type="Texture2D">
+ </theme_item>
<theme_item name="unchecked" type="Texture2D">
The check icon to display when the [CheckBox] is unchecked.
</theme_item>
+ <theme_item name="unchecked_disabled" type="Texture2D">
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index b4f91cf3a8..46e590a115 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -33,18 +33,24 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The [CheckButton] text's font color.
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
The [CheckButton] text's font color when it's disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The [CheckButton] text's font color when it's hovered.
</theme_item>
- <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
The [CheckButton] text's font color when it's hovered and pressed.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CheckButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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 +64,31 @@
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="outline_size" type="int" default="0">
+ The size of the text outline.
</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/ClassDB.xml b/doc/classes/ClassDB.xml
index 2a6a2ddd91..860bdc7c8f 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -67,6 +67,7 @@
</argument>
<description>
Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
+ [b]Note:[/code] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
</description>
</method>
<method name="class_get_property" qualifiers="const">
diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml
index de90247536..9116af19c3 100644
--- a/doc/classes/ClippedCamera3D.xml
+++ b/doc/classes/ClippedCamera3D.xml
@@ -95,15 +95,15 @@
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
The camera's collision margin. The camera can't get closer than this distance to a colliding object.
</member>
- <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera3D.ProcessMode" default="0">
- The camera's process callback. See [enum ProcessMode].
+ <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="ClippedCamera3D.ClipProcessCallback" default="0">
+ The camera's process callback. See [enum ClipProcessCallback].
</member>
</members>
<constants>
- <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
+ <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ClipProcessCallback">
The camera updates with the [code]_physics_process[/code] callback.
</constant>
- <constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
+ <constant name="CLIP_PROCESS_IDLE" value="1" enum="ClipProcessCallback">
The camera updates with the [code]_process[/code] callback.
</constant>
</constants>
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index f6bc9e2cca..81795abcdd 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 correctly 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>
@@ -175,9 +179,15 @@
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
</theme_item>
- <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [CodeEdit].
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ </theme_item>
+ <theme_item name="font_selected_color" 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>
@@ -187,6 +197,9 @@
</theme_item>
<theme_item name="normal" type="StyleBox">
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
</theme_item>
<theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )">
diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml
index 7a1dad547b..f078e4e5b0 100644
--- a/doc/classes/CodeHighlighter.xml
+++ b/doc/classes/CodeHighlighter.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0">
<brief_description>
+ A syntax highlighter for code.
</brief_description>
<description>
+ A syntax highlighter for code.
</description>
<tutorials>
</tutorials>
@@ -10,15 +12,18 @@
<method name="add_color_region">
<return type="void">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
- <argument index="1" name="p_end_key" type="String">
+ <argument index="1" name="end_key" type="String">
</argument>
- <argument index="2" name="p_color" type="Color">
+ <argument index="2" name="color" type="Color">
</argument>
- <argument index="3" name="p_line_only" type="bool" default="false">
+ <argument index="3" name="line_only" type="bool" default="false">
</argument>
<description>
+ Adds a color region such as comments or strings.
+ Both the start and end keys must be symbols. Only the start key has to be unique.
+ Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code].
</description>
</method>
<method name="add_keyword_color">
@@ -29,6 +34,8 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color for a keyword.
+ The keyword cannot contain any symbols except '_'.
</description>
</method>
<method name="add_member_keyword_color">
@@ -39,24 +46,30 @@
<argument index="1" name="color" type="Color">
</argument>
<description>
+ Sets the color for a member keyword.
+ The member keyword cannot contain any symbols except '_'.
+ It will not be highlighted if preceded by a '.'.
</description>
</method>
<method name="clear_color_regions">
<return type="void">
</return>
<description>
+ Removes all color regions.
</description>
</method>
<method name="clear_keyword_colors">
<return type="void">
</return>
<description>
+ Removes all keywords.
</description>
</method>
<method name="clear_member_keyword_colors">
<return type="void">
</return>
<description>
+ Removes all member keywords.
</description>
</method>
<method name="get_keyword_color" qualifiers="const">
@@ -65,6 +78,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Returns the color for a keyword.
</description>
</method>
<method name="get_member_keyword_color" qualifiers="const">
@@ -73,14 +87,16 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Returns the color for a member keyword.
</description>
</method>
<method name="has_color_region" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
<description>
+ Return [code]true[/code] if the start key exists, else [code]false[/code].
</description>
</method>
<method name="has_keyword_color" qualifiers="const">
@@ -89,6 +105,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Return [code]true[/code] if the keyword exists, else [code]false[/code].
</description>
</method>
<method name="has_member_keyword_color" qualifiers="const">
@@ -97,14 +114,16 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Return [code]true[/code] if the member keyword exists, else [code]false[/code].
</description>
</method>
<method name="remove_color_region">
<return type="void">
</return>
- <argument index="0" name="p_start_key" type="String">
+ <argument index="0" name="start_key" type="String">
</argument>
<description>
+ Removes the color region that uses that start key.
</description>
</method>
<method name="remove_keyword_color">
@@ -113,6 +132,7 @@
<argument index="0" name="keyword" type="String">
</argument>
<description>
+ Removes the keyword.
</description>
</method>
<method name="remove_member_keyword_color">
@@ -121,23 +141,31 @@
<argument index="0" name="member_keyword" type="String">
</argument>
<description>
+ Removes the member keyword.
</description>
</method>
</methods>
<members>
<member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}">
+ Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color.
</member>
<member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )">
+ Sets color for functions. A function is a non-keyword string followed by a '('.
</member>
<member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}">
+ Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color.
</member>
<member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}">
+ Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color.
</member>
<member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )">
+ Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'.
</member>
<member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )">
+ Sets the color for numbers.
</member>
<member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )">
+ Sets the color for symbols.
</member>
</members>
<constants>
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index dd3c57d1d0..38f4c5fe5c 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -17,6 +17,9 @@
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collision will be produced.
</member>
+ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
+ The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details.
+ </member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )">
Array of vertices which define the polygon.
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 9705a196ed..c33d007735 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors).
- You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
+ You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
@@ -54,22 +54,40 @@
<method name="Color" qualifiers="constructor">
<return type="Color">
</return>
+ <argument index="0" name="code" type="String">
+ </argument>
+ <description>
+ Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants.
+ </description>
+ </method>
+ <method name="Color" qualifiers="constructor">
+ <return type="Color">
+ </return>
+ <argument index="0" name="code" type="String">
+ </argument>
+ <argument index="1" name="alpha" type="float">
+ </argument>
+ <description>
+ Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants.
+ </description>
+ </method>
+ <method name="Color" qualifiers="constructor">
+ <return type="Color">
+ </return>
<argument index="0" name="r" type="float">
</argument>
<argument index="1" name="g" type="float">
</argument>
<argument index="2" name="b" type="float">
</argument>
- <argument index="3" name="a" type="float">
- </argument>
<description>
- Constructs a [Color] from RGBA values, typically between 0 and 1.
+ Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
+ var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
+ var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
[/csharp]
[/codeblocks]
</description>
@@ -83,19 +101,21 @@
</argument>
<argument index="2" name="b" type="float">
</argument>
+ <argument index="3" name="a" type="float">
+ </argument>
<description>
- Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1.
+ Constructs a [Color] from RGBA values, typically between 0 and 1.
[codeblocks]
[gdscript]
- var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`
+ var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`
[/gdscript]
[csharp]
- var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`
+ var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`
[/csharp]
[/codeblocks]
</description>
</method>
- <method name="blend">
+ <method name="blend" qualifiers="const">
<return type="Color">
</return>
<argument index="0" name="over" type="Color">
@@ -116,7 +136,7 @@
[/codeblocks]
</description>
</method>
- <method name="darkened">
+ <method name="darkened" qualifiers="const">
<return type="Color">
</return>
<argument index="0" name="amount" type="float">
@@ -135,7 +155,87 @@
[/codeblocks]
</description>
</method>
- <method name="inverted">
+ <method name="find_named_color" qualifiers="static">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="from_rgbe9995" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="rgbe" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="from_string" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="str" type="String">
+ </argument>
+ <argument index="1" name="default" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_named_color" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_named_color_count" qualifiers="static">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_named_color_name" qualifiers="static">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hex" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="hex" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hex64" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="hex" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="html" qualifiers="static">
+ <return type="Color">
+ </return>
+ <argument index="0" name="rgba" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="html_is_valid" qualifiers="static">
+ <return type="bool">
+ </return>
+ <argument index="0" name="color" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="inverted" qualifiers="const">
<return type="Color">
</return>
<description>
@@ -152,21 +252,21 @@
[/codeblocks]
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="to" type="Color">
</argument>
<description>
- Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="lerp">
+ <method name="lerp" qualifiers="const">
<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.
@@ -184,7 +284,7 @@
[/codeblocks]
</description>
</method>
- <method name="lightened">
+ <method name="lightened" qualifiers="const">
<return type="Color">
</return>
<argument index="0" name="amount" type="float">
@@ -255,6 +355,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>
@@ -295,7 +403,7 @@
<description>
</description>
</method>
- <method name="to_abgr32">
+ <method name="to_abgr32" qualifiers="const">
<return type="int">
</return>
<description>
@@ -312,7 +420,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_abgr64">
+ <method name="to_abgr64" qualifiers="const">
<return type="int">
</return>
<description>
@@ -329,7 +437,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_argb32">
+ <method name="to_argb32" qualifiers="const">
<return type="int">
</return>
<description>
@@ -346,7 +454,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_argb64">
+ <method name="to_argb64" qualifiers="const">
<return type="int">
</return>
<description>
@@ -363,7 +471,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_html">
+ <method name="to_html" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="with_alpha" type="bool" default="true">
@@ -385,7 +493,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_rgba32">
+ <method name="to_rgba32" qualifiers="const">
<return type="int">
</return>
<description>
@@ -402,7 +510,7 @@
[/codeblocks]
</description>
</method>
- <method name="to_rgba64">
+ <method name="to_rgba64" qualifiers="const">
<return type="int">
</return>
<description>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index aea3542867..2fc4313e47 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -91,6 +91,9 @@
<theme_item name="add_preset" type="Texture2D">
The icon for the "Add Preset" button.
</theme_item>
+ <theme_item name="bar_arrow" type="Texture2D">
+ The texture for the arrow grabber.
+ </theme_item>
<theme_item name="color_hue" type="Texture2D">
Custom texture for the hue selection slider on the right.
</theme_item>
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 76cc49a043..e49027e61d 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -73,15 +73,21 @@
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
Default text [Color] of the [ColorPickerButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
Text [Color] used when the [ColorPickerButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the [ColorPickerButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [ColorPickerButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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>
@@ -91,6 +97,9 @@
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [ColorPickerButton].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [ColorPickerButton] is being pressed.
</theme_item>
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index 3e83202472..a9687abedc 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -28,6 +28,11 @@
</description>
</method>
</methods>
+ <members>
+ <member name="backface_collision" type="bool" setter="set_backface_collision_enabled" getter="is_backface_collision_enabled" default="false">
+ If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals.
+ </member>
+ </members>
<constants>
</constants>
</class>
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/ConfigFile.xml b/doc/classes/ConfigFile.xml
index da17d993e3..38948a2d6e 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -49,6 +49,12 @@
<tutorials>
</tutorials>
<methods>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="erase_section">
<return type="void">
</return>
@@ -158,7 +164,7 @@
<argument index="0" name="data" type="String">
</argument>
<description>
- Parses the the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.
+ Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.
Returns one of the [enum Error] code constants ([code]OK[/code] on success).
</description>
</method>
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 6ea7b79dff..c0f918a01f 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.
@@ -16,8 +16,9 @@
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
- <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
+ <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link>
<link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link>
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
@@ -49,7 +50,7 @@
[gdscript]
func _gui_input(event):
if event is InputEventMouseButton:
- if event.button_index == BUTTON_LEFT and event.pressed:
+ if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
print("I've been clicked D:")
[/gdscript]
[csharp]
@@ -121,6 +122,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>
@@ -137,7 +150,6 @@
</argument>
<description>
Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses.
- [b]Note:[/b] Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color.
[b]Example of overriding a label's color and resetting it later:[/b]
[codeblocks]
[gdscript]
@@ -165,7 +177,7 @@
<argument index="1" name="constant" type="int">
</argument>
<description>
- Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is [code]0[/code], the override is cleared and the constant from assigned [Theme] is used.
+ Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses.
</description>
</method>
<method name="add_theme_font_override">
@@ -176,29 +188,29 @@
<argument index="1" name="font" type="Font">
</argument>
<description>
- 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.
+ Overrides the font with given [code]name[/code] in the [member theme] resource the control uses.
</description>
</method>
- <method name="add_theme_icon_override">
+ <method name="add_theme_font_size_override">
<return type="void">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="texture" type="Texture2D">
+ <argument index="1" name="font_size" type="int">
</argument>
<description>
- Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is [code]null[/code] or invalid, the override is cleared and the icon from assigned [Theme] is used.
+ Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses.
</description>
</method>
- <method name="add_theme_shader_override">
+ <method name="add_theme_icon_override">
<return type="void">
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="shader" type="Shader">
+ <argument index="1" name="texture" type="Texture2D">
</argument>
<description>
- Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is [code]null[/code] or invalid, the override is cleared and the shader from assigned [Theme] is used.
+ Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses.
</description>
</method>
<method name="add_theme_stylebox_override">
@@ -209,7 +221,7 @@
<argument index="1" name="stylebox" type="StyleBox">
</argument>
<description>
- Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. If [code]stylebox[/code] is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used.
+ Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses.
[b]Example of modifying a property in a StyleBox by duplicating it:[/b]
[codeblocks]
[gdscript]
@@ -294,6 +306,20 @@
[/codeblocks]
</description>
</method>
+ <method name="find_next_valid_focus" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Finds the next (below in the tree) [Control] that can receive the focus.
+ </description>
+ </method>
+ <method name="find_prev_valid_focus" qualifiers="const">
+ <return type="Control">
+ </return>
+ <description>
+ Finds the previous (above in the tree) [Control] that can receive the focus.
+ </description>
+ </method>
<method name="force_drag">
<return type="void">
</return>
@@ -309,17 +335,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 +394,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,20 +420,20 @@
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">
- <return type="float">
+ <method name="get_minimum_size" qualifiers="const">
+ <return type="Vector2">
</return>
- <argument index="0" name="margin" type="int" enum="Margin">
- </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 minimum size for this control. See [member rect_min_size].
</description>
</method>
- <method name="get_minimum_size" qualifiers="const">
- <return type="Vector2">
+ <method name="get_offset" qualifiers="const">
+ <return type="float">
</return>
+ <argument index="0" name="offset" type="int" enum="Side">
+ </argument>
<description>
- Returns the minimum size for this control. See [member rect_min_size].
+ 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_parent_area_size" qualifiers="const">
@@ -431,22 +457,15 @@
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]type[/code].
+ Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
[codeblocks]
[gdscript]
func _ready():
@@ -466,10 +485,10 @@
</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]type[/code].
+ Returns a constant 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" qualifiers="const">
@@ -477,10 +496,21 @@
</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]type[/code].
+ 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">
@@ -488,10 +518,10 @@
</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]type[/code].
+ Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
@@ -499,10 +529,10 @@
</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]type[/code].
+ Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]node_type[/code].
</description>
</method>
<method name="get_tooltip" qualifiers="const">
@@ -563,10 +593,10 @@
</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]type[/code] exists in assigned [Theme].
+ 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].
</description>
</method>
<method name="has_theme_color_override" qualifiers="const">
@@ -583,10 +613,10 @@
</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]type[/code] exists in assigned [Theme].
+ 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].
</description>
</method>
<method name="has_theme_constant_override" qualifiers="const">
@@ -603,10 +633,10 @@
</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]type[/code] exists in assigned [Theme].
+ 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].
</description>
</method>
<method name="has_theme_font_override" qualifiers="const">
@@ -618,33 +648,44 @@
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_icon" qualifiers="const">
+ <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 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]type[/code] exists in assigned [Theme].
+ 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_icon_override" qualifiers="const">
+ <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 icon with given [code]name[/code] has a valid override in this [Control] node.
+ 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="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].
</description>
</method>
- <method name="has_theme_shader_override" qualifiers="const">
+ <method name="has_theme_icon_override" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="name" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node.
+ Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node.
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
@@ -652,10 +693,10 @@
</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]type[/code] exists in assigned [Theme].
+ 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].
</description>
</method>
<method name="has_theme_stylebox_override" qualifiers="const">
@@ -667,6 +708,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>
@@ -681,27 +729,81 @@
Give up the focus. No other control will be able to receive keyboard input.
</description>
</method>
+ <method name="remove_theme_color_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for a [Color] with the given [code]name[/code].
+ </description>
+ </method>
+ <method name="remove_theme_constant_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for a constant with the given [code]name[/code].
+ </description>
+ </method>
+ <method name="remove_theme_font_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for a [Font] with the given [code]name[/code].
+ </description>
+ </method>
+ <method name="remove_theme_font_size_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for a font size with the given [code]name[/code].
+ </description>
+ </method>
+ <method name="remove_theme_icon_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for an icon with the given [code]name[/code].
+ </description>
+ </method>
+ <method name="remove_theme_stylebox_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Removes a theme override for a [StyleBox] with the given [code]name[/code].
+ </description>
+ </method>
<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 +812,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 +825,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 +833,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 +846,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">
@@ -820,7 +922,7 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree.
+ Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
[codeblocks]
[gdscript]
export (Color, RGBA) var color = Color(1, 0, 0, 1)
@@ -856,18 +958,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 +977,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 +1005,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 +1015,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 +1027,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 +1046,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 +1108,8 @@
[/csharp]
[/codeblocks]
</member>
- <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" 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.
- </member>
- <member name="margin_left" type="float" setter="set_margin" getter="get_margin" 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.
- </member>
- <member name="margin_right" type="float" setter="set_margin" getter="get_margin" 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.
- </member>
- <member name="margin_top" type="float" setter="set_margin" getter="get_margin" 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.
+ <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="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.
@@ -1038,6 +1118,22 @@
<member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0">
Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does.
</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].
+ 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="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].
+ 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="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].
+ 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="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].
+ 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="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered.
</member>
@@ -1053,7 +1149,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 +1167,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 +1258,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 +1340,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 +1358,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 +1411,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/CryptoKey.xml b/doc/classes/CryptoKey.xml
index 410c2262f9..26b3087b21 100644
--- a/doc/classes/CryptoKey.xml
+++ b/doc/classes/CryptoKey.xml
@@ -27,7 +27,7 @@
</argument>
<description>
Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded.
- [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
+ [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="load_from_string">
@@ -50,7 +50,7 @@
</argument>
<description>
Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved.
- [b]Note[/b]: [code]path[/code] should should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
+ [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="save_to_string">
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 8ac6258e97..b33f3b4ffc 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -63,7 +63,7 @@
<argument index="0" name="to_point" type="Vector2">
</argument>
<description>
- Returns the closest point (in curve's local space) to [code]to_point[/code].
+ Returns the closest baked point (in curve's local space) to [code]to_point[/code].
[code]to_point[/code] must be in this curve's local space.
</description>
</method>
@@ -80,7 +80,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
<method name="get_point_out" qualifiers="const">
@@ -89,7 +89,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
+ Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code].
</description>
</method>
<method name="get_point_position" qualifiers="const">
@@ -152,7 +152,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
- Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_out">
@@ -163,7 +163,7 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
- Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_position">
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index fe454d90cc..fcd150ad57 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -78,7 +78,7 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
- Returns the closest point (in curve's local space) to [code]to_point[/code].
+ Returns the closest baked point (in curve's local space) to [code]to_point[/code].
[code]to_point[/code] must be in this curve's local space.
</description>
</method>
@@ -95,7 +95,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
<method name="get_point_out" qualifiers="const">
@@ -104,7 +104,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
+ Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code].
</description>
</method>
<method name="get_point_position" qualifiers="const">
@@ -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>
@@ -189,7 +189,7 @@
<argument index="1" name="position" type="Vector3">
</argument>
<description>
- Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_out">
@@ -200,7 +200,7 @@
<argument index="1" name="position" type="Vector3">
</argument>
<description>
- Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console.
+ Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex.
</description>
</method>
<method name="set_point_position">
diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml
index 8107d97b67..14c35ae6d3 100644
--- a/doc/classes/Decal.xml
+++ b/doc/classes/Decal.xml
@@ -6,7 +6,7 @@
<description>
[Decal]s are used to project a texture onto a [Mesh] in the scene. Use Decals to add detail to a scene without affecting the underlying [Mesh]. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots.
They are made of an [AABB] and a group of [Texture2D]s specifying [Color], normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their [AABB] so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y).
- The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a postprocessing effect after.
+ The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a post-processing effect after.
</description>
<tutorials>
</tutorials>
@@ -65,7 +65,7 @@
Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh.
</member>
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
- Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you an ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
+ Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them.
</member>
<member name="distance_fade_begin" type="float" setter="set_distance_fade_begin" getter="get_distance_fade_begin" default="10.0">
Distance from the camera at which the Decal begins to fade away.
@@ -98,7 +98,7 @@
[Texture2D] with the emission [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.
</member>
<member name="texture_normal" type="Texture2D" setter="set_texture" getter="get_texture">
- [Texture2D] with the per-pixel normalmap for the decal. Use this to add extra detail to decals.
+ [Texture2D] with the per-pixel normal map for the decal. Use this to add extra detail to decals.
</member>
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index dc38fdf0e8..16c4348994 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -4,24 +4,35 @@
Dictionary type.
</brief_description>
<description>
- Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array.
+ Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as a hash map or associative array.
You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code].
Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior.
[b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate].
Creating a dictionary:
[codeblocks]
[gdscript]
- var my_dir = {} # Creates an empty dictionary.
- var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
- var another_dir = {
- key1: value1,
- key2: value2,
- key3: value3,
+ var my_dict = {} # Creates an empty dictionary.
+
+ var dict_variable_key = "Another key name"
+ var dict_variable_value = "value2"
+ var another_dict = {
+ "Some key name": "value1",
+ dict_variable_key: dict_variable_value,
+ }
+
+ var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
+
+ # Alternative Lua-style syntax.
+ # Doesn't require quotes around keys, but only string constants can be used as key names.
+ # Additionally, key names must start with a letter or an underscore.
+ # Here, `some_key` is a string literal, not a variable!
+ another_dict = {
+ some_key = 42,
}
[/gdscript]
[csharp]
- var myDir = new Godot.Collections.Dictionary(); // Creates an empty dictionary.
- var pointsDir = new Godot.Collections.Dictionary
+ var myDict = new Godot.Collections.Dictionary(); // Creates an empty dictionary.
+ var pointsDict = new Godot.Collections.Dictionary
{
{"White", 50},
{"Yellow", 75},
@@ -33,15 +44,15 @@
[codeblocks]
[gdscript]
export(string, "White", "Yellow", "Orange") var my_color
- var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
+ var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
func _ready():
# We can't use dot syntax here as `my_color` is a variable.
- var points = points_dir[my_color]
+ var points = points_dict[my_color]
[/gdscript]
[csharp]
[Export(PropertyHint.Enum, "White,Yellow,Orange")]
public string MyColor { get; set; }
- public Godot.Collections.Dictionary pointsDir = new Godot.Collections.Dictionary
+ public Godot.Collections.Dictionary pointsDict = new Godot.Collections.Dictionary
{
{"White", 50},
{"Yellow", 75},
@@ -50,7 +61,7 @@
public override void _Ready()
{
- int points = (int)pointsDir[MyColor];
+ int points = (int)pointsDict[MyColor];
}
[/csharp]
[/codeblocks]
@@ -58,7 +69,7 @@
Dictionaries can contain more complex data:
[codeblocks]
[gdscript]
- my_dir = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key.
+ my_dict = {"First Array": [1, 2, 3, 4]} # Assigns an Array to a String key.
[/gdscript]
[csharp]
var myDir = new Godot.Collections.Dictionary
@@ -70,8 +81,8 @@
To add a key to an existing dictionary, access it like an existing key and assign to it:
[codeblocks]
[gdscript]
- var points_dir = {"White": 50, "Yellow": 75, "Orange": 100}
- points_dir["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value.
+ var points_dict = {"White": 50, "Yellow": 75, "Orange": 100}
+ points_dict["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value.
[/gdscript]
[csharp]
var pointsDir = new Godot.Collections.Dictionary
@@ -80,7 +91,7 @@
{"Yellow", 75},
{"Orange", 100}
};
- pointsDir["blue"] = 150; // Add "Blue" as a key and assign 150 as its value.
+ pointsDict["blue"] = 150; // Add "Blue" as a key and assign 150 as its value.
[/csharp]
[/codeblocks]
Finally, dictionaries can contain different types of keys and values in the same dictionary:
@@ -89,22 +100,22 @@
# This is a valid dictionary.
# To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`.
# Indexing styles can be mixed and matched depending on your needs.
- var my_dir = {
+ var my_dict = {
"String Key": 5,
4: [1, 2, 3],
7: "Hello",
- "sub_dir": {"sub_key": "Nested value"},
+ "sub_dict": {"sub_key": "Nested value"},
}
[/gdscript]
[csharp]
// This is a valid dictionary.
// To access the string "Nested value" below, use `my_dir.sub_dir.sub_key` or `my_dir["sub_dir"]["sub_key"]`.
// Indexing styles can be mixed and matched depending on your needs.
- var myDir = new Godot.Collections.Dictionary {
+ var myDict = new Godot.Collections.Dictionary {
{"String Key", 5},
{4, new Godot.Collections.Array{1,2,3}},
{7, "Hello"},
- {"sub_dir", new Godot.Collections.Dictionary{{"sub_key", "Nested value"}}}
+ {"sub_dict", new Godot.Collections.Dictionary{{"sub_key", "Nested value"}}}
};
[/csharp]
[/codeblocks]
@@ -117,11 +128,11 @@
func compare_arrays():
print(array1 == array2) # Will print true.
- var dir1 = {"a": 1, "b": 2, "c": 3}
- var dir2 = {"a": 1, "b": 2, "c": 3}
+ var dict1 = {"a": 1, "b": 2, "c": 3}
+ var dict2 = {"a": 1, "b": 2, "c": 3}
func compare_dictionaries():
- print(dir1 == dir2) # Will NOT print true.
+ print(dict1 == dict2) # Will NOT print true.
[/gdscript]
[csharp]
// You have to use GD.Hash().
@@ -135,35 +146,36 @@
GD.Print(GD.Hash(array1) == GD.Hash(array2)); // Will print true.
}
- public Godot.Collections.Dictionary dir1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
- public Godot.Collections.Dictionary dir2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
+ public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
+ public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
public void CompareDictionaries()
{
- GD.Print(dir1 == dir2); // Will NOT print true.
+ GD.Print(dict1 == dict2); // Will NOT print true.
}
[/csharp]
[/codeblocks]
You need to first calculate the dictionary's hash with [method hash] before you can compare them:
[codeblocks]
[gdscript]
- var dir1 = {"a": 1, "b": 2, "c": 3}
- var dir2 = {"a": 1, "b": 2, "c": 3}
+ var dict1 = {"a": 1, "b": 2, "c": 3}
+ var dict2 = {"a": 1, "b": 2, "c": 3}
func compare_dictionaries():
- print(dir1.hash() == dir2.hash()) # Will print true.
+ print(dict1.hash() == dict2.hash()) # Will print true.
[/gdscript]
[csharp]
// You have to use GD.Hash().
- public Godot.Collections.Dictionary dir1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
- public Godot.Collections.Dictionary dir2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
+ public Godot.Collections.Dictionary dict1 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
+ public Godot.Collections.Dictionary dict2 = new Godot.Collections.Dictionary{{"a", 1}, {"b", 2}, {"c", 3}};
public void CompareDictionaries()
{
- GD.Print(GD.Hash(dir1) == GD.Hash(dir2)); // Will print true.
+ GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Will print true.
}
[/csharp]
[/codeblocks]
+ [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary itself can still be mutated by defining the values of individual keys. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
<link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link>
@@ -194,7 +206,7 @@
Clear the dictionary, removing all key/value pairs.
</description>
</method>
- <method name="duplicate">
+ <method name="duplicate" qualifiers="const">
<return type="Dictionary">
</return>
<argument index="0" name="deep" type="bool" default="false">
@@ -203,13 +215,6 @@
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">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the dictionary is empty.
- </description>
- </method>
<method name="erase">
<return type="bool">
</return>
@@ -219,7 +224,7 @@
Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Does not erase elements while iterating over the dictionary.
</description>
</method>
- <method name="get">
+ <method name="get" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="key" type="Variant">
@@ -230,7 +235,7 @@
Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted.
</description>
</method>
- <method name="has">
+ <method name="has" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="key" type="Variant">
@@ -255,16 +260,16 @@
This method (like the [code]in[/code] operator) will evaluate to [code]true[/code] as long as the key exists, even if the associated value is [code]null[/code].
</description>
</method>
- <method name="has_all">
+ <method name="has_all" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="keys" type="Array">
</argument>
<description>
- Returns [code]true[/code] if the dictionary has all of the keys in the given array.
+ Returns [code]true[/code] if the dictionary has all the keys in the given array.
</description>
</method>
- <method name="hash">
+ <method name="hash" qualifiers="const">
<return type="int">
</return>
<description>
@@ -287,7 +292,14 @@
[b]Note:[/b] Dictionaries with the same keys/values but in a different order will have a different hash.
</description>
</method>
- <method name="keys">
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the dictionary is empty.
+ </description>
+ </method>
+ <method name="keys" qualifiers="const">
<return type="Array">
</return>
<description>
@@ -318,14 +330,14 @@
<description>
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the size of the dictionary (in pairs).
+ Returns the number of keys in the dictionary.
</description>
</method>
- <method name="values">
+ <method name="values" qualifiers="const">
<return type="Array">
</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/Directory.xml b/doc/classes/Directory.xml
index 2d7292717d..a9d7960501 100644
--- a/doc/classes/Directory.xml
+++ b/doc/classes/Directory.xml
@@ -6,6 +6,7 @@
<description>
Directory type. It is used to manage directories and their content (not restricted to the project folder).
When creating a new [Directory], it must be explicitly opened using [method open] before most methods can be used. However, [method file_exists] and [method dir_exists] can be used without opening a directory. If so, they use a path relative to [code]res://[/code].
+ [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use [ResourceLoader] to access imported resources.
Here is an example on how to iterate through the files of a directory:
[codeblocks]
[gdscript]
@@ -125,7 +126,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String.
+ On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not exist, the method returns an empty String.
</description>
</method>
<method name="get_drive_count">
@@ -167,7 +168,7 @@
<return type="void">
</return>
<description>
- Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
+ Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] does not matter).
</description>
</method>
<method name="make_dir">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index d91ea6528a..91e90d051d 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -492,7 +492,7 @@
</argument>
<argument index="3" name="subtitle_track" type="String">
</argument>
- <argument index="4" name="arg4" type="int">
+ <argument index="4" name="screen" type="int">
</argument>
<description>
</description>
@@ -635,6 +635,42 @@
<description>
</description>
</method>
+ <method name="tablet_get_current_driver" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns current active tablet driver name.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_get_driver_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of available tablet drivers.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_get_driver_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns the tablet driver name for the given index.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
+ <method name="tablet_set_current_driver">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Set active tablet driver name.
+ [b]Note:[/b] This method is implemented on Windows.
+ </description>
+ </method>
<method name="virtual_keyboard_get_height" qualifiers="const">
<return type="int">
</return>
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/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 9ef2bd21cc..b29734de1c 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorExportPlugin" inherits="Reference" version="4.0">
<brief_description>
- A script that is executed when exporting projects.
+ A script that is executed when exporting the project.
</brief_description>
<description>
+ Editor export plugins are automatically activated whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, [method _export_begin] is called at the beginning of the export process and then [method _export_file] is called for each exported file.
</description>
<tutorials>
</tutorials>
@@ -20,7 +21,7 @@
<argument index="3" name="flags" type="int">
</argument>
<description>
- Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export.
+ Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [code]features[/code] is the list of features for the export, [code]is_debug[/code] is [code]true[/code] for debug builds, [code]path[/code] is the target path for the exported project. [code]flags[/code] is only used when running a runnable profile, e.g. when using native run on Android.
</description>
</method>
<method name="_export_end" qualifiers="virtual">
@@ -40,6 +41,8 @@
<argument index="2" name="features" type="PackedStringArray">
</argument>
<description>
+ Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [code]path[/code] is the path of the file, [code]type[/code] is the [Resource] represented by the file (e.g. [PackedScene]) and [code]features[/code] is the list of features for the export.
+ Calling [method skip] inside this callback will make the file not included in the export.
</description>
</method>
<method name="add_file">
@@ -52,6 +55,7 @@
<argument index="2" name="remap" type="bool">
</argument>
<description>
+ Adds a custom file to be exported. [code]path[/code] is the virtual path that can be used to load the file, [code]file[/code] is the binary data of the file. If [code]remap[/code] is [code]true[/code], file will not be exported, but instead remapped to the given [code]path[/code].
</description>
</method>
<method name="add_ios_bundle_file">
@@ -60,6 +64,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Adds an iOS bundle file from the given [code]path[/code] to the exported project.
</description>
</method>
<method name="add_ios_cpp_code">
@@ -68,6 +73,7 @@
<argument index="0" name="code" type="String">
</argument>
<description>
+ Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin.
</description>
</method>
<method name="add_ios_embedded_framework">
@@ -96,6 +102,7 @@
<argument index="0" name="flags" type="String">
</argument>
<description>
+ Adds linker flags for the iOS export.
</description>
</method>
<method name="add_ios_plist_content">
@@ -104,6 +111,7 @@
<argument index="0" name="plist_content" type="String">
</argument>
<description>
+ Adds content for iOS Property List files.
</description>
</method>
<method name="add_ios_project_static_lib">
@@ -112,6 +120,7 @@
<argument index="0" name="path" type="String">
</argument>
<description>
+ Adds a static lib from the given [code]path[/code] to the iOS project.
</description>
</method>
<method name="add_shared_object">
@@ -122,12 +131,14 @@
<argument index="1" name="tags" type="PackedStringArray">
</argument>
<description>
+ Adds a shared object with the given [code]tags[/code] and destination [code]path[/code].
</description>
</method>
<method name="skip">
<return type="void">
</return>
<description>
+ To be called inside [method _export_file]. Skips the current file, so it's not included in the export.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml
index 5461dccd27..3a045817c2 100644
--- a/doc/classes/EditorFileSystem.xml
+++ b/doc/classes/EditorFileSystem.xml
@@ -90,7 +90,7 @@
<argument index="0" name="resources" type="PackedStringArray">
</argument>
<description>
- Remitted if a resource is reimported.
+ Emitted if a resource is reimported.
</description>
</signal>
<signal name="resources_reload">
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index e5401134bf..aa64ab4043 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -16,7 +16,7 @@
return "my.special.plugin"
func get_visible_name():
- return "Special Mesh Importer"
+ return "Special Mesh"
func get_recognized_extensions():
return ["special", "spec"]
@@ -44,8 +44,7 @@
# Fill the Mesh with data read in "file", left as an exercise to the reader.
var filename = save_path + "." + get_save_extension()
- ResourceSaver.save(filename, mesh)
- return OK
+ return ResourceSaver.save(filename, mesh)
[/gdscript]
[csharp]
using Godot;
@@ -60,7 +59,7 @@
public override String GetVisibleName()
{
- return "Special Mesh Importer";
+ return "Special Mesh";
}
public override Godot.Collections.Array GetRecognizedExtensions()
@@ -104,8 +103,7 @@
var mesh = new ArrayMesh();
// Fill the Mesh with data read in "file", left as an exercise to the reader.
String filename = savePath + "." + GetSaveExtension();
- ResourceSaver.Save(filename, mesh);
- return (int)Error.Ok;
+ return (int)ResourceSaver.Save(filename, mesh);
}
}
[/csharp]
@@ -220,7 +218,7 @@
<return type="String">
</return>
<description>
- Gets the name to display in the import window.
+ Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".
</description>
</method>
<method name="import" qualifiers="virtual">
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index 6f03165a97..d85f95baff 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -10,14 +10,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="refresh">
- <return type="void">
- </return>
- <description>
- Refreshes the inspector.
- [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)
- </description>
- </method>
</methods>
<members>
<member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" />
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index 3cc624f49b..8204dc931e 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -4,12 +4,12 @@
Plugin for adding custom property editors on inspector.
</brief_description>
<description>
- This plugins allows adding custom property editors to [EditorInspector].
+ These plugins allow adding custom property editors to [EditorInspector].
Plugins are registered via [method EditorPlugin.add_inspector_plugin].
When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported.
If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class.
Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
- Finally [method parse_end] will be called.
+ Finally, [method parse_end] will be called.
On each of these calls, the "add" functions can be called.
</description>
<tutorials>
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index c7561449b9..b01af71852 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -40,19 +40,19 @@
Returns the edited (current) scene's root [Node].
</description>
</method>
- <method name="get_editor_settings">
- <return type="EditorSettings">
+ <method name="get_editor_main_control">
+ <return type="Control">
</return>
<description>
- Returns the editor's [EditorSettings] instance.
+ Returns the main editor control. Use this as a parent for main screens.
+ [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
</description>
</method>
- <method name="get_editor_viewport">
- <return type="Control">
+ <method name="get_editor_settings">
+ <return type="EditorSettings">
</return>
<description>
- Returns the main editor control. Use this as a parent for main screens.
- [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
+ Returns the editor's [EditorSettings] instance.
</description>
</method>
<method name="get_file_system_dock">
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index adaaed4f1c..34657a1c08 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -98,6 +98,13 @@
Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
</description>
</method>
+ <method name="get_gizmo_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ Override this method to provide the name that will appear in the gizmo visibility menu.
+ </description>
+ </method>
<method name="get_handle_name" qualifiers="virtual">
<return type="String">
</return>
@@ -125,19 +132,12 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="gizmo" type="EditorNode3DGizmo">
+ <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null">
</argument>
<description>
Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
</description>
</method>
- <method name="get_name" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- Override this method to provide the name that will appear in the gizmo visibility menu.
- </description>
- </method>
<method name="get_priority" qualifiers="virtual">
<return type="int">
</return>
@@ -170,7 +170,7 @@
<return type="bool">
</return>
<description>
- Override this method to define whether Node3D with this gizmo should be selecteble even when the gizmo is hidden.
+ Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.
</description>
</method>
<method name="redraw" qualifiers="virtual">
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index ca011abb36..8dcffb0b74 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -91,6 +91,7 @@
<argument index="0" name="plugin" type="EditorExportPlugin">
</argument>
<description>
+ Registers a new export plugin. Export plugins are used when the project is being exported. See [EditorExportPlugin] for more information.
</description>
</method>
<method name="add_import_plugin">
@@ -130,14 +131,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 +145,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">
@@ -172,6 +169,8 @@
<return type="bool">
</return>
<description>
+ This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
+ This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method build] methods from running.
</description>
</method>
<method name="clear" qualifiers="virtual">
@@ -562,7 +561,7 @@
<argument index="0" name="script" type="Script">
</argument>
<description>
- Removes the debugger plugin with given script fromm the Debugger.
+ Removes the debugger plugin with given script from the Debugger.
</description>
</method>
<method name="remove_export_plugin">
@@ -678,6 +677,10 @@
Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins.
</description>
</signal>
+ <signal name="project_settings_changed">
+ <description>
+ </description>
+ </signal>
<signal name="resource_saved">
<argument index="0" name="resource" type="Resource">
</argument>
diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml
index db85b859e5..aa55a1653d 100644
--- a/doc/classes/EditorSceneImporter.xml
+++ b/doc/classes/EditorSceneImporter.xml
@@ -74,21 +74,11 @@
</constant>
<constant name="IMPORT_ANIMATION" value="2">
</constant>
- <constant name="IMPORT_ANIMATION_DETECT_LOOP" value="4">
+ <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="4">
</constant>
- <constant name="IMPORT_ANIMATION_OPTIMIZE" value="8">
+ <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="8">
</constant>
- <constant name="IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS" value="16">
- </constant>
- <constant name="IMPORT_ANIMATION_KEEP_VALUE_TRACKS" value="32">
- </constant>
- <constant name="IMPORT_GENERATE_TANGENT_ARRAYS" value="256">
- </constant>
- <constant name="IMPORT_FAIL_ON_MISSING_DEPENDENCIES" value="512">
- </constant>
- <constant name="IMPORT_MATERIALS_IN_INSTANCES" value="1024">
- </constant>
- <constant name="IMPORT_USE_COMPRESSION" value="2048">
+ <constant name="IMPORT_USE_NAMED_SKIN_BINDS" value="16">
</constant>
</constants>
</class>
diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml
deleted file mode 100644
index c72d4ee25a..0000000000
--- a/doc/classes/EditorSceneImporterAssimp.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" version="4.0">
- <brief_description>
- FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url].
- </brief_description>
- <description>
- This is an FBX 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. It currently has many known limitations and works best with static meshes. Most animated meshes won't import correctly.
- If exporting a FBX scene from Autodesk Maya, use these FBX export settings:
- [codeblock]
- - Smoothing Groups
- - Smooth Mesh
- - Triangluate (for meshes with blend shapes)
- - Bake Animation
- - Resample All
- - Deformed Models
- - Skins
- - Blend Shapes
- - Curve Filters
- - Constant Key Reducer
- - Auto Tangents Only
- - *Do not check* Constraints (as it will break the file)
- - Can check Embed Media (embeds textures into the exported FBX file)
- - Note that when importing embedded media, the texture and mesh will be a single immutable file.
- - You will have to re-export then re-import the FBX if the texture has changed.
- - Units: Centimeters
- - Up Axis: Y
- - Binary format in FBX 2017
- [/codeblock]
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml
new file mode 100644
index 0000000000..9daa3f16bc
--- /dev/null
+++ b/doc/classes/EditorSceneImporterMesh.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneImporterMesh" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_blend_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="add_surface">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
+ </argument>
+ <argument index="1" name="arrays" type="Array">
+ </argument>
+ <argument index="2" name="blend_shapes" type="Array" default="[ ]">
+ </argument>
+ <argument index="3" name="lods" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="4" name="material" type="Material" default="null">
+ </argument>
+ <argument index="5" name="name" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_mode" qualifiers="const">
+ <return type="int" enum="Mesh.BlendShapeMode">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_blend_shape_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="blend_shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_lightmap_size_hint" qualifiers="const">
+ <return type="Vector2i">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_mesh">
+ <return type="ArrayMesh">
+ </return>
+ <argument index="0" name="arg0" type="Mesh">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_blend_shape_arrays" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="blend_shape_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_indices" qualifiers="const">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="lod_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_lod_size" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <argument index="1" name="lod_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_material" qualifiers="const">
+ <return type="Material">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_surface_primitive_type">
+ <return type="int" enum="Mesh.PrimitiveType">
+ </return>
+ <argument index="0" name="surface_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_blend_shape_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_lightmap_size_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2i">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;surfaces&quot;: [ ]}">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSceneImporterMeshNode3D.xml b/doc/classes/EditorSceneImporterMeshNode3D.xml
new file mode 100644
index 0000000000..1e459c1cee
--- /dev/null
+++ b/doc/classes/EditorSceneImporterMeshNode3D.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorSceneImporterMeshNode3D" inherits="Node3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="mesh" type="EditorSceneImporterMesh" setter="set_mesh" getter="get_mesh">
+ </member>
+ <member name="skeleton_path" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath(&quot;&quot;)">
+ </member>
+ <member name="skin" type="Skin" setter="set_skin" getter="get_skin">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 5cddecffa8..d1cdc4e43e 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -62,13 +62,6 @@
Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
</description>
</method>
- <method name="get_source_folder" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the resource folder the imported scene file is located in.
- </description>
- </method>
<method name="post_import" qualifiers="virtual">
<return type="Object">
</return>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 6088ae7a43..016d0128eb 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -160,6 +160,16 @@
Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings.
</description>
</method>
+ <method name="set_builtin_action_override">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="actions_list" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_favorites">
<return type="void">
</return>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index 103d95e1d6..b80e81928f 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0">
<brief_description>
+ Base Syntax highlighter resource for the [ScriptEditor].
</brief_description>
<description>
+ Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor].
+ Add a syntax highlighter to an individual script by calling [method ScriptEditorBase.add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
</description>
<tutorials>
</tutorials>
@@ -11,18 +14,21 @@
<return type="String">
</return>
<description>
+ Virtual method which can be overridden to return the syntax highlighter name.
</description>
</method>
<method name="_get_supported_extentions" qualifiers="virtual">
<return type="Array">
</return>
<description>
+ Virtual method which can be overridden to return the supported file extensions.
</description>
</method>
<method name="_get_supported_languages" qualifiers="virtual">
<return type="Array">
</return>
<description>
+ Virtual method which can be overridden to return the supported language names.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index bb356c2183..0056b5ce16 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -38,7 +38,7 @@
<return type="Dictionary">
</return>
<description>
- Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of a change the corresponding file has experienced.
+ Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced.
The following integer values are being used to signify that the detected file is:
- [code]0[/code]: New to the VCS working directory
- [code]1[/code]: Modified
diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml
index fc68b47645..1e4fde453b 100644
--- a/doc/classes/EncodedObjectAsID.xml
+++ b/doc/classes/EncodedObjectAsID.xml
@@ -4,7 +4,7 @@
Holds a reference to an [Object]'s instance ID.
</brief_description>
<description>
- Utility class which holds a reference to the internal identifier of an [Object] instance, as given by [method Object.get_instance_id]. This ID can then be used to retrieve the object instance with [method @GDScript.instance_from_id].
+ Utility class which holds a reference to the internal identifier of an [Object] instance, as given by [method Object.get_instance_id]. This ID can then be used to retrieve the object instance with [method @GlobalScope.instance_from_id].
This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs.
</description>
<tutorials>
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="object_id" type="int" setter="set_object_id" getter="get_object_id" default="0">
- The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id].
+ The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id].
</member>
</members>
<constants>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index fab8512e4a..f9d8cf574a 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,13 +51,6 @@
Returns the frames per second of the running game.
</description>
</method>
- <method name="get_idle_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].
- </description>
- </method>
<method name="get_license_info" qualifiers="const">
<return type="Dictionary">
</return>
@@ -93,6 +86,13 @@
Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation.
</description>
</method>
+ <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]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn].
+ </description>
+ </method>
<method name="get_singleton" qualifiers="const">
<return type="Object">
</return>
@@ -162,7 +162,7 @@
The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage.
</member>
<member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5">
- Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows to smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
+ Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.
</member>
<member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0">
The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 104c149784..6909fac2b7 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].
@@ -169,11 +169,15 @@
</member>
<member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0">
</member>
+ <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.0">
+ </member>
<member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8">
</member>
<member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1">
</member>
<member name="sdfgi_enabled" type="bool" setter="set_sdfgi_enabled" getter="is_sdfgi_enabled" default="false">
+ If [code]true[/code], enables signed distance field global illumination.
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</member>
<member name="sdfgi_energy" type="float" setter="set_sdfgi_energy" getter="get_sdfgi_energy" default="1.0">
</member>
@@ -187,8 +191,6 @@
</member>
<member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false">
</member>
- <member name="sdfgi_use_multi_bounce" type="bool" setter="set_sdfgi_use_multi_bounce" getter="is_sdfgi_using_multi_bounce" default="false">
- </member>
<member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false">
</member>
<member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0">
@@ -218,26 +220,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.
@@ -262,12 +267,14 @@
</member>
<member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0">
</member>
- <member name="volumetric_fog_shadow_filter" type="int" setter="set_volumetric_fog_shadow_filter" getter="get_volumetric_fog_shadow_filter" enum="Environment.VolumetricFogShadowFilter" default="1">
+ <member name="volumetric_fog_temporal_reprojection_amount" type="float" setter="set_volumetric_fog_temporal_reprojection_amount" getter="get_volumetric_fog_temporal_reprojection_amount" default="0.9">
+ </member>
+ <member name="volumetric_fog_temporal_reprojection_enabled" type="bool" setter="set_volumetric_fog_temporal_reprojection_enabled" getter="is_volumetric_fog_temporal_reprojection_enabled" default="true">
</member>
</members>
<constants>
<constant name="BG_CLEAR_COLOR" value="0" enum="BGMode">
- Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color].
+ Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color].
</constant>
<constant name="BG_COLOR" value="1" enum="BGMode">
Clears the background using a custom clear color.
@@ -335,18 +342,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/File.xml b/doc/classes/File.xml
index ada57a8114..e0781e807f 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -6,7 +6,8 @@
<description>
File type. This is used to permanently store data into the user device's file system and to read from it. This can be used to store game save data or player configuration files, for example.
Here's a sample on how to write and read from a file:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func save(content):
var file = File.new()
file.open("user://save_game.dat", File.WRITE)
@@ -19,9 +20,29 @@
var content = file.get_as_text()
file.close()
return content
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public void Save(string content)
+ {
+ var file = new File();
+ file.Open("user://save_game.dat", File.ModeFlags.Write);
+ file.StoreString(content);
+ file.Close();
+ }
+
+ public string Load()
+ {
+ var file = new File();
+ file.Open("user://save_game.dat", File.ModeFlags.Read);
+ string content = file.GetAsText();
+ file.Close();
+ return content;
+ }
+ [/csharp]
+ [/codeblocks]
In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
[b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
+ [b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals.
</description>
<tutorials>
<link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link>
@@ -32,7 +53,7 @@
<return type="void">
</return>
<description>
- Closes the currently opened file.
+ Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file.
</description>
</method>
<method name="eof_reached" qualifiers="const">
@@ -53,6 +74,14 @@
[b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.
</description>
</method>
+ <method name="flush">
+ <return type="void">
+ </return>
+ <description>
+ Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.
+ [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes.
+ </description>
+ </method>
<method name="get_16" qualifiers="const">
<return type="int">
</return>
@@ -303,7 +332,8 @@
Stores an integer as 16 bits in the file.
[b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around.
To store a signed integer, use [method store_64] or store a signed integer from the interval [code][-2^15, 2^15 - 1][/code] (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
const MAX_15B = 1 &lt;&lt; 15
const MAX_16B = 1 &lt;&lt; 16
@@ -320,7 +350,22 @@
var read2 = f.get_16() # 121
var converted1 = unsigned16_to_signed(read1) # -42
var converted2 = unsigned16_to_signed(read2) # 121
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var f = new File();
+ f.Open("user://file.dat", File.ModeFlags.WriteRead);
+ f.Store16(unchecked((ushort)-42)); // This wraps around and stores 65494 (2^16 - 42).
+ f.Store16(121); // In bounds, will store 121.
+ f.Seek(0); // Go back to start to read the stored value.
+ ushort read1 = f.Get16(); // 65494
+ ushort read2 = f.Get16(); // 121
+ short converted1 = BitConverter.ToInt16(BitConverter.GetBytes(read1), 0); // -42
+ short converted2 = BitConverter.ToInt16(BitConverter.GetBytes(read2), 0); // 121
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="store_32">
@@ -445,8 +490,9 @@
</methods>
<members>
<member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false">
- If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines.
- [b]Note:[/b] This is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file.
+ If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness.
+ [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.
+ [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before.
</member>
</members>
<constants>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index b4afee7610..966be0a981 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">
@@ -133,6 +133,9 @@
</constant>
</constants>
<theme_items>
+ <theme_item name="back_folder" type="Texture2D">
+ Custom icon for the back arrow.
+ </theme_item>
<theme_item name="file" type="Texture2D">
Custom icon for files.
</theme_item>
@@ -148,6 +151,9 @@
<theme_item name="folder_icon_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
The color modulation applied to the folder icon.
</theme_item>
+ <theme_item name="forward_folder" type="Texture2D">
+ Custom icon for the forward arrow.
+ </theme_item>
<theme_item name="parent_folder" type="Texture2D">
Custom icon for the parent folder arrow.
</theme_item>
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index f49fbf0d2a..20d5b6ce9b 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,177 @@
</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. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height.
+ </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 of a bounding box of a string, taking kerning and advance into account.
+ [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height].
+ 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 of the line in pixels.
+ </member>
+ <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing at the top of the line 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..e426c8fb36
--- /dev/null
+++ b/doc/classes/FontData.xml
@@ -0,0 +1,416 @@
+<?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="bitmap_add_char">
+ <return type="void">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <argument index="1" name="texture_idx" type="int">
+ </argument>
+ <argument index="2" name="rect" type="Rect2">
+ </argument>
+ <argument index="3" name="align" type="Vector2">
+ </argument>
+ <argument index="4" name="advance" type="float">
+ </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="bitmap_add_kerning_pair">
+ <return type="void">
+ </return>
+ <argument index="0" name="A" type="int">
+ </argument>
+ <argument index="1" name="B" type="int">
+ </argument>
+ <argument index="2" name="kerning" type="int">
+ </argument>
+ <description>
+ Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ </description>
+ </method>
+ <method name="bitmap_add_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
+ </argument>
+ <description>
+ Adds a texture to the bitmap font.
+ </description>
+ </method>
+ <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_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="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="new_bitmap">
+ <return type="void">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <argument index="1" name="ascent" type="float">
+ </argument>
+ <argument index="2" name="base_size" type="int">
+ </argument>
+ <description>
+ Creates new, empty bitmap font.
+ </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_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="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="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing for each glyph in pixels.
+ This can be a negative number to make the distance between glyphs smaller.
+ </member>
+ <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
+ Extra spacing for the space character in pixels.
+ This can be a negative number to make the distance between words smaller.
+ </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>
+ <constant name="SPACING_GLYPH" value="0" enum="SpacingType">
+ Spacing for each glyph.
+ </constant>
+ <constant name="SPACING_SPACE" value="1" enum="SpacingType">
+ Spacing for the space character.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index 52d3698201..4f56d1ad3e 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
[GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
- Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality].
+ Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality].
+ [b]Note:[/b] Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh.
</description>
<tutorials>
<link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index c09151405a..ebe4e3b00d 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -71,7 +71,8 @@
Particle texture. If [code]null[/code], particles will be squares.
</member>
<member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )">
- Editor visibility helper.
+ The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active.
+ Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool.
</member>
</members>
<constants>
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index d1296c3418..aea106af50 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -123,7 +123,8 @@
<member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath(&quot;&quot;)">
</member>
<member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )">
- The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active.
+ The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active.
+ Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool.
</member>
</members>
<constants>
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 a6bcc1301b..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">
@@ -201,12 +201,21 @@
Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType].
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise].
[b]Note:[/b] To translate the polygon's vertices specifically, multiply them to a [Transform2D]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var polygon = PackedVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)])
var offset = Vector2(50, 50)
polygon = Transform2D(0, offset) * polygon
print(polygon) # prints [Vector2(50, 50), Vector2(150, 50), Vector2(150, 150), Vector2(50, 150)]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var polygon = new Vector2[] { new Vector2(0, 0), new Vector2(100, 0), new Vector2(100, 100), new Vector2(0, 100) };
+ var offset = new Vector2(50, 50);
+ // TODO: This code is not valid right now. Ping @aaronfranke about it before Godot 4.0 is out.
+ //polygon = (Vector2[]) new Transform2D(0, offset).Xform(polygon);
+ //GD.Print(polygon); // prints [Vector2(50, 50), Vector2(150, 50), Vector2(150, 150), Vector2(50, 150)]
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="offset_polyline">
diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml
index d0b930defb..9f012008e3 100644
--- a/doc/classes/Geometry3D.xml
+++ b/doc/classes/Geometry3D.xml
@@ -129,7 +129,7 @@
<argument index="2" name="planes" type="Array">
</argument>
<description>
- Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty.
+ Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array.
</description>
</method>
<method name="segment_intersects_cylinder">
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index cc85ce295b..631a30abab 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -48,6 +48,8 @@
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
</member>
+ <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
+ </member>
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
The GeometryInstance3D's max LOD distance.
[b]Note:[/b] This property currently has no effect.
diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml
index 4ccbdee144..28c647a1c3 100644
--- a/doc/classes/Gradient.xml
+++ b/doc/classes/Gradient.xml
@@ -57,10 +57,10 @@
<method name="remove_point">
<return type="void">
</return>
- <argument index="0" name="offset" type="int">
+ <argument index="0" name="point" type="int">
</argument>
<description>
- Removes the color at the index [code]offset[/code].
+ Removes the color at the index [code]point[/code].
</description>
</method>
<method name="set_color">
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 77bd2c60cc..b4536c0589 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -88,7 +88,7 @@
</return>
<description>
Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph.
- Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead.
+ Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their [member CanvasItem.visible] property instead.
</description>
</method>
<method name="is_node_connected">
@@ -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.
@@ -266,17 +281,17 @@
Emitted at the end of a GraphNode movement.
</description>
</signal>
- <signal name="node_selected">
+ <signal name="node_deselected">
<argument index="0" name="node" type="Node">
</argument>
<description>
- Emitted when a GraphNode is selected.
</description>
</signal>
- <signal name="node_unselected">
+ <signal name="node_selected">
<argument index="0" name="node" type="Node">
</argument>
<description>
+ Emitted when a GraphNode is selected.
</description>
</signal>
<signal name="paste_nodes_request">
@@ -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..aae3126c0f 100644
--- a/doc/classes/GraphNode.xml
+++ b/doc/classes/GraphNode.xml
@@ -6,7 +6,7 @@
<description>
A GraphNode is a container. Each GraphNode can have several input and output slots, sometimes referred to as ports, allowing connections between GraphNodes. To add a slot to GraphNode, add any [Control]-derived child node to it.
After adding at least one child to GraphNode new sections will be automatically created in the Inspector called 'Slot'. When 'Slot' is expanded you will see list with index number for each slot. You can click on each of them to expand further.
- In the Inspector you can enable (show) or disable (hide) slots. By default all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections.
+ In the Inspector you can enable (show) or disable (hide) slots. By default, all slots are disabled so you may not see any slots on your GraphNode initially. You can assign a type to each slot. Only slots of the same type will be able to connect to each other. You can also assign colors to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input connections are on the left and output connections are on the right side of GraphNode. Only enabled slots are counted as connections.
</description>
<tutorials>
</tutorials>
@@ -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>
@@ -239,6 +272,13 @@
Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]).
</description>
</signal>
+ <signal name="slot_updated">
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Emitted when any GraphNode's slot is updated.
+ </description>
+ </signal>
</signals>
<constants>
<constant name="OVERLAY_DISABLED" value="0" enum="Overlay">
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/HTTPClient.xml b/doc/classes/HTTPClient.xml
index ec8ca7456a..ddfcdf7724 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -4,7 +4,7 @@
Low-level hyper-text transfer protocol client.
</brief_description>
<description>
- Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. [b]See the [HTTPRequest] node for an higher-level alternative.[/b]
+ Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. [b]See the [HTTPRequest] node for a higher-level alternative.[/b]
[b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started.
A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side.
For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616).
@@ -112,17 +112,31 @@
</argument>
<description>
Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var fields = {"username": "user", "password": "pass"}
var query_string = http_client.query_string_from_dict(fields)
# Returns "username=user&amp;password=pass"
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } };
+ string queryString = new HTTPClient().QueryStringFromDict(fields);
+ // Returns "username=user&amp;password=pass"
+ [/csharp]
+ [/codeblocks]
Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]}
var query_string = http_client.query_string_from_dict(fields)
# Returns "single=123&amp;not_valued&amp;multiple=22&amp;multiple=33&amp;multiple=44"
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var fields = new Godot.Collections.Dictionary{{"single", 123}, {"notValued", null}, {"multiple", new Godot.Collections.Array{22, 33, 44}}};
+ string queryString = new HTTPClient().QueryStringFromDict(fields);
+ // Returns "single=123&amp;not_valued&amp;multiple=22&amp;multiple=33&amp;multiple=44"
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="read_response_body_chunk">
@@ -147,13 +161,21 @@
Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code].
Headers are HTTP request headers. For available HTTP methods, see [enum Method].
To create a POST request with query strings to push to the server, do:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var fields = {"username" : "user", "password" : "pass"}
var query_string = http_client.query_string_from_dict(fields)
var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())]
var result = http_client.request(http_client.METHOD_POST, "index.php", headers, query_string)
- [/codeblock]
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example.
+ [/gdscript]
+ [csharp]
+ var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } };
+ string queryString = new HTTPClient().QueryStringFromDict(fields);
+ string[] headers = {"Content-Type: application/x-www-form-urlencoded", "Content-Length: " + queryString.Length};
+ var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString);
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
</description>
</method>
<method name="request_raw">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 6eae881ffe..25667d8f79 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -7,7 +7,8 @@
A node with the ability to send HTTP requests. Uses [HTTPClient] internally.
Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP.
[b]Example of contacting a REST API and printing one of its returned fields:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
@@ -34,9 +35,48 @@
# Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
print(response.headers["User-Agent"])
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ // Create an HTTP request node and connect its completion signal.
+ var httpRequest = new HTTPRequest();
+ AddChild(httpRequest);
+ httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+
+ // Perform a GET request. The URL below returns JSON as of writing.
+ Error error = httpRequest.Request("https://httpbin.org/get");
+ if (error != Error.Ok)
+ {
+ GD.PushError("An error occurred in the HTTP request.");
+ }
+
+ // Perform a POST request. The URL below returns JSON as of writing.
+ // Note: Don't make simultaneous requests using a single HTTPRequest node.
+ // The snippet below is provided for reference only.
+ string[] body = { "name", "Godette" };
+ // GDScript to_json is non existent, so we use JSON.Print() here.
+ error = httpRequest.Request("https://httpbin.org/post", null, true, HTTPClient.Method.Post, JSON.Print(body));
+ if (error != Error.Ok)
+ {
+ GD.PushError("An error occurred in the HTTP request.");
+ }
+ }
+
+
+ // Called when the HTTP request is completed.
+ private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
+ {
+ // GDScript parse_json is non existent so we have to use JSON.parse, which has a slightly different syntax.
+ var response = JSON.Parse(body.GetStringFromUTF8()).Result as Godot.Collections.Dictionary;
+ // Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org).
+ GD.Print((response["headers"] as Godot.Collections.Dictionary)["User-Agent"]);
+ }
+ [/csharp]
+ [/codeblocks]
[b]Example of loading and displaying an image using HTTPRequest:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
# Create an HTTP request node and connect its completion signal.
var http_request = HTTPRequest.new()
@@ -51,6 +91,9 @@
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
+ if result != HTTPRequest.RESULT_SUCCESS:
+ push_error("Image couldn't be downloaded. Try a different image.")
+
var image = Image.new()
var error = image.load_png_from_buffer(body)
if error != OK:
@@ -63,7 +106,48 @@
var texture_rect = TextureRect.new()
add_child(texture_rect)
texture_rect.texture = texture
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ // Create an HTTP request node and connect its completion signal.
+ var httpRequest = new HTTPRequest();
+ AddChild(httpRequest);
+ httpRequest.Connect("request_completed", this, nameof(HttpRequestCompleted));
+
+ // Perform the HTTP request. The URL below returns a PNG image as of writing.
+ Error error = httpRequest.Request("https://via.placeholder.com/512");
+ if (error != Error.Ok)
+ {
+ GD.PushError("An error occurred in the HTTP request.");
+ }
+ }
+
+
+ // Called when the HTTP request is completed.
+ private void HttpRequestCompleted(int result, int response_code, string[] headers, byte[] body)
+ {
+ if (result != (int)HTTPRequest.Result.Success)
+ {
+ GD.PushError("Image couldn't be downloaded. Try a different image.");
+ }
+ var image = new Image();
+ Error error = image.LoadPngFromBuffer(body);
+ if (error != Error.Ok)
+ {
+ GD.PushError("Couldn't load the image.");
+ }
+
+ var texture = new ImageTexture();
+ texture.CreateFromImage(image);
+
+ // Display the image in a TextureRect node.
+ var textureRect = new TextureRect();
+ AddChild(textureRect);
+ textureRect.Texture = texture;
+ }
+ [/csharp]
+ [/codeblocks]
[b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes.
[b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header.
@@ -119,7 +203,7 @@
<description>
Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request].
Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host.
- [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example.
+ [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example.
</description>
</method>
<method name="request_raw">
@@ -145,7 +229,7 @@
<member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true">
If [code]true[/code], this header will be added to each request: [code]Accept-Encoding: gzip, deflate[/code] telling servers that it's okay to compress response bodies.
Any Response body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [code]request_completed[/code].
- If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regaurdless of [code]accept_gzip[/code].
+ If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regardless of [code]accept_gzip[/code].
If [code]false[/code] no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [code]request_completed[/code].
</member>
<member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1">
diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml
index f8152c813e..e020293d76 100644
--- a/doc/classes/HashingContext.xml
+++ b/doc/classes/HashingContext.xml
@@ -6,8 +6,9 @@
<description>
The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers).
The [enum HashType] enum shows the supported hashing algorithms.
- [codeblock]
- const CHUNK_SIZE = 1024
+ [codeblocks]
+ [gdscript]
+ const CHUNK_SIZE = 102
func hash_file(path):
var ctx = HashingContext.new()
@@ -26,7 +27,36 @@
var res = ctx.finish()
# Print the result as hex string and array.
printt(res.hex_encode(), Array(res))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public const int ChunkSize = 1024;
+
+ public void HashFile(string path)
+ {
+ var ctx = new HashingContext();
+ var file = new File();
+ // Start a SHA-256 context.
+ ctx.Start(HashingContext.HashType.Sha256);
+ // Check that file exists.
+ if (!file.FileExists(path))
+ {
+ return;
+ }
+ // Open the file to hash.
+ file.Open(path, File.ModeFlags.Read);
+ // Update the context after reading each chunk.
+ while (!file.EofReached())
+ {
+ ctx.Update(file.GetBuffer(ChunkSize));
+ }
+ // Get the computed hash.
+ byte[] res = ctx.Finish();
+ // Print the result as hex string and array.
+
+ GD.PrintT(res.HexEncode(), res);
+ }
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
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/IP.xml b/doc/classes/IP.xml
index 152f381a83..849f036bbd 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -31,7 +31,7 @@
<return type="Array">
</return>
<description>
- Returns all of the user's current IPv4 and IPv6 addresses as an array.
+ Returns all the user's current IPv4 and IPv6 addresses as an array.
</description>
</method>
<method name="get_local_interfaces" qualifiers="const">
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 3b108468de..9d87c9bf9a 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -4,12 +4,26 @@
Image datatype.
</brief_description>
<description>
- Native image datatype. Contains image data, which can be converted to a [Texture2D], and several functions to interact with it. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
- [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
+ Native image datatype. Contains image data which can be converted to an [ImageTexture] and provides commonly used [i]image processing[/i] methods. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
+ An [Image] cannot be assigned to a [code]texture[/code] property of an object directly (such as [Sprite2D]), and has to be converted manually to an [ImageTexture] first.
+ [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import.
</description>
<tutorials>
+ <link title="Importing images">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html</link>
</tutorials>
<methods>
+ <method name="adjust_bcs">
+ <return type="void">
+ </return>
+ <argument index="0" name="brightness" type="float">
+ </argument>
+ <argument index="1" name="contrast" type="float">
+ </argument>
+ <argument index="2" name="saturation" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="blend_rect">
<return type="void">
</return>
@@ -66,13 +80,13 @@
Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats.
</description>
</method>
- <method name="bumpmap_to_normalmap">
+ <method name="bump_map_to_normal_map">
<return type="void">
</return>
<argument index="0" name="bump_scale" type="float" default="1.0">
</argument>
<description>
- Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel.
+ Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel.
</description>
</method>
<method name="clear_mipmaps">
@@ -226,7 +240,7 @@
<argument index="0" name="renormalize" type="bool" default="false">
</argument>
<description>
- Generates mipmaps for the image. Mipmaps are pre-calculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0.
+ Generates mipmaps for the image. Mipmaps are precalculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0.
</description>
</method>
<method name="get_data" qualifiers="const">
@@ -267,16 +281,18 @@
<argument index="1" name="y" type="int">
</argument>
<description>
- Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2] argument.
+ Returns the color of the pixel at [code](x, y)[/code].
+ This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument.
</description>
</method>
<method name="get_pixelv" qualifiers="const">
<return type="Color">
</return>
- <argument index="0" name="src" type="Vector2">
+ <argument index="0" name="point" type="Vector2i">
</argument>
<description>
- Returns the color of the pixel at [code]src[/code]. This is the same as [method get_pixel], but with a [Vector2] argument instead of two integer arguments.
+ Returns the color of the pixel at [code]point[/code].
+ This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments.
</description>
</method>
<method name="get_rect" qualifiers="const">
@@ -344,6 +360,8 @@
</argument>
<description>
Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations.
+ [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects.
+ See also [ImageTexture] description for usage examples.
</description>
</method>
<method name="load_bmp_from_buffer">
@@ -392,11 +410,11 @@
Loads an image from the binary contents of a WebP file.
</description>
</method>
- <method name="normalmap_to_xy">
+ <method name="normal_map_to_xy">
<return type="void">
</return>
<description>
- Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normalmap. A normalmap can add lots of detail to a 3D surface without increasing the polygon count.
+ Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count.
</description>
</method>
<method name="premultiply_alpha">
@@ -416,7 +434,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">
@@ -424,8 +442,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">
@@ -471,28 +491,56 @@
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](x, y)[/code]. Example:
- [codeblock]
+ Sets the [Color] of the pixel at [code](x, y)[/code] to [code]color[/code]. Example:
+ [codeblocks]
+ [gdscript]
+ var img_width = 10
+ var img_height = 5
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.set_pixel(x, y, color)
- [/codeblock]
+
+ img.set_pixel(1, 2, Color.red) # Sets the color at (1, 2) to red.
+ [/gdscript]
+ [csharp]
+ int imgWidth = 10;
+ int imgHeight = 5;
+ var img = new Image();
+ img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
+
+ img.SetPixel(1, 2, Colors.Red); // Sets the color at (1, 2) to red.
+ [/csharp]
+ [/codeblocks]
+ This is the same as [method set_pixelv], but with a two integer arguments instead of a [Vector2i] argument.
</description>
</method>
<method name="set_pixelv">
<return type="void">
</return>
- <argument index="0" name="dst" type="Vector2">
+ <argument index="0" name="point" type="Vector2i">
</argument>
<argument index="1" name="color" type="Color">
</argument>
<description>
- Sets the [Color] of the pixel at [code](dst.x, dst.y)[/code]. Note that the [code]dst[/code] values must be integers. Example:
- [codeblock]
+ Sets the [Color] of the pixel at [code]point[/code] to [code]color[/code]. Example:
+ [codeblocks]
+ [gdscript]
+ var img_width = 10
+ var img_height = 5
var img = Image.new()
img.create(img_width, img_height, false, Image.FORMAT_RGBA8)
- img.set_pixelv(Vector2(x, y), color)
- [/codeblock]
+
+ img.set_pixelv(Vector2i(1, 2), Color.red) # Sets the color at (1, 2) to red.
+ [/gdscript]
+ [csharp]
+ int imgWidth = 10;
+ int imgHeight = 5;
+ var img = new Image();
+ img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
+
+ img.SetPixelv(new Vector2i(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
+ [/csharp]
+ [/codeblocks]
+ This is the same as [method set_pixel], but with a [Vector2i] argument instead of two integer arguments.
</description>
</method>
<method name="shrink_x2">
@@ -512,7 +560,7 @@
</methods>
<members>
<member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{&quot;data&quot;: PackedByteArray( ),&quot;format&quot;: &quot;Lum8&quot;,&quot;height&quot;: 0,&quot;mipmaps&quot;: false,&quot;width&quot;: 0}">
- Holds all of the image's color data in a given format. See [enum Format] constants.
+ Holds all the image's color data in a given format. See [enum Format] constants.
</member>
</members>
<constants>
@@ -602,18 +650,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.
@@ -680,18 +729,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>
- <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode">
- Use PVRTC4 compression.
+ <constant name="COMPRESS_PVRTC1_4" value="1" enum="CompressMode">
+ Use PVRTC1 4-bpp 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/ImageTexture.xml b/doc/classes/ImageTexture.xml
index d122d74e85..5fef56e354 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -4,10 +4,31 @@
A [Texture2D] based on an [Image].
</brief_description>
<description>
- A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
- [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images will fail to import.
+ A [Texture2D] based on an [Image]. For an image to be displayed, an [ImageTexture] has to be created from it using the [method create_from_image] method:
+ [codeblock]
+ var texture = ImageTexture.new()
+ var image = Image.new()
+ image.load("res://icon.png")
+ texture.create_from_image(image)
+ $Sprite2D.texture = texture
+ [/codeblock]
+ This way, textures can be created at run-time by loading images both from within the editor and externally.
+ [b]Warning:[/b] Prefer to load imported textures with [method @GDScript.load] over loading them from within the filesystem dynamically with [method Image.load], as it may not work in exported projects:
+ [codeblock]
+ var texture = load("res://icon.png")
+ $Sprite2D.texture = texture
+ [/codeblock]
+ This is because images have to be imported as a [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method.
+ [b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image:
+ [codeblock]
+ var texture = load("res://icon.png")
+ var image : Image = texture.get_image()
+ [/codeblock]
+ An [ImageTexture] is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new [EditorImportPlugin].
+ [b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations.
</description>
<tutorials>
+ <link title="Importing images">https://docs.godotengine.org/en/latest/tutorials/assets_pipeline/importing_images.html</link>
</tutorials>
<methods>
<method name="create_from_image">
@@ -16,14 +37,14 @@
<argument index="0" name="image" type="Image">
</argument>
<description>
- Create a new [ImageTexture] from an [Image].
+ Initializes the texture by allocating and setting the data from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the format of the [ImageTexture], one of [enum Image.Format].
+ Returns the format of the texture, one of [enum Image.Format].
</description>
</method>
<method name="set_size_override">
@@ -32,7 +53,7 @@
<argument index="0" name="size" type="Vector2">
</argument>
<description>
- Resizes the [ImageTexture] to the specified dimensions.
+ Resizes the texture to the specified dimensions.
</description>
</method>
<method name="update">
@@ -43,7 +64,9 @@
<argument index="1" name="immediate" type="bool" default="false">
</argument>
<description>
- Replaces the texture's data with a new [code]image[/code]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call.
+ Replaces the texture's data with a new [Image]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call.
+ [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method.
+ Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
</description>
</method>
</methods>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index fb0ed8ff62..d7408cd0ff 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -49,20 +49,45 @@
<return type="Vector3">
</return>
<description>
- Returns the acceleration of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
+ Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer.
[b]Note:[/b] This method only works on iOS, Android, and UWP. On other platforms, it always returns [constant Vector3.ZERO].
</description>
</method>
+ <method name="get_action_raw_strength" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="action" type="StringName">
+ </argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
+ <description>
+ Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead.
+ </description>
+ </method>
<method name="get_action_strength" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1.
</description>
</method>
+ <method name="get_axis" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="negative_action" type="StringName">
+ </argument>
+ <argument index="1" name="positive_action" type="StringName">
+ </argument>
+ <description>
+ Get axis input by specifying two actions, one negative and one positive.
+ This is a shorthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code].
+ </description>
+ </method>
<method name="get_connected_joypads">
<return type="Array">
</return>
@@ -81,7 +106,7 @@
<return type="Vector3">
</return>
<description>
- Returns the gravity of the device's accelerometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
+ Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
[b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO].
</description>
</method>
@@ -89,8 +114,8 @@
<return type="Vector3">
</return>
<description>
- Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
- [b]Note:[/b] This method only works on Android. On other platforms, it always returns [constant Vector3.ZERO].
+ Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
+ [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO].
</description>
</method>
<method name="get_joy_axis" qualifiers="const">
@@ -101,43 +126,7 @@
<argument index="1" name="axis" type="int">
</argument>
<description>
- Returns the current value of the joypad axis at given index (see [enum JoyAxisList]).
- </description>
- </method>
- <method name="get_joy_axis_index_from_string">
- <return type="int">
- </return>
- <argument index="0" name="axis" type="String">
- </argument>
- <description>
- Returns the index of the provided axis name.
- </description>
- </method>
- <method name="get_joy_axis_string">
- <return type="String">
- </return>
- <argument index="0" name="axis_index" type="int">
- </argument>
- <description>
- Receives a [enum JoyAxisList] axis and returns its equivalent name as a string.
- </description>
- </method>
- <method name="get_joy_button_index_from_string">
- <return type="int">
- </return>
- <argument index="0" name="button" type="String">
- </argument>
- <description>
- Returns the index of the provided button name.
- </description>
- </method>
- <method name="get_joy_button_string">
- <return type="String">
- </return>
- <argument index="0" name="button_index" type="int">
- </argument>
- <description>
- Receives a gamepad button from [enum JoyButtonList] and returns its equivalent name as a string.
+ Returns the current value of the joypad axis at given index (see [enum JoyAxis]).
</description>
</method>
<method name="get_joy_guid" qualifiers="const">
@@ -187,8 +176,8 @@
<return type="Vector3">
</return>
<description>
- Returns the the magnetic field strength in micro-Tesla for all axes of the device's magnetometer, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
- [b]Note:[/b] This method only works on Android and UWP. On other platforms, it always returns [constant Vector3.ZERO].
+ Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO].
+ [b]Note:[/b] This method only works on Android, iOS and UWP. On other platforms, it always returns [constant Vector3.ZERO].
</description>
</method>
<method name="get_mouse_button_mask" qualifiers="const">
@@ -205,11 +194,32 @@
Returns the mouse mode. See the constants for more information.
</description>
</method>
+ <method name="get_vector" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="negative_x" type="StringName">
+ </argument>
+ <argument index="1" name="positive_x" type="StringName">
+ </argument>
+ <argument index="2" name="negative_y" type="StringName">
+ </argument>
+ <argument index="3" name="positive_y" type="StringName">
+ </argument>
+ <argument index="4" name="deadzone" type="float" default="-1.0">
+ </argument>
+ <description>
+ Get vector input by specifying four actions, two for the X axis and two for the Y axis, negative and positive.
+ This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement.
+ By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1).
+ </description>
+ </method>
<method name="is_action_just_pressed" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button.
This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.
@@ -220,6 +230,8 @@
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button.
</description>
@@ -229,6 +241,8 @@
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.
</description>
@@ -241,7 +255,7 @@
<argument index="1" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButtonList]).
+ Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]).
</description>
</method>
<method name="is_joy_known">
@@ -259,7 +273,7 @@
<argument index="0" name="keycode" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum KeyList] constant.
+ Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant.
</description>
</method>
<method name="is_mouse_button_pressed" qualifiers="const">
@@ -268,7 +282,7 @@
<argument index="0" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList].
+ Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton].
</description>
</method>
<method name="joy_connection_changed">
@@ -295,12 +309,20 @@
<description>
Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.
Example:
- [codeblock]
- var a = InputEventAction.new()
- a.action = "ui_cancel"
- a.pressed = true
- Input.parse_input_event(a)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var cancel_event = InputEventAction.new()
+ cancel_event.action = "ui_cancel"
+ cancel_event.pressed = true
+ Input.parse_input_event(cancel_event)
+ [/gdscript]
+ [csharp]
+ var cancelEvent = new InputEventAction();
+ cancelEvent.Action = "ui_cancel";
+ cancelEvent.Pressed = true;
+ Input.ParseInputEvent(cancelEvent);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="remove_joy_mapping">
@@ -391,7 +413,7 @@
</argument>
<description>
Vibrate Android and iOS devices.
- [b]Note:[/b] It needs VIBRATE permission for Android at export settings. iOS does not support duration.
+ [b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export settings. iOS does not support duration.
</description>
</method>
<method name="warp_mouse_position">
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 8c6063bd67..28c4773f51 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -35,6 +35,8 @@
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion].
</description>
@@ -44,6 +46,8 @@
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] if this input event matches a pre-defined action of any type.
</description>
@@ -55,6 +59,8 @@
</argument>
<argument index="1" name="allow_echo" type="bool" default="false">
</argument>
+ <argument index="2" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
</description>
@@ -64,6 +70,8 @@
</return>
<argument index="0" name="action" type="StringName">
</argument>
+ <argument index="1" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
</description>
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index 1fe85a5ae8..ed290fc7e2 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -21,7 +21,7 @@
If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released.
</member>
<member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
- The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed.
+ The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed.
</member>
</members>
<constants>
diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml
index 6ab4942f85..b1f4836f6e 100644
--- a/doc/classes/InputEventJoypadButton.xml
+++ b/doc/classes/InputEventJoypadButton.xml
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
- Button identifier. One of the [enum JoyButtonList] button constants.
+ Button identifier. One of the [enum JoyButton] button constants.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released.
diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml
index 2d7787b568..39fdb14016 100644
--- a/doc/classes/InputEventJoypadMotion.xml
+++ b/doc/classes/InputEventJoypadMotion.xml
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="axis" type="int" setter="set_axis" getter="get_axis" default="0">
- Axis identifier. Use one of the [enum JoyAxisList] axis constants.
+ Axis identifier. Use one of the [enum JoyAxis] axis constants.
</member>
<member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0">
Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position.
diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml
index fe91b9c13e..9f2b829823 100644
--- a/doc/classes/InputEventKey.xml
+++ b/doc/classes/InputEventKey.xml
@@ -32,11 +32,11 @@
If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down.
</member>
<member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0">
- The key keycode, which corresponds to one of the [enum KeyList] constants. Represent key in the current keyboard layout.
+ The key keycode, which corresponds to one of the [enum Key] constants. Represent key in the current keyboard layout.
To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
</member>
<member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0">
- Key physical keycode, which corresponds to one of the [enum KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
+ Key physical keycode, which corresponds to one of the [enum Key] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey].
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml
index 31e82bbaed..e54c3224da 100644
--- a/doc/classes/InputEventMouse.xml
+++ b/doc/classes/InputEventMouse.xml
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0">
- The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks.
+ The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks.
</member>
<member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2( 0, 0 )">
The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0.
diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml
index d7b64a9a2d..d7e92f8bca 100644
--- a/doc/classes/InputEventMouseButton.xml
+++ b/doc/classes/InputEventMouseButton.xml
@@ -13,7 +13,7 @@
</methods>
<members>
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0">
- The mouse button identifier, one of the [enum ButtonList] button or button wheel constants.
+ The mouse button identifier, one of the [enum MouseButton] button or button wheel constants.
</member>
<member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" default="false">
If [code]true[/code], the mouse button's state is a double-click.
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 667879a922..dd782209e5 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -27,6 +27,10 @@
<member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false">
State of the [kbd]Shift[/kbd] modifier.
</member>
+ <member name="store_command" type="bool" setter="set_store_command" getter="is_storing_command" default="true">
+ If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command]. If [code]false[/code], those same keys will be serialized as [member meta] on macOS and [member control] on all other platforms.
+ This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.
+ </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml
index 062ac3869d..0fb18d8e81 100644
--- a/doc/classes/InputMap.xml
+++ b/doc/classes/InputMap.xml
@@ -100,6 +100,8 @@
</argument>
<argument index="1" name="action" type="StringName">
</argument>
+ <argument index="2" name="exact_match" type="bool" default="false">
+ </argument>
<description>
Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior.
</description>
@@ -120,7 +122,7 @@
Returns [code]true[/code] if the [InputMap] has a registered action with the given name.
</description>
</method>
- <method name="load_from_globals">
+ <method name="load_from_project_settings">
<return type="void">
</return>
<description>
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 25420bd77b..0020cbf242 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -12,18 +12,18 @@
</tutorials>
<methods>
<method name="add_icon_item">
- <return type="void">
+ <return type="int">
</return>
<argument index="0" name="icon" type="Texture2D">
</argument>
<argument index="1" name="selectable" type="bool" default="true">
</argument>
<description>
- Adds an item to the item list with no text, only an icon.
+ Adds an item to the item list with no text, only an icon. Returns the index of an added item.
</description>
</method>
<method name="add_item">
- <return type="void">
+ <return type="int">
</return>
<argument index="0" name="text" type="String">
</argument>
@@ -32,7 +32,8 @@
<argument index="2" name="selectable" type="bool" default="true">
</argument>
<description>
- Adds an item to the item list with specified text. Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon.
+ Adds an item to the item list with specified text. Returns the index of an added item.
+ Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon.
If selectable is [code]true[/code], the list item will be selectable.
</description>
</method>
@@ -43,6 +44,31 @@
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="deselect">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Ensures the item associated with the specified index is not selected.
+ </description>
+ </method>
+ <method name="deselect_all">
+ <return type="void">
+ </return>
+ <description>
+ Ensures there are no items selected.
+ </description>
+ </method>
<method name="ensure_current_is_visible">
<return type="void">
</return>
@@ -114,6 +140,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 +158,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 +178,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>
@@ -248,10 +303,6 @@
</argument>
<description>
Sets the background color of the item specified by [code]idx[/code] index to the specified [Color].
- [codeblock]
- var some_string = "Some text"
- some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.
- [/codeblock]
</description>
</method>
<method name="set_item_custom_fg_color">
@@ -263,10 +314,6 @@
</argument>
<description>
Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color].
- [codeblock]
- var some_string = "Some text"
- some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red.
- [/codeblock]
</description>
</method>
<method name="set_item_disabled">
@@ -325,6 +372,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>
@@ -336,6 +394,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>
@@ -358,6 +429,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>
@@ -387,22 +469,6 @@
Sorts items in the list by their text.
</description>
</method>
- <method name="unselect">
- <return type="void">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Ensures the item associated with the specified index is not selected.
- </description>
- </method>
- <method name="unselect_all">
- <return type="void">
- </return>
- <description>
- Ensures there are no items selected.
- </description>
- </method>
</methods>
<members>
<member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false">
@@ -530,9 +596,15 @@
<theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the item.
+ </theme_item>
+ <theme_item name="font_selected_color" 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>
@@ -545,6 +617,9 @@
<theme_item name="line_separation" type="int" default="2">
The vertical spacing between each line of text.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the item text outline.
+ </theme_item>
<theme_item name="selected" type="StyleBox">
[StyleBox] for the selected items, used when the [ItemList] is not being focused.
</theme_item>
diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml
index 4dbceb35e9..bc94f74b07 100644
--- a/doc/classes/JSONParseResult.xml
+++ b/doc/classes/JSONParseResult.xml
@@ -21,16 +21,29 @@
The error message if the JSON source was not successfully parsed. See the [enum Error] constants.
</member>
<member name="result" type="Variant" setter="set_result" getter="get_result">
- A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
+ A [Variant] containing the parsed JSON. Use [method @GlobalScope.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with brackets ([code][][/code]), an [Array] will be returned.
[b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, parsing a JSON text will convert all numerical values to [float] types.
[b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var p = JSON.parse('["hello", "world", "!"]')
if typeof(p.result) == TYPE_ARRAY:
print(p.result[0]) # Prints "hello"
else:
push_error("Unexpected results.")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ JSONParseResult p = JSON.Parse("[\"hello\"], \"world\", \"!\"]");
+ if (p.Result is Godot.Collections.Array)
+ {
+ GD.Print((p.Result as Godot.Collections.Array)[0]); // Prints "hello"
+ }
+ else
+ {
+ GD.PushError("Unexpected results.");
+ }
+ [/csharp]
+ [/codeblocks]
</member>
</members>
<constants>
diff --git a/doc/classes/JSONParser.xml b/doc/classes/JSONParser.xml
new file mode 100644
index 0000000000..31ba295418
--- /dev/null
+++ b/doc/classes/JSONParser.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="JSONParser" inherits="Reference" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="decode_data">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="data" type="Variant">
+ </argument>
+ <argument index="1" name="indent" type="String" default="&quot;&quot;">
+ </argument>
+ <argument index="2" name="sort_keys" type="bool" default="true">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_line" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_error_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_string" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="parse_string">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="json_string" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
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/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 425df00b6f..fdd4db6115 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -37,11 +37,20 @@
<description>
Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
[b]Example usage:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
for i in get_slide_count():
var collision = get_slide_collision(i)
print("Collided with: ", collision.collider.name)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ for (int i = 0; i &lt; GetSlideCount(); i++)
+ {
+ KinematicCollision2D collision = GetSlideCollision(i);
+ GD.Print("Collided with: ", (collision.Collider as Node).Name);
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_slide_count" qualifiers="const">
@@ -153,7 +162,10 @@
</methods>
<members>
<member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08">
- If the body is at least this close to another body, this body will consider them to be colliding.
+ Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
</member>
<member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false">
If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions.
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
index a21496de54..efd3f58f88 100644
--- a/doc/classes/KinematicBody3D.xml
+++ b/doc/classes/KinematicBody3D.xml
@@ -177,7 +177,10 @@
Lock the body's Z axis movement.
</member>
<member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001">
- If the body is at least this close to another body, this body will consider them to be colliding.
+ Extra margin used for collision recovery in motion functions (see [method move_and_collide], [method move_and_slide], [method move_and_slide_with_snap]).
+ If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.
+ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.
+ A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies.
</member>
</members>
<constants>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 570d7f075b..76b9686393 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 the 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.
@@ -107,11 +150,14 @@
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
Default text [Color] of the [Label].
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of [Font]'s outline.
+ </theme_item>
+ <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
[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].
+ <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/Light3D.xml b/doc/classes/Light3D.xml
index 6c008e4f7e..6bae612c9f 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -58,7 +58,7 @@
If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows.
</member>
<member name="light_projector" type="Texture2D" setter="set_projector" getter="get_projector">
- [Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained glass.
+ [Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass.
</member>
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent.
@@ -78,7 +78,7 @@
<member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false">
If [code]true[/code], the light will cast shadows.
</member>
- <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="1.0">
+ <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1">
</member>
<member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0">
Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible.
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 5c2dffd538..360f5c451e 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>
@@ -103,12 +120,20 @@
</argument>
<description>
Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end.
- [codeblock]
+ [codeblocks]
+ [gdscript]
text = "Welcome"
select() # Will select "Welcome".
select(4) # Will select "ome".
select(2, 5) # Will select "lco".
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Text = "Welcome";
+ Select(); // Will select "Welcome".
+ Select(4); // Will select "ome".
+ Select(2, 5); // Will select "lco".
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="select_all">
@@ -118,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">
@@ -131,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>
@@ -140,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>
@@ -147,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>
@@ -172,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>
@@ -212,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.
@@ -236,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>
@@ -262,18 +380,27 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default font color.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [LineEdit].
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
Font color for selected text (inside the selection rectangle).
</theme_item>
- <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_size" type="int">
+ Font size of the [LineEdit]'s text.
+ </theme_item>
+ <theme_item name="font_uneditable_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
Font color when editing is disabled.
</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 name="minimum_character_width" type="int" default="4">
+ Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling).
</theme_item>
<theme_item name="normal" type="StyleBox">
Default background for the [LineEdit].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]).
</theme_item>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 15307de897..6e2f4399b3 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>
@@ -41,12 +81,21 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [LinkButton].
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [LinkButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [LinkButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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="outline_size" type="int" default="0">
+ The size of the text outline.
+ </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..537ecf2b2b 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -19,7 +19,7 @@
print("Initialized:")
print(" Starting time: %s" % str(time_elapsed))
- func _idle(delta):
+ func _process(delta):
time_elapsed += delta
# Return true to end the main loop.
return quit
@@ -51,30 +51,30 @@
Called before the program exits.
</description>
</method>
- <method name="_idle" qualifiers="virtual">
- <return type="bool">
+ <method name="_initialize" qualifiers="virtual">
+ <return type="void">
</return>
- <argument index="0" name="delta" type="float">
- </argument>
<description>
- Called each idle frame with the time since the last idle frame as argument (in seconds). Equivalent to [method Node._process].
- If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
+ Called once during initialization.
</description>
</method>
- <method name="_initialize" qualifiers="virtual">
- <return type="void">
+ <method name="_physics_process" qualifiers="virtual">
+ <return type="bool">
</return>
+ <argument index="0" name="delta" type="float">
+ </argument>
<description>
- Called once during initialization.
+ Called each physics frame with the time since the last physics frame as argument ([code]delta[/code], in seconds). Equivalent to [method Node._physics_process].
+ If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
- <method name="_iteration" qualifiers="virtual">
+ <method name="_process" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="delta" type="float">
</argument>
<description>
- Called each physics frame with the time since the last physics frame as argument (in seconds). Equivalent to [method Node._physics_process].
+ Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process].
If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame.
</description>
</method>
@@ -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/MarginContainer.xml b/doc/classes/MarginContainer.xml
index fb5f437239..a51632d5f1 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -5,14 +5,25 @@
</brief_description>
<description>
Adds a top, left, bottom, and right margin to all [Control] nodes that are direct children of the container. To control the [MarginContainer]'s margin, use the [code]margin_*[/code] theme properties listed below.
- [b]Note:[/b] Be careful, [Control] margin values are different than the constant margin values. If you want to change the custom margin values of the [MarginContainer] by code, you should use the following examples:
- [codeblock]
+ [b]Note:[/b] Be careful, [Control] margin values are different from the constant margin values. If you want to change the custom margin values of the [MarginContainer] by code, you should use the following examples:
+ [codeblocks]
+ [gdscript]
+ # This code sample assumes the current script is extending MarginContainer.
var margin_value = 100
- set("custom_constants/margin_top", margin_value)
- set("custom_constants/margin_left", margin_value)
- set("custom_constants/margin_bottom", margin_value)
- set("custom_constants/margin_right", margin_value)
- [/codeblock]
+ add_theme_constant_override("margin_top", margin_value)
+ add_theme_constant_override("margin_left", margin_value)
+ add_theme_constant_override("margin_bottom", margin_value)
+ add_theme_constant_override("margin_right", margin_value)
+ [/gdscript]
+ [csharp]
+ // This code sample assumes the current script is extending MarginContainer.
+ int marginValue = 100;
+ AddThemeConstantOverride("margin_top", marginValue);
+ AddThemeConstantOverride("margin_left", marginValue);
+ AddThemeConstantOverride("margin_bottom", marginValue);
+ AddThemeConstantOverride("margin_right", marginValue);
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index 10a7061bef..0d287a5d1d 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -11,6 +11,12 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
+ <method name="inspect_native_shader_code">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index fe38c08280..7cbf9d3dfe 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Special button that brings up a [PopupMenu] when clicked.
- New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties.
+ New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each item new properties.
See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
@@ -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>
@@ -58,15 +59,21 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [MenuButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 1, 1, 1, 0.3 )">
Text [Color] used when the [MenuButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [MenuButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [MenuButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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>
@@ -76,6 +83,9 @@
<theme_item name="normal" type="StyleBox">
Default [StyleBox] for the [MenuButton].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="pressed" type="StyleBox">
[StyleBox] used when the [MenuButton] is being pressed.
</theme_item>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 78db09feee..ed7c39d4d9 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="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode">
- Blend shapes are relative to base weight.
+ <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="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,51 @@
<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 name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat">
</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 name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COMPRESS_NORMAL" value="1024" enum="ArrayFormat">
- Flag used to mark a compressed (half float) normal array.
+ <constant name="ARRAY_FORMAT_CUSTOM2" value="256" 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_CUSTOM3" value="512" 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_BONES" value="1024" enum="ArrayFormat">
+ Mesh array contains bones.
</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_WEIGHTS" value="2048" enum="ArrayFormat">
+ Mesh array contains bone weights.
</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_INDEX" value="4096" enum="ArrayFormat">
+ Mesh array uses indices.
</constant>
- <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat">
- Flag used to mark a compressed index array.
+ <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="2147475463" enum="ArrayFormat">
</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_CUSTOM_BASE" value="13" 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_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_VERTEX" value="0" enum="ArrayType">
- Array of vertices.
+ <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_NORMAL" value="1" enum="ArrayType">
- Array of normals.
+ <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" 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_CUSTOM3_SHIFT" value="22" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_COLOR" value="3" enum="ArrayType">
- Array of colors.
+ <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType">
- Array of UV coordinates.
+ <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType">
- Array of second set of UV coordinates.
+ <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_BONES" value="6" enum="ArrayType">
- Array of bone data.
+ <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_WEIGHTS" value="7" enum="ArrayType">
- Array of weights.
+ <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat">
</constant>
- <constant name="ARRAY_INDEX" value="8" enum="ArrayType">
- Array of indices.
+ <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode">
+ Blend shapes are normalized.
</constant>
- <constant name="ARRAY_MAX" value="9" enum="ArrayType">
- Represents the size of the [enum ArrayType] enum.
+ <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/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/MultiMesh.xml b/doc/classes/MultiMesh.xml
index 6ebfc946dc..2adebdb306 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -6,7 +6,7 @@
<description>
MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually.
MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead.
- As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object).
+ As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object).
Since instances may have any behavior, the AABB used for visibility must be provided by the user.
</description>
<tutorials>
diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml
index 9c753818d9..c168695d61 100644
--- a/doc/classes/MultiplayerAPI.xml
+++ b/doc/classes/MultiplayerAPI.xml
@@ -4,9 +4,10 @@
High-level multiplayer API.
</brief_description>
<description>
- This class implements most of the logic behind the high-level multiplayer API.
+ This class implements most of the logic behind the high-level multiplayer API. See also [NetworkedMultiplayerPeer].
By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene.
It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene.
+ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
</description>
<tutorials>
</tutorials>
@@ -75,16 +76,6 @@
Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers.
</description>
</method>
- <method name="set_root_node">
- <return type="void">
- </return>
- <argument index="0" name="node" type="Node">
- </argument>
- <description>
- Sets the base root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
- This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
- </description>
- </method>
</methods>
<members>
<member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false">
@@ -97,6 +88,10 @@
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections.
</member>
+ <member name="root_node" type="Node" setter="set_root_node" getter="get_root_node">
+ The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.
+ This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene.
+ </member>
</members>
<signals>
<signal name="connected_to_server">
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
deleted file mode 100644
index abac29bdb7..0000000000
--- a/doc/classes/Navigation2D.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation2D" inherits="Node2D" version="4.0">
- <brief_description>
- 2D navigation and pathfinding node.
- </brief_description>
- <description>
- Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes.
- </description>
- <tutorials>
- <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
- </tutorials>
- <methods>
- <method name="get_closest_point" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="to_point" type="Vector2">
- </argument>
- <description>
- Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
- </description>
- </method>
- <method name="get_closest_point_owner" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="to_point" type="Vector2">
- </argument>
- <description>
- Returns the owner region RID for the point returned by [method get_closest_point].
- </description>
- </method>
- <method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_simple_path" qualifiers="const">
- <return type="PackedVector2Array">
- </return>
- <argument index="0" name="start" type="Vector2">
- </argument>
- <argument index="1" name="end" type="Vector2">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.
- </description>
- </method>
- </methods>
- <members>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0">
- </member>
- <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0">
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml
deleted file mode 100644
index e7a4fe3c43..0000000000
--- a/doc/classes/Navigation3D.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Navigation3D" inherits="Node3D" version="4.0">
- <brief_description>
- Mesh-based navigation and pathfinding node.
- </brief_description>
- <description>
- Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
- </description>
- <tutorials>
- <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link>
- </tutorials>
- <methods>
- <method name="get_closest_point" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
- </description>
- </method>
- <method name="get_closest_point_normal" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the normal for the point returned by [method get_closest_point].
- </description>
- </method>
- <method name="get_closest_point_owner" qualifiers="const">
- <return type="RID">
- </return>
- <argument index="0" name="to_point" type="Vector3">
- </argument>
- <description>
- Returns the owner region RID for the point returned by [method get_closest_point].
- </description>
- </method>
- <method name="get_closest_point_to_segment" qualifiers="const">
- <return type="Vector3">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="use_collision" type="bool" default="false">
- </argument>
- <description>
- Returns the closest point between the navigation surface and the segment.
- </description>
- </method>
- <method name="get_rid" qualifiers="const">
- <return type="RID">
- </return>
- <description>
- </description>
- </method>
- <method name="get_simple_path" qualifiers="const">
- <return type="PackedVector3Array">
- </return>
- <argument index="0" name="start" type="Vector3">
- </argument>
- <argument index="1" name="end" type="Vector3">
- </argument>
- <argument index="2" name="optimize" type="bool" default="true">
- </argument>
- <description>
- Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.
- </description>
- </method>
- </methods>
- <members>
- <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
- </member>
- <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0">
- </member>
- <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )">
- Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction.
- </member>
- </members>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 5a9c31ef67..1060e2de41 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -4,7 +4,7 @@
2D Agent used in navigation for collision avoidance.
</brief_description>
<description>
- 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationAgent2D] is physics safe.
+ 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe.
</description>
<tutorials>
</tutorials>
@@ -37,13 +37,6 @@
Returns which index the agent is currently on in the navigation path's [PackedVector2Array].
</description>
</method>
- <method name="get_navigation" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Returns the [Navigation2D] node that the agent is using for its navigation system.
- </description>
- </method>
<method name="get_next_location">
<return type="Vector2">
</return>
@@ -79,15 +72,6 @@
Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
- <method name="set_navigation">
- <return type="void">
- </return>
- <argument index="0" name="navigation" type="Node">
- </argument>
- <description>
- Sets the [Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation2D] node.
- </description>
- </method>
<method name="set_target_location">
<return type="void">
</return>
@@ -127,7 +111,7 @@
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
- The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
+ The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
</members>
<signals>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index f9df1d390b..00e9db0a33 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -4,7 +4,7 @@
3D Agent used in navigation for collision avoidance.
</brief_description>
<description>
- 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. This can be done by having the agent as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationAgent3D] is physics safe.
+ 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe.
</description>
<tutorials>
</tutorials>
@@ -37,13 +37,6 @@
Returns which index the agent is currently on in the navigation path's [PackedVector3Array].
</description>
</method>
- <method name="get_navigation" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Returns the [Navigation3D] node that the agent is using for its navigation system.
- </description>
- </method>
<method name="get_next_location">
<return type="Vector3">
</return>
@@ -79,15 +72,6 @@
Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
- <method name="set_navigation">
- <return type="void">
- </return>
- <argument index="0" name="navigation" type="Node">
- </argument>
- <description>
- Sets the [Navigation3D] node used by the agent. Useful when you don't want to make the agent a child of a [Navigation3D] node.
- </description>
- </method>
<method name="set_target_location">
<return type="void">
</return>
@@ -133,7 +117,7 @@
The distance threshold before a target is considered to be reached. This will allow an agent to not have to hit a point on the path exactly, but in the area.
</member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
- The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithim, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
+ The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
</members>
<signals>
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index dd7464ac0e..871c92798a 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -79,6 +79,7 @@
</methods>
<members>
<member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0">
+ The minimum Y space needed for navigation to be generated.
</member>
<member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9">
The maximum height difference between two areas for navigation to be generated between them.
@@ -87,8 +88,10 @@
The maximum angle a slope can be at for navigation to be generated on it.
</member>
<member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6">
+ Determines where the edge of a navigation mesh is. This way an agent will not overlap with another mesh or stand over nothing.
</member>
<member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2">
+ The height of a cell.
</member>
<member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3">
The size of cells in the [NavigationMesh].
@@ -111,7 +114,7 @@
The physics layers used to generate the [NavigationMesh].
</member>
<member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0">
- What kind of geomerty is used to generate the [NavigationMesh].
+ What kind of geometry is used to generate the [NavigationMesh].
</member>
<member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0">
Which geometry is used to generate the [NavigationMesh].
diff --git a/doc/classes/NavigationObstacle2D.xml b/doc/classes/NavigationObstacle2D.xml
index ddd96975f1..2e94eb0bba 100644
--- a/doc/classes/NavigationObstacle2D.xml
+++ b/doc/classes/NavigationObstacle2D.xml
@@ -4,27 +4,11 @@
2D Obstacle used in navigation for collision avoidance.
</brief_description>
<description>
- 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation2D] node, or using [method set_navigation]. [NavigationObstacle2D] is physics safe.
+ 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle2D] is physics safe.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_navigation" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Returns the [Navigation2D] node that the obstacle is using for its navigation system.
- </description>
- </method>
- <method name="set_navigation">
- <return type="void">
- </return>
- <argument index="0" name="navigation" type="Node">
- </argument>
- <description>
- Sets the [Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation2D] node.
- </description>
- </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/NavigationObstacle3D.xml b/doc/classes/NavigationObstacle3D.xml
index e01a40ed73..d7454a7bea 100644
--- a/doc/classes/NavigationObstacle3D.xml
+++ b/doc/classes/NavigationObstacle3D.xml
@@ -4,27 +4,11 @@
3D Obstacle used in navigation for collision avoidance.
</brief_description>
<description>
- 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. This can be done by having the obstacle as a child of a [Navigation3D] node, or using [method set_navigation]. [NavigationObstacle3D] is physics safe.
+ 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. [NavigationObstacle3D] is physics safe.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="get_navigation" qualifiers="const">
- <return type="Node">
- </return>
- <description>
- Returns the [Navigation3D] node that the obstacle is using for its navigation system.
- </description>
- </method>
- <method name="set_navigation">
- <return type="void">
- </return>
- <argument index="0" name="navigation" type="Node">
- </argument>
- <description>
- Sets the [Navigation3D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [Navigation3D] node.
- </description>
- </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index e75efa3b27..38921078d7 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -6,22 +6,41 @@
<description>
There are two ways to create polygons. Either by using the [method add_outline] method, or using the [method add_polygon] method.
Using [method add_outline]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var polygon = NavigationPolygon.new()
var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
$NavigationRegion2D.navpoly = polygon
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var polygon = new NavigationPolygon();
+ var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
+ polygon.AddOutline(outline);
+ polygon.MakePolygonsFromOutlines();
+ GetNode&lt;NavigationRegion2D&gt;("NavigationRegion2D").Navpoly = polygon;
+ [/csharp]
+ [/codeblocks]
Using [method add_polygon] and indices of the vertices array.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var polygon = NavigationPolygon.new()
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
- polygon.set_vertices(vertices)
+ polygon.vertices = vertices
var indices = PackedInt32Array(0, 3, 1)
polygon.add_polygon(indices)
$NavigationRegion2D.navpoly = polygon
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var polygon = new NavigationPolygon();
+ var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
+ polygon.Vertices = vertices;
+ var indices = new int[] { 0, 3, 1 };
+ polygon.AddPolygon(indices);
+ GetNode&lt;NavigationRegion2D&gt;("NavigationRegion2D").Navpoly = polygon;
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
<link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index aef114e1db..33a3f04c3d 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationRegion2D" inherits="Node2D" version="4.0">
<brief_description>
+ A region of the 2D navigation map.
</brief_description>
<description>
+ A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource.
+ Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin].
+ [b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge.
</description>
<tutorials>
</tutorials>
@@ -10,8 +14,13 @@
</methods>
<members>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
+ Determines if the [NavigationRegion2D] is enabled or disabled.
+ </member>
+ <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
+ A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
</member>
<member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon">
+ The [NavigationPolygon] resource to use.
</member>
</members>
<constants>
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index b70bfb6596..2904ba4200 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -4,7 +4,8 @@
A region of the navigation map.
</brief_description>
<description>
- A region of the navigation map. It tells the [Navigation3D] node what can be navigated and what cannot, based on the [NavigationMesh] resource. This should be a child of a [Navigation3D] node (even not a direct child).
+ A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource.
+ Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin].
</description>
<tutorials>
</tutorials>
@@ -21,6 +22,9 @@
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
Determines if the [NavigationRegion3D] is enabled or disabled.
</member>
+ <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
+ A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
+ </member>
<member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh">
The [NavigationMesh] resource to use.
</member>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 5f0b04487e..b0a57ed227 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -4,7 +4,12 @@
Server interface for low-level 2D navigation access
</brief_description>
<description>
- NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
+ NavigationServer2D is the server responsible for all 2D navigation. It handles several objects, namely maps, regions and agents.
+ Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
+ You may assign navigation layers to regions with [method NavigationServer2D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects.
+ To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
+ [b]Note:[/b] the collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
+ This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
<link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
@@ -207,8 +212,10 @@
</argument>
<argument index="3" name="optimize" type="bool">
</argument>
+ <argument index="4" name="layers" type="int" default="1">
+ </argument>
<description>
- Returns the navigation path to reach the destination from the origin, while avoiding static obstacles.
+ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
</description>
</method>
<method name="map_is_active" qualifiers="const">
@@ -260,6 +267,57 @@
Creates a new region.
</description>
</method>
+ <method name="region_get_connection_pathway_end" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="connection" type="int">
+ </argument>
+ <description>
+ Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ </description>
+ </method>
+ <method name="region_get_connection_pathway_start" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="connection" type="int">
+ </argument>
+ <description>
+ Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ </description>
+ </method>
+ <method name="region_get_connections_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <description>
+ Returns how many connections this [code]region[/code] has with other regions in the map.
+ </description>
+ </method>
+ <method name="region_get_layers" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <description>
+ Returns the region's layers.
+ </description>
+ </method>
+ <method name="region_set_layers" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="layers" type="int">
+ </argument>
+ <description>
+ Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
+ </description>
+ </method>
<method name="region_set_map" qualifiers="const">
<return type="void">
</return>
@@ -294,6 +352,15 @@
</description>
</method>
</methods>
+ <signals>
+ <signal name="map_changed">
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Emitted when a navigation map is updated, when a region moves or is modified.
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 95890c4b4c..b098a7fc20 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -4,7 +4,12 @@
Server interface for low-level 3D navigation access
</brief_description>
<description>
- NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
+ NavigationServer3D is the server responsible for all 3D navigation. It handles several objects, namely maps, regions and agents.
+ Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex.
+ You may assign navigation layers to regions with [method NavigationServer3D.region_set_layers], which then can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. This allows allowing or forbidding some areas to 3D objects.
+ To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
+ [b]Note:[/b] the collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
+ This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
<link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link>
@@ -219,7 +224,7 @@
<argument index="0" name="map" type="RID">
</argument>
<description>
- Returns the edge connection margin of the map.
+ Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions.
</description>
</method>
<method name="map_get_path" qualifiers="const">
@@ -233,8 +238,10 @@
</argument>
<argument index="3" name="optimize" type="bool">
</argument>
+ <argument index="4" name="layers" type="int" default="1">
+ </argument>
<description>
- Returns the navigation path to reach the destination from the origin.
+ Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path.
</description>
</method>
<method name="map_get_up" qualifiers="const">
@@ -285,7 +292,7 @@
<argument index="1" name="margin" type="float">
</argument>
<description>
- Set the map edge connection margein used to weld the compatible region edges.
+ Set the map edge connection margin used to weld the compatible region edges.
</description>
</method>
<method name="map_set_up" qualifiers="const">
@@ -328,6 +335,57 @@
Creates a new region.
</description>
</method>
+ <method name="region_get_connection_pathway_end" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="connection" type="int">
+ </argument>
+ <description>
+ Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ </description>
+ </method>
+ <method name="region_get_connection_pathway_start" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="connection" type="int">
+ </argument>
+ <description>
+ Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count].
+ </description>
+ </method>
+ <method name="region_get_connections_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <description>
+ Returns how many connections this [code]region[/code] has with other regions in the map.
+ </description>
+ </method>
+ <method name="region_get_layers" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <description>
+ Returns the region's layers.
+ </description>
+ </method>
+ <method name="region_set_layers" qualifiers="const">
+ <return type="void">
+ </return>
+ <argument index="0" name="region" type="RID">
+ </argument>
+ <argument index="1" name="layers" type="int">
+ </argument>
+ <description>
+ Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]).
+ </description>
+ </method>
<method name="region_set_map" qualifiers="const">
<return type="void">
</return>
@@ -371,6 +429,15 @@
</description>
</method>
</methods>
+ <signals>
+ <signal name="map_changed">
+ <argument index="0" name="map" type="RID">
+ </argument>
+ <description>
+ Emitted when a navigation map is updated, when a region moves or is modified.
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 954d31794a..06ea46f023 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -4,7 +4,8 @@
A high-level network interface to simplify multiplayer interactions.
</brief_description>
<description>
- Manages the connection to network peers. Assigns unique IDs to each client connected to the server.
+ Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
+ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
</description>
<tutorials>
<link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index b2e0442be8..d6de0ef4cf 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="margin" 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="margin" 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 2e8b76865d..7750d45226 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -9,7 +9,7 @@
[b]Scene tree:[/b] The [SceneTree] contains the active tree of nodes. When a node is added to the scene tree, it receives the [constant NOTIFICATION_ENTER_TREE] notification and its [method _enter_tree] callback is triggered. Child nodes are always added [i]after[/i] their parent node, i.e. the [method _enter_tree] callback of a parent node will be triggered before its child's.
Once all nodes have been added in the scene tree, they receive the [constant NOTIFICATION_READY] notification and their respective [method _ready] callbacks are triggered. For groups of nodes, the [method _ready] callback is called in reverse order, starting with the children and moving up to the parent nodes.
This means that when adding a node to the scene tree, the following order will be used for the callbacks: [method _enter_tree] of the parent, [method _enter_tree] of the children, [method _ready] of the children and finally [method _ready] of the parent (recursively for the entire scene tree).
- [b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
+ [b]Processing:[/b] Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback [method _process], toggled with [method set_process]) happens as fast as possible and is dependent on the frame rate, so the processing time [i]delta[/i] (in seconds) is passed as an argument. Physics processing (callback [method _physics_process], toggled with [method set_physics_process]) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine.
Nodes can also process input events. When present, the [method _input] function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the [method _unhandled_input] function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI [Control] nodes), ensuring that the node only receives the events that were meant for it.
To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though.
Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children.
@@ -65,7 +65,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
- Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant.
+ Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. [code]delta[/code] is in seconds.
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
@@ -77,7 +77,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
- Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant.
+ Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. [code]delta[/code] is in seconds.
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
@@ -128,13 +128,24 @@
</argument>
<description>
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
[b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
+ var child_node = get_child(0)
if child_node.get_parent():
child_node.get_parent().remove_child(child_node)
add_child(child_node)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Node childNode = GetChild(0);
+ if (childNode.GetParent() != null)
+ {
+ childNode.GetParent().RemoveChild(childNode);
+ }
+ AddChild(childNode);
+ [/csharp]
+ [/codeblocks]
If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method.
[b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.
</description>
@@ -147,8 +158,8 @@
<argument index="1" name="legible_unique_name" type="bool" default="false">
</argument>
<description>
- Adds a [code]sibling[/code] node to current's node parent, at the the same level as that node, right below it.
- If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type.
+ Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it.
+ If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instanced instead of its type.
Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children.
</description>
</method>
@@ -168,7 +179,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the node can process while the scene tree is paused (see [member pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
+ Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree.
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -234,6 +245,12 @@
Returns an array of references to node's children.
</description>
</method>
+ <method name="get_editor_description" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_groups" qualifiers="const">
<return type="Array">
</return>
@@ -275,12 +292,20 @@
/root/Swamp/Goblin
[/codeblock]
Possible paths are:
- [codeblock]
+ [codeblocks]
+ [gdscript]
get_node("Sword")
get_node("Backpack/Dagger")
get_node("../Swamp/Alligator")
get_node("/root/MyGame")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GetNode("Sword");
+ GetNode("Backpack/Dagger");
+ GetNode("../Swamp/Alligator");
+ GetNode("/root/MyGame");
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_node_and_resource">
@@ -292,11 +317,18 @@
Fetches a node and one of its resources as specified by the [NodePath]'s subname (e.g. [code]Area2D/CollisionShape2D:shape[/code]). If several nested resources are specified in the [NodePath], the last one will be fetched.
The return value is an array of size 3: the first index points to the [Node] (or [code]null[/code] if not found), the second index points to the [Resource] (or [code]null[/code] if not found), and the third index is the remaining [NodePath], if any.
For example, assuming that [code]Area2D/CollisionShape2D[/code] is a valid node and that its [code]shape[/code] property has been assigned a [RectangleShape2D] resource, one could have this kind of output:
- [codeblock]
+ [codeblocks]
+ [gdscript]
print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ]
print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ]
print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GD.Print(GetNodeAndResource("Area2D/CollisionShape2D")); // [[CollisionShape2D:1161], Null, ]
+ GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], ]
+ GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape:extents")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_node_or_null" qualifiers="const">
@@ -335,7 +367,7 @@
<return type="float">
</return>
<description>
- Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second].
+ Returns the time elapsed (in seconds) since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second].
</description>
</method>
<method name="get_process_delta_time" qualifiers="const">
@@ -564,7 +596,7 @@
<return type="void">
</return>
<description>
- Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree, i.e. the further they are on the node list, the higher they are drawn. After using [code]raise[/code], a Control will be drawn on top of their siblings.
+ Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree. The top Node is drawn first, then any siblings below the top Node in the hierarchy are successively drawn on top of it. After using [code]raise[/code], a Control will be drawn on top of its siblings.
</description>
</method>
<method name="remove_and_skip">
@@ -597,10 +629,11 @@
</return>
<argument index="0" name="node" type="Node">
</argument>
- <argument index="1" name="keep_data" type="bool" default="false">
+ <argument index="1" name="keep_groups" type="bool" default="false">
</argument>
<description>
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
+ If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in.
</description>
</method>
<method name="request_ready">
@@ -730,6 +763,14 @@
Sets the folded state of the node in the Scene dock.
</description>
</method>
+ <method name="set_editor_description">
+ <return type="void">
+ </return>
+ <argument index="0" name="editor_description" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_network_master">
<return type="void">
</return>
@@ -756,7 +797,8 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour.
+ Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.
+ [b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
</description>
</method>
<method name="set_process">
@@ -783,7 +825,8 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour.
+ Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.
+ [b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
</description>
</method>
<method name="set_process_unhandled_input">
@@ -839,8 +882,8 @@
<member name="owner" type="Node" setter="set_owner" getter="get_owner">
The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing.
</member>
- <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0">
- Pause mode. How the node will behave if the [SceneTree] is paused.
+ <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Node.ProcessMode" default="0">
+ Can be used to pause or unpause the node, or make the node paused based on the [SceneTree], or make it inherit the process mode from its parent (default).
</member>
<member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first.
@@ -985,14 +1028,23 @@
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="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 name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018">
+ Notification received when text server is changed.
+ </constant>
+ <constant name="PROCESS_MODE_INHERIT" value="0" enum="ProcessMode">
+ Inherits process mode from the node's parent. For the root node, it is equivalent to [constant PROCESS_MODE_PAUSABLE]. Default.
+ </constant>
+ <constant name="PROCESS_MODE_PAUSABLE" value="1" enum="ProcessMode">
+ Stops processing when the [SceneTree] is paused (process when unpaused). This is the inverse of [constant PROCESS_MODE_WHEN_PAUSED].
+ </constant>
+ <constant name="PROCESS_MODE_WHEN_PAUSED" value="2" enum="ProcessMode">
+ Only process when the [SceneTree] is paused (don't process when unpaused). This is the inverse of [constant PROCESS_MODE_PAUSABLE].
</constant>
- <constant name="PAUSE_MODE_STOP" value="1" enum="PauseMode">
- Stops processing when the [SceneTree] is paused.
+ <constant name="PROCESS_MODE_ALWAYS" value="3" enum="ProcessMode">
+ Always process. Continue processing always, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_DISABLED].
</constant>
- <constant name="PAUSE_MODE_PROCESS" value="2" enum="PauseMode">
- Continue to process regardless of the [SceneTree] pause state.
+ <constant name="PROCESS_MODE_DISABLED" value="4" enum="ProcessMode">
+ Never process. Completely disables processing, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_ALWAYS].
</constant>
<constant name="DUPLICATE_SIGNALS" value="1" enum="DuplicateFlags">
Duplicate the node's signals.
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index f6ff514474..5c29c0d48f 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -6,7 +6,7 @@
<description>
Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project.
Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system.
- [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad].
+ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad].
</description>
<tutorials>
<link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
@@ -103,7 +103,7 @@
</return>
<argument index="0" name="target" type="Vector3">
</argument>
- <argument index="1" name="up" type="Vector3">
+ <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
</argument>
<description>
Rotates itself so that the local -Z axis points towards the [code]target[/code] position.
@@ -118,7 +118,7 @@
</argument>
<argument index="1" name="target" type="Vector3">
</argument>
- <argument index="2" name="up" type="Vector3">
+ <argument index="2" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
</argument>
<description>
Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space.
@@ -229,7 +229,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default.
+ Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo.
</description>
</method>
<method name="show">
@@ -324,7 +324,7 @@
<constants>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
- In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform].
+ In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has a valid gizmo.
</constant>
<constant name="NOTIFICATION_ENTER_WORLD" value="41">
Node3D nodes receives this notification when they are registered to new [World3D] resource.
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 93ede047fd..817ccd5160 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -51,7 +51,7 @@
The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested.
Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties):
[codeblock]
- # Points to the Sprite2D node
+ # Points to the Sprite2D node.
"Path2D/PathFollow2D/Sprite2D"
# Points to the Sprite2D node and its "texture" resource.
# get_node() would retrieve "Sprite2D", while get_node_and_resource()
@@ -66,47 +66,70 @@
[/codeblock]
</description>
</method>
- <method name="get_as_property_path">
+ <method name="get_as_property_path" qualifiers="const">
<return type="NodePath">
</return>
<description>
Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node).
- [codeblock]
- # This will be parsed as a node path to the "x" property in the "position" node
+ [codeblocks]
+ [gdscript]
+ # This will be parsed as a node path to the "x" property in the "position" node.
var node_path = NodePath("position:x")
- # This will be parsed as a node path to the "x" component of the "position" property in the current node
+ # This will be parsed as a node path to the "x" component of the "position" property in the current node.
var property_path = node_path.get_as_property_path()
print(property_path) # :position:x
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // This will be parsed as a node path to the "x" property in the "position" node.
+ var nodePath = new NodePath("position:x");
+ // This will be parsed as a node path to the "x" component of the "position" property in the current node.
+ NodePath propertyPath = nodePath.GetAsPropertyPath();
+ GD.Print(propertyPath); // :position:x
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="get_concatenated_subnames">
+ <method name="get_concatenated_subnames" qualifiers="const">
<return type="StringName">
</return>
<description>
Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path")
print(nodepath.get_concatenated_subnames()) # texture:load_path
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var nodepath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path");
+ GD.Print(nodepath.GetConcatenatedSubnames()); // texture:load_path
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="get_name">
+ <method name="get_name" qualifiers="const">
<return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D")
print(node_path.get_name(0)) # Path2D
print(node_path.get_name(1)) # PathFollow2D
print(node_path.get_name(2)) # Sprite
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D");
+ GD.Print(nodePath.GetName(0)); // Path2D
+ GD.Print(nodePath.GetName(1)); // PathFollow2D
+ GD.Print(nodePath.GetName(2)); // Sprite
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="get_name_count">
+ <method name="get_name_count" qualifiers="const">
<return type="int">
</return>
<description>
@@ -114,21 +137,28 @@
For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names.
</description>
</method>
- <method name="get_subname">
+ <method name="get_subname" qualifiers="const">
<return type="StringName">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path")
print(node_path.get_subname(0)) # texture
print(node_path.get_subname(1)) # load_path
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path");
+ GD.Print(nodePath.GetSubname(0)); // texture
+ GD.Print(nodePath.GetSubname(1)); // load_path
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="get_subname_count">
+ <method name="get_subname_count" qualifiers="const">
<return type="int">
</return>
<description>
@@ -136,14 +166,14 @@
For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames.
</description>
</method>
- <method name="is_absolute">
+ <method name="is_absolute" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the node path is absolute (as opposed to relative), which means that it starts with a slash character ([code]/[/code]). Absolute node paths can be used to access the root node ([code]"/root"[/code]) or autoloads (e.g. [code]"/global"[/code] if a "global" autoload was registered).
</description>
</method>
- <method name="is_empty">
+ <method name="is_empty" qualifiers="const">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 1487c9e078..8c90108aef 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -25,13 +25,36 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="create_process">
+ <return type="int">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="arguments" type="PackedStringArray">
+ </argument>
+ <description>
+ Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space.
+ If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code].
+ For example, running another instance of the project:
+ [codeblocks]
+ [gdscript]
+ var pid = OS.create_process(OS.get_executable_path(), [])
+ [/gdscript]
+ [csharp]
+ var pid = OS.CreateProcess(OS.GetExecutablePath(), new string[] {});
+ [/csharp]
+ [/codeblocks]
+ See [method execute] if you wish to run an external command and retrieve the results.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
+ </description>
+ </method>
<method name="delay_msec" qualifiers="const">
<return type="void">
</return>
<argument index="0" name="msec" type="int">
</argument>
<description>
- Delay execution of the current thread by [code]msec[/code] milliseconds.
+ Delay execution of the current thread by [code]msec[/code] milliseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message.
</description>
</method>
<method name="delay_usec" qualifiers="const">
@@ -40,7 +63,7 @@
<argument index="0" name="usec" type="int">
</argument>
<description>
- Delay execution of the current thread by [code]usec[/code] microseconds.
+ Delay execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message.
</description>
</method>
<method name="dump_memory_to_file">
@@ -71,32 +94,36 @@
</argument>
<argument index="1" name="arguments" type="PackedStringArray">
</argument>
- <argument index="2" name="blocking" type="bool" default="true">
- </argument>
- <argument index="3" name="output" type="Array" default="[ ]">
+ <argument index="2" name="output" type="Array" default="[ ]">
</argument>
- <argument index="4" name="read_stderr" type="bool" default="false">
+ <argument index="3" name="read_stderr" type="bool" default="false">
</argument>
<description>
- Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable.
- The arguments are used in the given order and separated by a space, so [code]OS.execute("ping", ["-w", "3", "godotengine.org"], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell.
- This method has slightly different behavior based on whether the [code]blocking[/code] mode is enabled.
- If [code]blocking[/code] is [code]true[/code], the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution.
- If [code]blocking[/code] is [code]false[/code], the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty.
- The return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return [code]-1[/code] or another exit code.
- Example of blocking mode and retrieving the shell output:
- [codeblock]
+ Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too.
+ If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails.
+ [b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process.
+ For example, to retrieve a list of the working directory's contents:
+ [codeblocks]
+ [gdscript]
var output = []
- var exit_code = OS.execute("ls", ["-l", "/tmp"], true, output)
- [/codeblock]
- Example of non-blocking mode, running another instance of the project and storing its process ID:
- [codeblock]
- var pid = OS.execute(OS.get_executable_path(), [], false)
- [/codeblock]
- If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example:
- [codeblock]
- OS.execute("CMD.exe", ["/C", "cd %TEMP% &amp;&amp; dir"], true, output)
- [/codeblock]
+ var exit_code = OS.execute("ls", ["-l", "/tmp"], output)
+ [/gdscript]
+ [csharp]
+ var output = new Godot.Collections.Array();
+ int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, output);
+ [/csharp]
+ [/codeblocks]
+ To execute a composite command, a platform-specific shell can be invoked. For example:
+ [codeblocks]
+ [gdscript]
+ var output = []
+ OS.execute("CMD.exe", ["/C", "cd %TEMP% &amp;&amp; dir"], output)
+ [/gdscript]
+ [csharp]
+ var output = new Godot.Collections.Array();
+ OS.Execute("CMD.exe", new string[] {"/C", "cd %TEMP% &amp;&amp; dir"}, output);
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>
</method>
@@ -118,13 +145,26 @@
You can also incorporate environment variables using the [method get_environment] method.
You can set [code]editor/main_run_args[/code] in the Project Settings to define command-line arguments to be passed by the editor when running the project.
Here's a minimal example on how to parse command-line arguments into a dictionary using the [code]--key=value[/code] form for arguments:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var arguments = {}
for argument in OS.get_cmdline_args():
if argument.find("=") &gt; -1:
var key_value = argument.split("=")
arguments[key_value[0].lstrip("--")] = key_value[1]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var arguments = new Godot.Collections.Dictionary();
+ foreach (var argument in OS.GetCmdlineArgs())
+ {
+ if (argument.Find("=") &gt; -1)
+ {
+ string[] keyValue = argument.Split("=");
+ arguments[keyValue[0].LStrip("--")] = keyValue[1];
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_connected_midi_inputs">
@@ -167,10 +207,11 @@
<method name="get_environment" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="environment" type="String">
+ <argument index="0" name="variable" type="String">
</argument>
<description>
- Returns an environment variable.
+ Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist.
+ [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
<method name="get_executable_path" qualifiers="const">
@@ -202,7 +243,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">
@@ -259,22 +305,12 @@
[b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
</description>
</method>
- <method name="get_tablet_driver_count" qualifiers="const">
+ <method name="get_thread_caller_id" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the total number of available tablet drivers.
- [b]Note:[/b] This method is implemented on Windows.
- </description>
- </method>
- <method name="get_tablet_driver_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="idx" type="int">
- </argument>
- <description>
- Returns the tablet driver name for the given index.
- [b]Note:[/b] This method is implemented on Windows.
+ Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications.
+ [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts.
</description>
</method>
<method name="get_ticks_msec" qualifiers="const">
@@ -319,7 +355,8 @@
<return type="float">
</return>
<description>
- Returns the current UNIX epoch timestamp.
+ Returns the current UNIX epoch timestamp in seconds.
+ [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">
@@ -330,6 +367,7 @@
<description>
Gets an epoch time value from a dictionary of time values.
[code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code].
+ If the dictionary is empty [code]0[/code] is returned.
You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored.
</description>
</method>
@@ -347,10 +385,11 @@
<method name="has_environment" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="environment" type="String">
+ <argument index="0" name="variable" type="String">
</argument>
<description>
- Returns [code]true[/code] if an environment variable exists.
+ Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists.
+ [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
</description>
</method>
<method name="has_feature" qualifiers="const">
@@ -465,6 +504,18 @@
[b]Note:[/b] This method is implemented on Android.
</description>
</method>
+ <method name="set_environment" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="variable" type="String">
+ </argument>
+ <argument index="1" name="value" type="String">
+ </argument>
+ <description>
+ Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated.
+ [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows.
+ </description>
+ </method>
<method name="set_thread_name">
<return type="int" enum="Error">
</return>
@@ -499,19 +550,12 @@
</method>
</methods>
<members>
- <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0">
- The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).
- [b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed.
- </member>
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false">
If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
</member>
<member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900">
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
</member>
- <member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default="&quot;&quot;">
- The current tablet driver in use.
- </member>
</members>
<constants>
<constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver">
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 50d91c7943..7da9c1ac38 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Object" version="4.0">
<brief_description>
- Base class for all non built-in types.
+ Base class for all non-built-in types.
</brief_description>
<description>
Every class which is not a built-in type inherits from this class.
@@ -10,11 +10,20 @@
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
Property membership can be tested directly in GDScript using [code]in[/code]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var n = Node2D.new()
print("position" in n) # Prints "True".
print("other_property" in n) # Prints "False".
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ // C# has no direct equivalent to GDScript's `in` operator here, but we
+ // can achieve the same behavior by performing `Get` with a null check.
+ GD.Print(node.Get("position") != null); // Prints "True".
+ GD.Print(node.Get("other_property") != null); // Prints "False".
+ [/csharp]
+ [/codeblocks]
The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code].
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
[b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object].
@@ -96,9 +105,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- call("set", "position", Vector2(42.0, 0.0))
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.call("set", "position", Vector2(42, 0))
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.Call("set", "position", new Vector2(42, 0));
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -109,9 +125,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- call_deferred("set", "position", Vector2(42.0, 0.0))
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.call_deferred("set", "position", Vector2(42, 0))
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.CallDeferred("set", "position", new Vector2(42, 0));
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
</description>
</method>
@@ -124,9 +147,16 @@
</argument>
<description>
Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array].
- [codeblock]
- callv("set", [ "position", Vector2(42.0, 0.0) ])
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.callv("set", ["position", Vector2(42, 0)])
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.Callv("set", new Godot.Collections.Array { "position", new Vector2(42, 0) });
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="can_translate_messages" qualifiers="const">
@@ -148,23 +178,140 @@
<argument index="3" name="flags" type="int" default="0">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
- A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
- If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost.
- Examples:
- [codeblock]
- connect("pressed", self, "_on_Button_pressed") # BaseButton signal
- connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
- connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal
- [/codeblock]
- An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]:
- [codeblock]
- connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
- emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
- func _on_Player_hit(hit_by, level, weapon_type, damage):
- print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])
- [/codeblock]
+ Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants.
+ [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below.
+ A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections.
+ If the callable's target is destroyed in the game's lifecycle, the connection will be lost.
+ [b]Examples with recommended syntax:[/b]
+ Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ var button = Button.new()
+ # `button_down` here is a Signal object, and we thus call the Signal.connect() method,
+ # not Object.connect(). See discussion below for a more in-depth overview of the API.
+ button.button_down.connect(_on_button_down)
+
+ # This assumes that a `Player` class exists which defines a `hit` signal.
+ var player = Player.new()
+ # We use Signal.connect() again, and we also use the Callable.bind() method which
+ # returns a new Callable with the parameter binds.
+ player.hit.connect(_on_player_hit.bind("sword", 100))
+
+ func _on_button_down():
+ print("Button down!")
+
+ func _on_player_hit(weapon_type, damage):
+ print("Hit with weapon %s for %d damage." % [weapon_type, damage])
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var button = new Button();
+ // C# supports passing signals as events, so we can use this idiomatic construct:
+ button.ButtonDown += OnButtonDown;
+
+ // This assumes that a `Player` class exists which defines a `Hit` signal.
+ var player = new Player();
+ // Signals as events (`player.Hit += OnPlayerHit;`) do not support argument binding. You have to use:
+ player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array {"sword", 100 });
+ }
+
+ private void OnButtonDown()
+ {
+ GD.Print("Button down!");
+ }
+
+ private void OnPlayerHit(string weaponType, int damage)
+ {
+ GD.Print(String.Format("Hit with weapon {0} for {1} damage.", weaponType, damage));
+ }
+ [/csharp]
+ [/codeblocks]
+ [b][code]Object.connect()[/code] or [code]Signal.connect()[/code]?[/b]
+ As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ var button = Button.new()
+ # Option 1: Object.connect() with an implicit Callable for the defined function.
+ button.connect("button_down", _on_button_down)
+ # Option 2: Object.connect() with a constructed Callable using a target object and method name.
+ button.connect("button_down", Callable(self, "_on_button_down"))
+ # Option 3: Signal.connect() with an implicit Callable for the defined function.
+ button.button_down.connect(_on_button_down)
+ # Option 4: Signal.connect() with a constructed Callable using a target object and method name.
+ button.button_down.connect(Callable(self, "_on_button_down"))
+
+ func _on_button_down():
+ print("Button down!")
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var button = new Button();
+ // Option 1: Object.Connect() with an implicit Callable for the defined function.
+ button.Connect("button_down", OnButtonDown);
+ // Option 2: Object.connect() with a constructed Callable using a target object and method name.
+ button.Connect("button_down", new Callable(self, nameof(OnButtonDown)));
+ // Option 3: Signal.connect() with an implicit Callable for the defined function.
+ button.ButtonDown.Connect(OnButtonDown);
+ // Option 3b: In C#, we can use signals as events and connect with this more idiomatic syntax:
+ button.ButtonDown += OnButtonDown;
+ // Option 4: Signal.connect() with a constructed Callable using a target object and method name.
+ button.ButtonDown.Connect(new Callable(self, nameof(OnButtonDown)));
+ }
+
+ private void OnButtonDown()
+ {
+ GD.Print("Button down!");
+ }
+ [/csharp]
+ [/codeblocks]
+ While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method.
+ [b]Parameter bindings and passing:[/b]
+ For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds.
+ One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ # This assumes that a `Player` class exists which defines a `hit` signal.
+ var player = Player.new()
+ # Option 1: Using Callable.bind().
+ player.hit.connect(_on_player_hit.bind("sword", 100))
+ # Option 2: Using a `binds` Array in Signal.connect() (same syntax for Object.connect()).
+ player.hit.connect(_on_player_hit, ["sword", 100])
+
+ # Parameters added when emitting the signal are passed first.
+ player.emit_signal("hit", "Dark lord", 5)
+
+ # Four arguments, since we pass two when emitting (hit_by, level)
+ # and two when connecting (weapon_type, damage).
+ func _on_player_hit(hit_by, level, weapon_type, damage):
+ print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage])
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ // This assumes that a `Player` class exists which defines a `Hit` signal.
+ var player = new Player();
+ // Option 1: Using Callable.Bind(). This way we can still use signals as events.
+ player.Hit += OnPlayerHit.Bind("sword", 100);
+ // Option 2: Using a `binds` Array in Signal.Connect() (same syntax for Object.Connect()).
+ player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array{ "sword", 100 });
+
+ // Parameters added when emitting the signal are passed first.
+ player.EmitSignal("hit", "Dark lord", 5);
+ }
+
+ // Four arguments, since we pass two when emitting (hitBy, level)
+ // and two when connecting (weaponType, damage).
+ private void OnPlayerHit(string hitBy, int level, string weaponType, int damage)
+ {
+ GD.Print(String.Format("Hit by {0} (level {1}) with weapon {2} for {3} damage.", hitBy, level, weaponType, damage));
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="disconnect">
@@ -175,8 +322,7 @@
<argument index="1" name="callable" type="Callable">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code].
+ Disconnects a [code]signal[/code] from a given [code]callable[/code].
If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists.
</description>
</method>
@@ -187,10 +333,16 @@
</argument>
<description>
Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
- [codeblock]
- emit_signal("hit", weapon_type, damage)
+ [codeblocks]
+ [gdscript]
+ emit_signal("hit", "sword", 100)
emit_signal("game_over")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ EmitSignal("hit", "sword", 100);
+ EmitSignal("game_over");
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="free">
@@ -242,7 +394,7 @@
</return>
<description>
Returns the object's unique instance ID.
- This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GDScript.instance_from_id].
+ This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GlobalScope.instance_from_id].
</description>
</method>
<method name="get_meta" qualifiers="const">
@@ -359,8 +511,7 @@
<argument index="1" name="callable" type="Callable">
</argument>
<description>
- [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated.
- Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code].
+ Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code].
</description>
</method>
<method name="is_queued_for_deletion" qualifiers="const">
@@ -382,11 +533,11 @@
If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes.
</description>
</method>
- <method name="property_list_changed_notify">
+ <method name="notify_property_list_changed">
<return type="void">
</return>
<description>
- Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.
+ Notify the editor that the property list has changed by emitting the [signal property_list_changed] signal, so that editor plugins can take the new values into account.
</description>
</method>
<method name="remove_meta">
@@ -440,11 +591,20 @@
</argument>
<description>
Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
- [codeblock]
- set_indexed("position", Vector2(42, 0))
- set_indexed("position:y", -10)
- print(position) # (42, -10)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var node = Node2D.new()
+ node.set_indexed("position", Vector2(42, 0))
+ node.set_indexed("position:y", -10)
+ print(node.position) # (42, -10)
+ [/gdscript]
+ [csharp]
+ var node = new Node2D();
+ node.SetIndexed("position", new Vector2(42, 0));
+ node.SetIndexed("position:y", -10);
+ GD.Print(node.Position); // (42, -10)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_message_translation">
@@ -520,6 +680,10 @@
</method>
</methods>
<signals>
+ <signal name="property_list_changed">
+ <description>
+ </description>
+ </signal>
<signal name="script_changed">
<description>
Emitted whenever the object's script is changed.
diff --git a/doc/classes/PHashTranslation.xml b/doc/classes/OptimizedTranslation.xml
index 30194e9495..a5ca93c7ff 100644
--- a/doc/classes/PHashTranslation.xml
+++ b/doc/classes/OptimizedTranslation.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PHashTranslation" inherits="Translation" version="4.0">
+<class name="OptimizedTranslation" inherits="Translation" version="4.0">
<brief_description>
Optimized translation.
</brief_description>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 510f952fea..52da08c02f 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.
@@ -250,26 +253,44 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Default text [Color] of the [OptionButton].
</theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Text [Color] used when the [OptionButton] is disabled.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
Text [Color] used when the [OptionButton] is being hovered.
</theme_item>
- <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [OptionButton].
+ </theme_item>
+ <theme_item name="font_pressed_color" 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="outline_size" type="int" default="0">
+ The size of the text outline.
</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/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 6b500d5ac3..e3c78e08f1 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -5,12 +5,20 @@
</brief_description>
<description>
The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack].
- [codeblock]
+ [codeblocks]
+ [gdscript]
var packer = PCKPacker.new()
packer.pck_start("test.pck")
packer.add_file("res://text.txt", "text.txt")
packer.flush()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var packer = new PCKPacker();
+ packer.PckStart("test.pck");
+ packer.AddFile("res://text.txt", "text.txt");
+ packer.Flush();
+ [/csharp]
+ [/codeblocks]
The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package.
</description>
<tutorials>
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index 4a6893879d..3c7f0f4fad 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>
@@ -53,7 +52,7 @@
Appends a [PackedByteArray] at the end of this array.
</description>
</method>
- <method name="compress">
+ <method name="compress" qualifiers="const">
<return type="PackedByteArray">
</return>
<argument index="0" name="compression_mode" type="int" default="0">
@@ -62,7 +61,7 @@
Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
- <method name="decompress">
+ <method name="decompress" qualifiers="const">
<return type="PackedByteArray">
</return>
<argument index="0" name="buffer_size" type="int">
@@ -73,7 +72,7 @@
Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants.
</description>
</method>
- <method name="decompress_dynamic">
+ <method name="decompress_dynamic" qualifiers="const">
<return type="PackedByteArray">
</return>
<argument index="0" name="max_output_size" type="int">
@@ -82,39 +81,39 @@
</argument>
<description>
Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b]
- This method is potentially slower than [code]decompress[/code], as it may have to re-allocate it's output buffer multiple times while decompressing, where as [code]decompress[/code] knows it's output buffer size from the beginning.
+ This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning.
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">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedByteArray">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
- <method name="get_string_from_ascii">
+ <method name="get_string_from_ascii" qualifiers="const">
<return type="String">
</return>
<description>
Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8].
</description>
</method>
- <method name="get_string_from_utf16">
+ <method name="get_string_from_utf16" qualifiers="const">
<return type="String">
</return>
<description>
Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string.
</description>
</method>
- <method name="get_string_from_utf32">
+ <method name="get_string_from_utf32" qualifiers="const">
<return type="String">
</return>
<description>
Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string.
</description>
</method>
- <method name="get_string_from_utf8">
+ <method name="get_string_from_utf8" qualifiers="const">
<return type="String">
</return>
<description>
@@ -130,15 +129,21 @@
Returns [code]true[/code] if the array contains [code]value[/code].
</description>
</method>
- <method name="hex_encode">
+ <method name="hex_encode" qualifiers="const">
<return type="String">
</return>
<description>
Returns a hexadecimal representation of this array as a [String].
- [codeblock]
+ [codeblocks]
+ [gdscript]
var array = PackedByteArray([11, 46, 255])
print(array.hex_encode()) # Prints: 0b2eff
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var array = new byte[] {11, 46, 255};
+ GD.Print(array.HexEncode()); // Prints: 0b2eff
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="insert">
@@ -159,6 +164,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -229,7 +241,7 @@
Changes the byte at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -243,7 +255,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedByteArray">
</return>
<argument index="0" name="from" type="int">
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index 3065d16945..abfedc84cc 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,11 +52,11 @@
Appends a [PackedColorArray] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedColorArray">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -87,6 +86,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -157,7 +163,7 @@
Changes the [Color] at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -171,7 +177,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedColorArray">
</return>
<argument index="0" name="from" type="int">
@@ -181,7 +187,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index ab9594d2e3..8918312dc7 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,11 +53,11 @@
Appends a [PackedFloat32Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedFloat32Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -150,7 +156,7 @@
Changes the float at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -164,7 +170,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedFloat32Array">
</return>
<argument index="0" name="from" type="int">
@@ -174,7 +180,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 3088aee483..fbb832299e 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,11 +53,11 @@
Appends a [PackedFloat64Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedFloat64Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -158,7 +164,7 @@
Changes the float at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -172,7 +178,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedFloat64Array">
</return>
<argument index="0" name="from" type="int">
@@ -182,7 +188,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index eded545de8..ecef2d508b 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,11 +53,11 @@
Appends a [PackedInt32Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedInt32Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -158,7 +164,7 @@
Changes the integer at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -172,7 +178,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedInt32Array">
</return>
<argument index="0" name="from" type="int">
@@ -182,7 +188,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 83731b1023..19619d60cf 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,11 +53,11 @@
Appends a [PackedInt64Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedInt64Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -158,7 +164,7 @@
Changes the integer at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -172,7 +178,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedInt64Array">
</return>
<argument index="0" name="from" type="int">
@@ -182,7 +188,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index be40ab05de..1d9be7f165 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -5,17 +5,26 @@
</brief_description>
<description>
A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself.
- Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]).
+ Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]).
[b]Note:[/b] The node doesn't need to own itself.
[b]Example of loading a saved scene:[/b]
- [codeblock]
- # Use `load()` instead of `preload()` if the path isn't known at compile-time.
+ [codeblocks]
+ [gdscript]
+ # Use load() instead of preload() if the path isn't known at compile-time.
var scene = preload("res://scene.tscn").instance()
# Add the node as a child of the node the script is attached to.
add_child(scene)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // C# has no preload, so you have to always use ResourceLoader.Load&lt;PackedScene&gt;().
+ var scene = ResourceLoader.Load&lt;PackedScene&gt;("res://scene.tscn").Instance();
+ // Add the node as a child of the node the script is attached to.
+ AddChild(scene);
+ [/csharp]
+ [/codeblocks]
[b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Create the objects.
var node = Node2D.new()
var rigid = RigidBody2D.new()
@@ -27,15 +36,41 @@
# Change owner of `rigid`, but not of `collision`.
rigid.owner = node
-
var scene = PackedScene.new()
+
# Only `node` and `rigid` are now packed.
var result = scene.pack(node)
if result == OK:
- var error = ResourceSaver.save("res://path/name.scn", scene) # Or "user://..."
+ var error = ResourceSaver.save("res://path/name.tscn", scene) # Or "user://..."
if error != OK:
push_error("An error occurred while saving the scene to disk.")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Create the objects.
+ var node = new Node2D();
+ var rigid = new RigidBody2D();
+ var collision = new CollisionShape2D();
+
+ // Create the object hierarchy.
+ rigid.AddChild(collision);
+ node.AddChild(rigid);
+
+ // Change owner of `rigid`, but not of `collision`.
+ rigid.Owner = node;
+ var scene = new PackedScene();
+
+ // Only `node` and `rigid` are now packed.
+ Error result = scene.Pack(node);
+ if (result == Error.Ok)
+ {
+ Error error = ResourceSaver.Save("res://path/name.tscn", scene); // Or "user://..."
+ if (error != Error.Ok)
+ {
+ GD.PushError("An error occurred while saving the scene to disk.");
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
<link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index c71f5ffa7e..c241573b93 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,11 +53,11 @@
Appends a [PackedStringArray] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedStringArray">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -158,7 +164,7 @@
Changes the [String] at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -172,7 +178,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedStringArray">
</return>
<argument index="0" name="from" type="int">
@@ -182,7 +188,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 5f68d9256d..9138dc68e1 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,11 +53,11 @@
Appends a [PackedVector2Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedVector2Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -88,6 +87,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -166,7 +172,7 @@
Changes the [Vector2] at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -180,7 +186,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedVector2Array">
</return>
<argument index="0" name="from" type="int">
@@ -190,7 +196,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index e681e1deb7..0a3b0cf2c0 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,11 +52,11 @@
Appends a [PackedVector3Array] at the end of this array.
</description>
</method>
- <method name="empty">
- <return type="bool">
+ <method name="duplicate">
+ <return type="PackedVector3Array">
</return>
<description>
- Returns [code]true[/code] if the array is empty.
+ Creates a copy of the array, and returns it.
</description>
</method>
<method name="has">
@@ -87,6 +86,13 @@
Reverses the order of the elements in the array.
</description>
</method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the array is empty.
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -165,7 +171,7 @@
Changes the [Vector3] at the given index.
</description>
</method>
- <method name="size">
+ <method name="size" qualifiers="const">
<return type="int">
</return>
<description>
@@ -179,7 +185,7 @@
Sorts the elements of the array in ascending order.
</description>
</method>
- <method name="subarray">
+ <method name="subarray" qualifiers="const">
<return type="PackedVector3Array">
</return>
<argument index="0" name="from" type="int">
@@ -189,7 +195,7 @@
<description>
</description>
</method>
- <method name="to_byte_array">
+ <method name="to_byte_array" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml
index cab821b4c0..d7cf6cc8c6 100644
--- a/doc/classes/PacketPeerUDP.xml
+++ b/doc/classes/PacketPeerUDP.xml
@@ -124,17 +124,36 @@
<description>
Waits for a packet to arrive on the listening port. See [method listen].
[b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this:
- [codeblock]
- # Server
- socket.set_dest_address("127.0.0.1", 789)
- socket.put_packet("Time to stop".to_ascii())
+ [codeblocks]
+ [gdscript]
+ socket = PacketPeerUDP.new()
+ # Server
+ socket.set_dest_address("127.0.0.1", 789)
+ socket.put_packet("Time to stop".to_ascii())
- # Client
- while socket.wait() == OK:
- var data = socket.get_packet().get_string_from_ascii()
- if data == "Time to stop":
- return
- [/codeblock]
+ # Client
+ while socket.wait() == OK:
+ var data = socket.get_packet().get_string_from_ascii()
+ if data == "Time to stop":
+ return
+ [/gdscript]
+ [csharp]
+ var socket = new PacketPeerUDP();
+ // Server
+ socket.SetDestAddress("127.0.0.1", 789);
+ socket.PutPacket("Time To Stop".ToAscii());
+
+ // Client
+ while (socket.Wait() == OK)
+ {
+ string data = socket.GetPacket().GetStringFromASCII();
+ if (data == "Time to stop")
+ {
+ return;
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml
index 77df6245e9..6d7f99a55b 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,17 +180,8 @@
<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.
+ Amount of [member spread] along the Y axis.
</member>
<member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )">
Gravity applied to every particle.
@@ -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>
@@ -251,7 +251,7 @@
Scale randomness ratio.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
- Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.
+ Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
<member name="sub_emitter_amount_at_end" type="int" setter="set_sub_emitter_amount_at_end" getter="get_sub_emitter_amount_at_end">
</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/Performance.xml b/doc/classes/Performance.xml
index 0a9079ce71..9e9c5063ae 100644
--- a/doc/classes/Performance.xml
+++ b/doc/classes/Performance.xml
@@ -24,14 +24,53 @@
</argument>
<description>
Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom".
- [codeblock]
- Performance.add_custom_monitor("MyCategory/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "MyCategory"
- Performance.add_custom_monitor("MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom"
- # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so above code is valid
- Performance.add_custom_monitor("Custom/MyMonitor", some_callable) # Adds monitor with name "MyName" to category "Custom"
- # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so above code is valid
- Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", some_callable) # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom"
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ var monitor_value = Callable(self, "get_monitor_value")
+
+ # Adds monitor with name "MyName" to category "MyCategory".
+ Performance.add_custom_monitor("MyCategory/MyMonitor", monitor_value)
+
+ # Adds monitor with name "MyName" to category "Custom".
+ # Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid.
+ Performance.add_custom_monitor("MyMonitor", monitor_value)
+
+ # Adds monitor with name "MyName" to category "Custom".
+ # Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid.
+ Performance.add_custom_monitor("Custom/MyMonitor", monitor_value)
+
+ # Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom".
+ Performance.add_custom_monitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitor_value)
+
+ func get_monitor_value():
+ return randi() % 25
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var monitorValue = new Callable(this, nameof(GetMonitorValue));
+
+ // Adds monitor with name "MyName" to category "MyCategory".
+ Performance.AddCustomMonitor("MyCategory/MyMonitor", monitorValue);
+ // Adds monitor with name "MyName" to category "Custom".
+ // Note: "MyCategory/MyMonitor" and "MyMonitor" have same name but different ids so the code is valid.
+ Performance.AddCustomMonitor("MyMonitor", monitorValue);
+
+ // Adds monitor with name "MyName" to category "Custom".
+ // Note: "MyMonitor" and "Custom/MyMonitor" have same name and same category but different ids so the code is valid.
+ Performance.AddCustomMonitor("Custom/MyMonitor", monitorValue);
+
+ // Adds monitor with name "MyCategoryOne/MyCategoryTwo/MyMonitor" to category "Custom".
+ Performance.AddCustomMonitor("MyCategoryOne/MyCategoryTwo/MyMonitor", monitorValue);
+ }
+
+ public int GetMonitorValue()
+ {
+ return GD.Randi() % 25;
+ }
+ [/csharp]
+ [/codeblocks]
The debugger calls the callable to get the value of custom monitor. The callable must return a number.
Callables are called with arguments supplied in argument array.
[b]Note:[/b] It throws an error if given id is already present.
@@ -61,9 +100,14 @@
</argument>
<description>
Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this:
- [codeblock]
- print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ print(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console.
+ [/gdscript]
+ [csharp]
+ GD.Print(Performance.GetMonitor(Performance.Monitor.TimeFps)); // Prints the FPS to the console.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_monitor_modification_time">
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml
index 0808e4a724..38d9f722b1 100644
--- a/doc/classes/PhysicalBone3D.xml
+++ b/doc/classes/PhysicalBone3D.xml
@@ -91,7 +91,7 @@
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
</member>
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
- If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awaken by an external force.
+ If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction).
@@ -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/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml
index 2e0f9c52f2..381371b973 100644
--- a/doc/classes/PhysicalSkyMaterial.xml
+++ b/doc/classes/PhysicalSkyMaterial.xml
@@ -23,22 +23,22 @@
Modulates the [Color] on the bottom half of the sky to represent the ground.
</member>
<member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005">
- Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whiteish color around the sun and horizon.
+ Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon.
</member>
<member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color( 0.36, 0.56, 0.82, 1 )">
Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets.
</member>
<member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8">
- Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards.
+ Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it's passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards.
</member>
<member name="night_sky" type="Texture2D" setter="set_night_sky" getter="get_night_sky">
[Texture2D] for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day.
</member>
<member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0">
- Controls the strength of the rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.
+ Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky.
</member>
<member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color( 0.056, 0.14, 0.3, 1 )">
- Controls the [Color] of the rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a mars looking atmosphere with a corresponding blue sunset.
+ Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset.
</member>
<member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0">
Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth.
diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml
index c26cf0514c..b6f95305ed 100644
--- a/doc/classes/PhysicsDirectSpaceState2D.xml
+++ b/doc/classes/PhysicsDirectSpaceState2D.xml
@@ -16,8 +16,9 @@
<argument index="0" name="shape" type="PhysicsShapeQueryParameters2D">
</argument>
<description>
- Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty.
- [b]Note:[/b] Both the shape and the motion are supplied through a [PhysicsShapeQueryParameters2D] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
+ Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object.
+ Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
+ [b]Note:[/b] Any [Shape2D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape2D]s that the shape is already colliding with.
</description>
</method>
<method name="collide_shape">
diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml
index 789e8cc731..243d071c56 100644
--- a/doc/classes/PhysicsDirectSpaceState3D.xml
+++ b/doc/classes/PhysicsDirectSpaceState3D.xml
@@ -18,8 +18,9 @@
<argument index="1" name="motion" type="Vector3">
</argument>
<description>
- Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code].
- If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics3D.
+ Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object.
+ Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned.
+ [b]Note:[/b] Any [Shape3D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape3D]s that the shape is already colliding with.
</description>
</method>
<method name="collide_shape">
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 6a1508b0e3..701a430538 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -58,7 +58,7 @@
<return type="RID">
</return>
<description>
- Creates an [Area2D].
+ Creates an [Area2D]. After creating an [Area2D] with this method, assign it to a space using [method area_set_space] to use the created [Area2D] in the physics world.
</description>
</method>
<method name="area_get_canvas_instance_id" qualifiers="const">
@@ -850,21 +850,6 @@
<description>
</description>
</method>
- <method name="damped_spring_joint_create">
- <return type="RID">
- </return>
- <argument index="0" name="anchor_a" type="Vector2">
- </argument>
- <argument index="1" name="anchor_b" type="Vector2">
- </argument>
- <argument index="2" name="body_a" type="RID">
- </argument>
- <argument index="3" name="body_b" type="RID">
- </argument>
- <description>
- Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
- </description>
- </method>
<method name="damped_spring_joint_get_param" qualifiers="const">
<return type="float">
</return>
@@ -907,21 +892,18 @@
Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states.
</description>
</method>
- <method name="groove_joint_create">
- <return type="RID">
+ <method name="joint_clear">
+ <return type="void">
</return>
- <argument index="0" name="groove1_a" type="Vector2">
- </argument>
- <argument index="1" name="groove2_a" type="Vector2">
- </argument>
- <argument index="2" name="anchor_b" type="Vector2">
- </argument>
- <argument index="3" name="body_a" type="RID">
- </argument>
- <argument index="4" name="body_b" type="RID">
+ <argument index="0" name="joint" type="RID">
</argument>
<description>
- Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself.
+ </description>
+ </method>
+ <method name="joint_create">
+ <return type="RID">
+ </return>
+ <description>
</description>
</method>
<method name="joint_get_param" qualifiers="const">
@@ -944,36 +926,71 @@
Returns a joint's type (see [enum JointType]).
</description>
</method>
- <method name="joint_set_param">
+ <method name="joint_make_damped_spring">
<return type="void">
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam">
+ <argument index="1" name="anchor_a" type="Vector2">
</argument>
- <argument index="2" name="value" type="float">
+ <argument index="2" name="anchor_b" type="Vector2">
+ </argument>
+ <argument index="3" name="body_a" type="RID">
+ </argument>
+ <argument index="4" name="body_b" type="RID">
</argument>
<description>
- Sets a joint parameter. See [enum JointParam] for a list of available parameters.
</description>
</method>
- <method name="line_shape_create">
- <return type="RID">
+ <method name="joint_make_groove">
+ <return type="void">
</return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="groove1_a" type="Vector2">
+ </argument>
+ <argument index="2" name="groove2_a" type="Vector2">
+ </argument>
+ <argument index="3" name="anchor_b" type="Vector2">
+ </argument>
+ <argument index="4" name="body_a" type="RID">
+ </argument>
+ <argument index="5" name="body_b" type="RID">
+ </argument>
<description>
</description>
</method>
- <method name="pin_joint_create">
- <return type="RID">
+ <method name="joint_make_pin">
+ <return type="void">
</return>
- <argument index="0" name="anchor" type="Vector2">
+ <argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="body_a" type="RID">
+ <argument index="1" name="anchor" type="Vector2">
</argument>
- <argument index="2" name="body_b" type="RID">
+ <argument index="2" name="body_a" type="RID">
+ </argument>
+ <argument index="3" name="body_b" type="RID">
</argument>
<description>
- Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
+ </description>
+ </method>
+ <method name="joint_set_param">
+ <return type="void">
+ </return>
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ Sets a joint parameter. See [enum JointParam] for a list of available parameters.
+ </description>
+ </method>
+ <method name="line_shape_create">
+ <return type="RID">
+ </return>
+ <description>
</description>
</method>
<method name="ray_shape_create">
@@ -1233,15 +1250,18 @@
<constant name="BODY_STATE_CAN_SLEEP" value="4" enum="BodyState">
Constant to set/get whether the body can sleep.
</constant>
- <constant name="JOINT_PIN" value="0" enum="JointType">
+ <constant name="JOINT_TYPE_PIN" value="0" enum="JointType">
Constant to create pin joints.
</constant>
- <constant name="JOINT_GROOVE" value="1" enum="JointType">
+ <constant name="JOINT_TYPE_GROOVE" value="1" enum="JointType">
Constant to create groove joints.
</constant>
- <constant name="JOINT_DAMPED_SPRING" value="2" enum="JointType">
+ <constant name="JOINT_TYPE_DAMPED_SPRING" value="2" enum="JointType">
Constant to create damped spring joints.
</constant>
+ <constant name="JOINT_TYPE_MAX" value="3" enum="JointType">
+ Represents the size of the [enum JointType] enum.
+ </constant>
<constant name="JOINT_PARAM_BIAS" value="0" enum="JointParam">
</constant>
<constant name="JOINT_PARAM_MAX_BIAS" value="1" enum="JointParam">
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index 5fd3ef5db2..c61347ba0b 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -129,15 +129,6 @@
Returns the transform matrix for an area.
</description>
</method>
- <method name="area_is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="area" type="RID">
- </argument>
- <description>
- If [code]true[/code], area collides with rays.
- </description>
- </method>
<method name="area_remove_shape">
<return type="void">
</return>
@@ -421,12 +412,7 @@
<method name="body_create">
<return type="RID">
</return>
- <argument index="0" name="mode" type="int" enum="PhysicsServer3D.BodyMode" default="2">
- </argument>
- <argument index="1" name="init_sleeping" type="bool" default="false">
- </argument>
<description>
- Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
</description>
</method>
<method name="body_get_collision_layer" qualifiers="const">
@@ -582,15 +568,6 @@
Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]).
</description>
</method>
- <method name="body_is_ray_pickable" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="body" type="RID">
- </argument>
- <description>
- If [code]true[/code], the body can be detected by rays.
- </description>
- </method>
<method name="body_remove_collision_exception">
<return type="void">
</return>
@@ -815,6 +792,24 @@
Sets a body state (see [enum BodyState] constants).
</description>
</method>
+ <method name="box_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="capsule_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="concave_polygon_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="cone_twist_joint_get_param" qualifiers="const">
<return type="float">
</return>
@@ -839,6 +834,24 @@
Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants).
</description>
</method>
+ <method name="convex_polygon_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="custom_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="cylinder_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="free_rid">
<return type="void">
</return>
@@ -848,7 +861,7 @@
Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console.
</description>
</method>
- <method name="generic_6dof_joint_get_flag">
+ <method name="generic_6dof_joint_get_flag" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="joint" type="RID">
@@ -861,7 +874,7 @@
Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants).
</description>
</method>
- <method name="generic_6dof_joint_get_param">
+ <method name="generic_6dof_joint_get_param" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="joint" type="RID">
@@ -913,6 +926,12 @@
Returns an Info defined by the [enum ProcessInfo] input given.
</description>
</method>
+ <method name="heightmap_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="hinge_joint_get_flag" qualifiers="const">
<return type="bool">
</return>
@@ -961,97 +980,116 @@
Sets a hinge_joint parameter (see [enum HingeJointParam] constants).
</description>
</method>
- <method name="joint_create_cone_twist">
- <return type="RID">
+ <method name="joint_clear">
+ <return type="void">
</return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_ref_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
- </argument>
- <argument index="3" name="local_ref_B" type="Transform">
+ <argument index="0" name="joint" type="RID">
</argument>
<description>
- Creates a [ConeTwistJoint3D].
</description>
</method>
- <method name="joint_create_generic_6dof">
+ <method name="joint_create">
<return type="RID">
</return>
- <argument index="0" name="body_A" type="RID">
- </argument>
- <argument index="1" name="local_ref_A" type="Transform">
- </argument>
- <argument index="2" name="body_B" type="RID">
+ <description>
+ </description>
+ </method>
+ <method name="joint_get_solver_priority" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="joint" type="RID">
</argument>
- <argument index="3" name="local_ref_B" type="Transform">
+ <description>
+ Gets the priority value of the Joint3D.
+ </description>
+ </method>
+ <method name="joint_get_type" qualifiers="const">
+ <return type="int" enum="PhysicsServer3D.JointType">
+ </return>
+ <argument index="0" name="joint" type="RID">
</argument>
<description>
- Creates a [Generic6DOFJoint3D].
+ Returns the type of the Joint3D.
</description>
</method>
- <method name="joint_create_hinge">
- <return type="RID">
+ <method name="joint_make_cone_twist">
+ <return type="void">
</return>
- <argument index="0" name="body_A" type="RID">
+ <argument index="0" name="joint" type="RID">
+ </argument>
+ <argument index="1" name="body_A" type="RID">
</argument>
- <argument index="1" name="hinge_A" type="Transform">
+ <argument index="2" name="local_ref_A" type="Transform">
</argument>
- <argument index="2" name="body_B" type="RID">
+ <argument index="3" name="body_B" type="RID">
</argument>
- <argument index="3" name="hinge_B" type="Transform">
+ <argument index="4" name="local_ref_B" type="Transform">
</argument>
<description>
- Creates a [HingeJoint3D].
</description>
</method>
- <method name="joint_create_pin">
- <return type="RID">
+ <method name="joint_make_generic_6dof">
+ <return type="void">
</return>
- <argument index="0" name="body_A" type="RID">
+ <argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="local_A" type="Vector3">
+ <argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="body_B" type="RID">
+ <argument index="2" name="local_ref_A" type="Transform">
</argument>
- <argument index="3" name="local_B" type="Vector3">
+ <argument index="3" name="body_B" type="RID">
+ </argument>
+ <argument index="4" name="local_ref_B" type="Transform">
</argument>
<description>
- Creates a [PinJoint3D].
</description>
</method>
- <method name="joint_create_slider">
- <return type="RID">
+ <method name="joint_make_hinge">
+ <return type="void">
</return>
- <argument index="0" name="body_A" type="RID">
+ <argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="local_ref_A" type="Transform">
+ <argument index="1" name="body_A" type="RID">
</argument>
- <argument index="2" name="body_B" type="RID">
+ <argument index="2" name="hinge_A" type="Transform">
</argument>
- <argument index="3" name="local_ref_B" type="Transform">
+ <argument index="3" name="body_B" type="RID">
+ </argument>
+ <argument index="4" name="hinge_B" type="Transform">
</argument>
<description>
- Creates a [SliderJoint3D].
</description>
</method>
- <method name="joint_get_solver_priority" qualifiers="const">
- <return type="int">
+ <method name="joint_make_pin">
+ <return type="void">
</return>
<argument index="0" name="joint" type="RID">
</argument>
+ <argument index="1" name="body_A" type="RID">
+ </argument>
+ <argument index="2" name="local_A" type="Vector3">
+ </argument>
+ <argument index="3" name="body_B" type="RID">
+ </argument>
+ <argument index="4" name="local_B" type="Vector3">
+ </argument>
<description>
- Gets the priority value of the Joint3D.
</description>
</method>
- <method name="joint_get_type" qualifiers="const">
- <return type="int" enum="PhysicsServer3D.JointType">
+ <method name="joint_make_slider">
+ <return type="void">
</return>
<argument index="0" name="joint" type="RID">
</argument>
+ <argument index="1" name="body_A" type="RID">
+ </argument>
+ <argument index="2" name="local_ref_A" type="Transform">
+ </argument>
+ <argument index="3" name="body_B" type="RID">
+ </argument>
+ <argument index="4" name="local_ref_B" type="Transform">
+ </argument>
<description>
- Returns the type of the Joint3D.
</description>
</method>
<method name="joint_set_solver_priority">
@@ -1129,22 +1167,25 @@
Sets a pin_joint parameter (see [enum PinJointParam] constants).
</description>
</method>
- <method name="set_active">
- <return type="void">
+ <method name="plane_shape_create">
+ <return type="RID">
</return>
- <argument index="0" name="active" type="bool">
- </argument>
<description>
- Activates or deactivates the 3D physics engine.
</description>
</method>
- <method name="shape_create">
+ <method name="ray_shape_create">
<return type="RID">
</return>
- <argument index="0" name="type" type="int" enum="PhysicsServer3D.ShapeType">
+ <description>
+ </description>
+ </method>
+ <method name="set_active">
+ <return type="void">
+ </return>
+ <argument index="0" name="active" type="bool">
</argument>
<description>
- Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
+ Activates or deactivates the 3D physics engine.
</description>
</method>
<method name="shape_get_data" qualifiers="const">
@@ -1200,6 +1241,14 @@
Gets a slider_joint parameter (see [enum SliderJointParam] constants).
</description>
</method>
+ <method name="soft_body_get_bounds" qualifiers="const">
+ <return type="AABB">
+ </return>
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="space_create">
<return type="RID">
</return>
@@ -1260,23 +1309,32 @@
Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants.
</description>
</method>
+ <method name="sphere_shape_create">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
- <constant name="JOINT_PIN" value="0" enum="JointType">
+ <constant name="JOINT_TYPE_PIN" value="0" enum="JointType">
The [Joint3D] is a [PinJoint3D].
</constant>
- <constant name="JOINT_HINGE" value="1" enum="JointType">
+ <constant name="JOINT_TYPE_HINGE" value="1" enum="JointType">
The [Joint3D] is a [HingeJoint3D].
</constant>
- <constant name="JOINT_SLIDER" value="2" enum="JointType">
+ <constant name="JOINT_TYPE_SLIDER" value="2" enum="JointType">
The [Joint3D] is a [SliderJoint3D].
</constant>
- <constant name="JOINT_CONE_TWIST" value="3" enum="JointType">
+ <constant name="JOINT_TYPE_CONE_TWIST" value="3" enum="JointType">
The [Joint3D] is a [ConeTwistJoint3D].
</constant>
- <constant name="JOINT_6DOF" value="4" enum="JointType">
+ <constant name="JOINT_TYPE_6DOF" value="4" enum="JointType">
The [Joint3D] is a [Generic6DOFJoint3D].
</constant>
+ <constant name="JOINT_TYPE_MAX" value="5" enum="JointType">
+ Represents the size of the [enum JointType] enum.
+ </constant>
<constant name="PIN_JOINT_BIAS" value="0" enum="PinJointParam">
The strength with which the pinned objects try to stay in positional relation to each other.
The higher, the stronger.
@@ -1493,7 +1551,10 @@
<constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType">
The [Shape3D] is a [HeightMapShape3D].
</constant>
- <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType">
+ <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType">
+ The [Shape3D] is a [SoftBody3D].
+ </constant>
+ <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType">
This constant is used internally by the engine. Any attempt to create this kind of shape results in an error.
</constant>
<constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter">
diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml
index 93ca684b95..4d7fc61517 100644
--- a/doc/classes/PhysicsShapeQueryParameters2D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters2D.xml
@@ -34,19 +34,34 @@
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API:
- [codeblock]
- var shape_rid = PhysicsServer2D.circle_shape_create()
- var radius = 64
- PhysicsServer2D.shape_set_data(shape_rid, radius)
+ [codeblocks]
+ [gdscript]
+ var shape_rid = PhysicsServer2D.circle_shape_create()
+ var radius = 64
+ PhysicsServer2D.shape_set_data(shape_rid, radius)
- var params = PhysicsShapeQueryParameters2D.new()
- params.shape_rid = shape_rid
+ var params = PhysicsShapeQueryParameters2D.new()
+ params.shape_rid = shape_rid
- # Execute physics queries here...
+ # Execute physics queries here...
- # Release the shape when done with physics queries.
- PhysicsServer2D.free_rid(shape_rid)
- [/codeblock]
+ # Release the shape when done with physics queries.
+ PhysicsServer2D.free_rid(shape_rid)
+ [/gdscript]
+ [csharp]
+ RID shapeRid = PhysicsServer2D.CircleShapeCreate();
+ int radius = 64;
+ PhysicsServer2D.ShapeSetData(shapeRid, radius);
+
+ var params = new PhysicsShapeQueryParameters2D();
+ params.ShapeRid = shapeRid;
+
+ // Execute physics queries here...
+
+ // Release the shape when done with physics queries.
+ PhysicsServer2D.FreeRid(shapeRid);
+ [/csharp]
+ [/codeblocks]
</member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
The queried shape's transform matrix.
diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml
index 167fb31bb3..4b43ea66fc 100644
--- a/doc/classes/PhysicsShapeQueryParameters3D.xml
+++ b/doc/classes/PhysicsShapeQueryParameters3D.xml
@@ -31,19 +31,34 @@
</member>
<member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid">
The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API:
- [codeblock]
- var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE)
- var radius = 2.0
- PhysicsServer3D.shape_set_data(shape_rid, radius)
+ [codeblocks]
+ [gdscript]
+ var shape_rid = PhysicsServer3D.shape_create(PhysicsServer3D.SHAPE_SPHERE)
+ var radius = 2.0
+ PhysicsServer3D.shape_set_data(shape_rid, radius)
- var params = PhysicsShapeQueryParameters3D.new()
- params.shape_rid = shape_rid
+ var params = PhysicsShapeQueryParameters3D.new()
+ params.shape_rid = shape_rid
- # Execute physics queries here...
+ # Execute physics queries here...
- # Release the shape when done with physics queries.
- PhysicsServer3D.free_rid(shape_rid)
- [/codeblock]
+ # Release the shape when done with physics queries.
+ PhysicsServer3D.free_rid(shape_rid)
+ [/gdscript]
+ [csharp]
+ RID shapeRid = PhysicsServer3D.ShapeCreate(PhysicsServer3D.ShapeType.Sphere);
+ float radius = 2.0f;
+ PhysicsServer3D.ShapeSetData(shapeRid, radius);
+
+ var params = new PhysicsShapeQueryParameters3D();
+ params.ShapeRid = shapeRid;
+
+ // Execute physics queries here...
+
+ // Release the shape when done with physics queries.
+ PhysicsServer3D.FreeRid(shapeRid);
+ [/csharp]
+ [/codeblocks]
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
The queried shape's transform matrix.
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/Plane.xml b/doc/classes/Plane.xml
index e3242512c4..2342f00631 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -76,14 +76,14 @@
Creates a plane from the three points, given in clockwise order.
</description>
</method>
- <method name="center">
+ <method name="center" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns the center of the plane.
</description>
</method>
- <method name="distance_to">
+ <method name="distance_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="point" type="Vector3">
@@ -92,7 +92,7 @@
Returns the shortest distance from the plane to the position [code]point[/code].
</description>
</method>
- <method name="has_point">
+ <method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="point" type="Vector3">
@@ -103,7 +103,7 @@
Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold.
</description>
</method>
- <method name="intersect_3">
+ <method name="intersect_3" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="b" type="Plane">
@@ -114,7 +114,7 @@
Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
- <method name="intersects_ray">
+ <method name="intersects_ray" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="from" type="Vector3">
@@ -125,7 +125,7 @@
Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
- <method name="intersects_segment">
+ <method name="intersects_segment" qualifiers="const">
<return type="Variant">
</return>
<argument index="0" name="from" type="Vector3">
@@ -136,16 +136,16 @@
Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned.
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="to_plane" type="Plane">
</argument>
<description>
- Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="is_point_over">
+ <method name="is_point_over" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="plane" type="Vector3">
@@ -154,7 +154,7 @@
Returns [code]true[/code] if [code]point[/code] is located above the plane.
</description>
</method>
- <method name="normalized">
+ <method name="normalized" qualifiers="const">
<return type="Plane">
</return>
<description>
@@ -189,7 +189,7 @@
<description>
</description>
</method>
- <method name="project">
+ <method name="project" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="point" type="Vector3">
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/Popup.xml b/doc/classes/Popup.xml
index 6f77f3371d..b8d8a55412 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -12,6 +12,8 @@
</methods>
<members>
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
+ <member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true">
+ </member>
<member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index b1ec9a222a..418785222e 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -205,8 +205,11 @@
</return>
<argument index="0" name="label" type="String" default="&quot;&quot;">
</argument>
+ <argument index="1" name="id" type="int" default="-1">
+ </argument>
<description>
- Adds a separator between items. Separators also occupy an index.
+ Adds a separator between items. Separators also occupy an index, which you can set by using the [code]id[/code] parameter.
+ 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 +247,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 +305,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 +323,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 +361,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 +535,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>
@@ -513,7 +565,20 @@
<argument index="1" name="state" type="int">
</argument>
<description>
- Sets the state of an multistate item. See [method add_multistate_item] for details.
+ Sets the state of a 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">
@@ -562,6 +627,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>
@@ -588,13 +664,13 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Cycle to the next state of an multistate item. See [method add_multistate_item] for details.
+ Cycle to the next state of a multistate item. See [method add_multistate_item] for details.
</description>
</method>
</methods>
<members>
<member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="true">
- If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
+ If [code]true[/code], allows navigating [PopupMenu] with letter keys.
</member>
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
@@ -641,30 +717,46 @@
<theme_item name="font" type="Font">
[Font] used for the menu items.
</theme_item>
+ <theme_item name="font_accelerator_color" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
+ </theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
The default text [Color] for menu items' names.
</theme_item>
- <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
- The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
[Color] used for disabled menu items' text.
</theme_item>
- <theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
[Color] used for the hovered text.
</theme_item>
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the menu item.
+ </theme_item>
+ <theme_item name="font_separator_color" 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>
<theme_item name="hseparation" type="int" default="4">
The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
+ <theme_item name="item_end_padding" type="int" default="2">
+ </theme_item>
+ <theme_item name="item_start_padding" type="int" default="2">
+ </theme_item>
<theme_item name="labeled_separator_left" type="StyleBox">
[StyleBox] for the left side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="labeled_separator_right" type="StyleBox">
[StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the item text outline.
+ </theme_item>
<theme_item name="panel" type="StyleBox">
Default [StyleBox] of the [PopupMenu] items.
</theme_item>
@@ -681,7 +773,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 9e7f26ed4f..8b73bcb9c1 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>
@@ -14,17 +14,24 @@
</return>
<description>
Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example:
- [codeblock]
- var c := CylinderMesh.new()
- var arr_mesh := ArrayMesh.new()
+ [codeblocks]
+ [gdscript]
+ var c = CylinderMesh.new()
+ var arr_mesh = ArrayMesh.new()
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var c = new CylinderMesh();
+ var arrMesh = new ArrayMesh();
+ arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, c.GetMeshArrays());
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
<members>
<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 unnexpected culling when using a shader to offset vertices.
+ 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>
<member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml
index c957d6f182..160b61c720 100644
--- a/doc/classes/ProgressBar.xml
+++ b/doc/classes/ProgressBar.xml
@@ -32,8 +32,17 @@
<theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
The color of the text.
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [ProgressBar].
+ </theme_item>
+ <theme_item name="font_shadow_color" 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_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 7ca2dae4d7..5b9150ab04 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -25,7 +25,8 @@
- [code]type[/code]: [int] (see [enum Variant.Type])
- optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
ProjectSettings.set("category/property_name", 0)
var property_info = {
@@ -36,7 +37,21 @@
}
ProjectSettings.add_property_info(property_info)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ ProjectSettings.Singleton.Set("category/property_name", 0);
+
+ var propertyInfo = new Godot.Collections.Dictionary
+ {
+ {"name", "category/propertyName"},
+ {"type", Variant.Type.Int},
+ {"hint", PropertyHint.Enum},
+ {"hint_string", "one,two,three"},
+ };
+
+ ProjectSettings.AddPropertyInfo(propertyInfo);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="clear">
@@ -65,9 +80,14 @@
<description>
Returns the value of a setting.
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
print(ProjectSettings.get_setting("application/config/name"))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GD.Print(ProjectSettings.GetSetting("application/config/name"));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="globalize_path" qualifiers="const">
@@ -76,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">
@@ -109,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">
@@ -135,6 +169,7 @@
</return>
<description>
Saves the configuration to the [code]project.godot[/code] file.
+ [b]Note:[/b] This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save [code]override.cfg[/code] file.
</description>
</method>
<method name="save_custom">
@@ -143,7 +178,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
- Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format).
+ Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). You can also save [code]override.cfg[/code] file, which is also text, but can be used in exported projects unlike other formats.
</description>
</method>
<method name="set_initial_value">
@@ -178,9 +213,14 @@
<description>
Sets the value of a setting.
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
ProjectSettings.set_setting("application/config/name", "Example")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ ProjectSettings.SetSetting("application/config/name", "Example");
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
@@ -230,6 +270,16 @@
<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.
+ Changes to this setting will only be applied upon restarting the application.
+ </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.
+ Changes to this setting will only be applied upon restarting the application.
+ </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>
@@ -242,31 +292,31 @@
<member name="application/run/main_scene" type="String" setter="" getter="" default="&quot;&quot;">
Path to the main scene file that will be loaded when the project runs.
</member>
- <member name="audio/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0">
+ <member name="audio/buses/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0">
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
</member>
- <member name="audio/channel_disable_time" type="float" setter="" getter="" default="2.0">
+ <member name="audio/buses/channel_disable_time" type="float" setter="" getter="" default="2.0">
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
</member>
- <member name="audio/default_bus_layout" type="String" setter="" getter="" default="&quot;res://default_bus_layout.tres&quot;">
+ <member name="audio/buses/default_bus_layout" type="String" setter="" getter="" default="&quot;res://default_bus_layout.tres&quot;">
Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene.
</member>
- <member name="audio/driver" type="String" setter="" getter="">
+ <member name="audio/driver/driver" type="String" setter="" getter="">
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
</member>
- <member name="audio/enable_audio_input" type="bool" setter="" getter="" default="false">
+ <member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false">
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
</member>
- <member name="audio/mix_rate" type="int" setter="" getter="" default="44100">
+ <member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100">
Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system.
</member>
- <member name="audio/output_latency" type="int" setter="" getter="" default="15">
+ <member name="audio/driver/output_latency" type="int" setter="" getter="" default="15">
Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
</member>
- <member name="audio/output_latency.web" type="int" setter="" getter="" default="50">
- Safer override for [member audio/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
+ <member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50">
+ Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
</member>
- <member name="audio/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
+ <member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0">
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
</member>
<member name="compression/formats/gzip/compression_level" type="int" setter="" getter="" default="-1">
@@ -284,6 +334,18 @@
<member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27">
Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing.
</member>
+ <member name="debug/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], logs all output to files.
+ </member>
+ <member name="debug/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true">
+ Desktop override for [member debug/file_logging/enable_file_logging], as log files are not readily accessible on mobile/Web platforms.
+ </member>
+ <member name="debug/file_logging/log_path" type="String" setter="" getter="" default="&quot;user://logs/godot.log&quot;">
+ Path to logs within the project. Using an [code]user://[/code] path is recommended.
+ </member>
+ <member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5">
+ Specifies the maximum amount of log files allowed (used for rotation).
+ </member>
<member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false">
If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards.
</member>
@@ -381,7 +443,7 @@
<member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0">
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging.
If [member display/window/vsync/use_vsync] is enabled, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
- This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non real-time rendering of static frames, or test the project under lag conditions.
+ This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions.
</member>
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
@@ -401,10 +463,13 @@
<member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color( 1, 0.2, 0.1, 0.8 )">
Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
+ <member name="debug/shapes/collision/draw_2d_outlines" type="bool" setter="" getter="" default="true">
+ Sets whether 2D physics will display collision outlines in game when "Visible Collision Shapes" is enabled in the Debug menu.
+ </member>
<member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000">
Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
- <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.5 )">
+ <member name="debug/shapes/collision/shape_color" type="Color" setter="" getter="" default="Color( 0, 0.6, 0.7, 0.42 )">
Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
</member>
<member name="debug/shapes/navigation/disabled_geometry_color" type="Color" setter="" getter="" default="Color( 1, 0.7, 0.1, 0.4 )">
@@ -423,7 +488,7 @@
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
- If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
+ If [code]true[/code], allows HiDPI display on Windows, macOS, and the HTML5 platform. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
</member>
<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.
@@ -463,9 +528,6 @@
<member name="display/window/size/width" type="int" setter="" getter="" default="1024">
Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
</member>
- <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/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>
@@ -473,12 +535,18 @@
If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.)
[b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.
</member>
- <member name="editor/script_templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
- Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path.
+ <member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0">
+ When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
</member>
- <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
+ <member name="editor/node_naming/name_num_separator" type="int" setter="" getter="" default="0">
+ What to use to separate node name from number. This is mostly an editor setting.
+ </member>
+ <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( &quot;gd&quot;, &quot;shader&quot; )">
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
</member>
+ <member name="editor/script/templates_search_path" type="String" setter="" getter="" default="&quot;res://script_templates&quot;">
+ Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path.
+ </member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
@@ -513,6 +581,10 @@
Default [InputEventAction] to discard a modal or pending input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_copy" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_cut" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_down" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move down in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -521,6 +593,12 @@
Default [InputEventAction] to go to the end position of a [Control] (e.g. last item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_END] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_filedialog_refresh" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_filedialog_show_hidden" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_filedialog_up_one_level" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_focus_next" type="Dictionary" setter="" getter="">
Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -529,6 +607,10 @@
Default [InputEventAction] to focus the previous [Control] in the scene. The focus behavior can be configured via [member Control.focus_previous].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_graph_delete" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_graph_duplicate" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_home" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -537,6 +619,8 @@
Default [InputEventAction] to move left in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_menu" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_page_down" type="Dictionary" setter="" getter="">
Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -545,6 +629,10 @@
Default [InputEventAction] to go up a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEUP] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_paste" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_redo" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_right" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move right in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -553,10 +641,102 @@
Default [InputEventAction] to select an item in a [Control] (e.g. in an [ItemList] or a [Tree]).
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_swap_input_direction" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_backspace" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_down" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_left" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_page_up" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_right" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_up" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_completion_query" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_dedent" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_delete" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_delete_word" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_indent" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_newline" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_newline_above" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_newline_blank" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_select_all" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter="">
+ </member>
+ <member name="input/ui_undo" type="Dictionary" setter="" getter="">
+ </member>
<member name="input/ui_up" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move up in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
+ Specifies the tablet driver to use. If left empty, the default driver will be used.
+ </member>
+ <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter="">
+ Override for [member input_devices/pen_tablet/driver] on Windows.
+ </member>
<member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true">
If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen.
</member>
@@ -566,262 +746,377 @@
<member name="input_devices/pointing/ios/touch_delay" type="float" setter="" getter="" default="0.15">
Default delay for touch events. This only affects iOS devices.
</member>
+ <member name="internationalization/locale/fallback" type="String" setter="" getter="" default="&quot;en&quot;">
+ The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used.
+ </member>
+ <member name="internationalization/locale/test" type="String" setter="" getter="" default="&quot;&quot;">
+ If non-empty, this locale will be used when running the project from the editor.
+ </member>
+ <member name="internationalization/rendering/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="internationalization/rendering/text_driver" type="String" setter="" getter="" default="&quot;&quot;">
+ Specifies the [TextServer] to use. If left empty, the default will be used.
+ </member>
+ <member name="layer_names/2d_navigation/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 0. If left empty, the layer will display as "Layer 0".
+ </member>
+ <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1".
+ </member>
+ <member name="layer_names/2d_navigation/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10".
+ </member>
+ <member name="layer_names/2d_navigation/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11".
+ </member>
+ <member name="layer_names/2d_navigation/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12".
+ </member>
+ <member name="layer_names/2d_navigation/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13".
+ </member>
+ <member name="layer_names/2d_navigation/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14".
+ </member>
+ <member name="layer_names/2d_navigation/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15".
+ </member>
+ <member name="layer_names/2d_navigation/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16".
+ </member>
+ <member name="layer_names/2d_navigation/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17".
+ </member>
+ <member name="layer_names/2d_navigation/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18".
+ </member>
+ <member name="layer_names/2d_navigation/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19".
+ </member>
+ <member name="layer_names/2d_navigation/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2".
+ </member>
+ <member name="layer_names/2d_navigation/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3".
+ </member>
+ <member name="layer_names/2d_navigation/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4".
+ </member>
+ <member name="layer_names/2d_navigation/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5".
+ </member>
+ <member name="layer_names/2d_navigation/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6".
+ </member>
+ <member name="layer_names/2d_navigation/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7".
+ </member>
+ <member name="layer_names/2d_navigation/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8".
+ </member>
+ <member name="layer_names/2d_navigation/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9".
+ </member>
+ <member name="layer_names/2d_physics/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0".
+ </member>
<member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 1.
+ Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1".
</member>
<member name="layer_names/2d_physics/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 10.
+ Optional name for the 2D physics layer 10. If left empty, the layer will display as "Layer 10".
</member>
<member name="layer_names/2d_physics/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 11.
+ Optional name for the 2D physics layer 11. If left empty, the layer will display as "Layer 11".
</member>
<member name="layer_names/2d_physics/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 12.
+ Optional name for the 2D physics layer 12. If left empty, the layer will display as "Layer 12".
</member>
<member name="layer_names/2d_physics/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 13.
+ Optional name for the 2D physics layer 13. If left empty, the layer will display as "Layer 13".
</member>
<member name="layer_names/2d_physics/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 14.
+ Optional name for the 2D physics layer 14. If left empty, the layer will display as "Layer 14".
</member>
<member name="layer_names/2d_physics/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 15.
+ Optional name for the 2D physics layer 15. If left empty, the layer will display as "Layer 15".
</member>
<member name="layer_names/2d_physics/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 16.
+ Optional name for the 2D physics layer 16. If left empty, the layer will display as "Layer 16".
</member>
<member name="layer_names/2d_physics/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 17.
+ Optional name for the 2D physics layer 17. If left empty, the layer will display as "Layer 17".
</member>
<member name="layer_names/2d_physics/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 18.
+ Optional name for the 2D physics layer 18. If left empty, the layer will display as "Layer 18".
</member>
<member name="layer_names/2d_physics/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 19.
+ Optional name for the 2D physics layer 19. If left empty, the layer will display as "Layer 19".
</member>
<member name="layer_names/2d_physics/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 2.
- </member>
- <member name="layer_names/2d_physics/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 20.
+ Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2".
</member>
<member name="layer_names/2d_physics/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 3.
+ Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3".
</member>
<member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 4.
+ Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4".
</member>
<member name="layer_names/2d_physics/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 5.
+ Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5".
</member>
<member name="layer_names/2d_physics/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 6.
+ Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6".
</member>
<member name="layer_names/2d_physics/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 7.
+ Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7".
</member>
<member name="layer_names/2d_physics/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 8.
+ Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8".
</member>
<member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D physics layer 9.
+ Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9".
+ </member>
+ <member name="layer_names/2d_render/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0".
</member>
<member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 1.
+ Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1".
</member>
<member name="layer_names/2d_render/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 10.
+ Optional name for the 2D render layer 10. If left empty, the layer will display as "Layer 10".
</member>
<member name="layer_names/2d_render/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 11.
+ Optional name for the 2D render layer 11. If left empty, the layer will display as "Layer 11".
</member>
<member name="layer_names/2d_render/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 12.
+ Optional name for the 2D render layer 12. If left empty, the layer will display as "Layer 12".
</member>
<member name="layer_names/2d_render/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 13.
+ Optional name for the 2D render layer 13. If left empty, the layer will display as "Layer 13".
</member>
<member name="layer_names/2d_render/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 14.
+ Optional name for the 2D render layer 14. If left empty, the layer will display as "Layer 14".
</member>
<member name="layer_names/2d_render/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 15.
+ Optional name for the 2D render layer 15. If left empty, the layer will display as "Layer 15".
</member>
<member name="layer_names/2d_render/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 16.
+ Optional name for the 2D render layer 16. If left empty, the layer will display as "Layer 16".
</member>
<member name="layer_names/2d_render/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 17.
+ Optional name for the 2D render layer 17. If left empty, the layer will display as "Layer 17".
</member>
<member name="layer_names/2d_render/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 18.
+ Optional name for the 2D render layer 18. If left empty, the layer will display as "Layer 18".
</member>
<member name="layer_names/2d_render/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 19.
+ Optional name for the 2D render layer 19. If left empty, the layer will display as "Layer 19".
</member>
<member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 2.
- </member>
- <member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 20.
+ Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2".
</member>
<member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 3.
+ Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3".
</member>
<member name="layer_names/2d_render/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 4.
+ Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4".
</member>
<member name="layer_names/2d_render/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 5.
+ Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5".
</member>
<member name="layer_names/2d_render/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 6.
+ Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6".
</member>
<member name="layer_names/2d_render/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 7.
+ Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7".
</member>
<member name="layer_names/2d_render/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 8.
+ Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8".
</member>
<member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 2D render layer 9.
+ Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9".
+ </member>
+ <member name="layer_names/3d_navigation/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 0. If left empty, the layer will display as "Layer 0".
+ </member>
+ <member name="layer_names/3d_navigation/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1".
+ </member>
+ <member name="layer_names/3d_navigation/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 10. If left empty, the layer will display as "Layer 10".
+ </member>
+ <member name="layer_names/3d_navigation/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 11. If left empty, the layer will display as "Layer 11".
+ </member>
+ <member name="layer_names/3d_navigation/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 12. If left empty, the layer will display as "Layer 12".
+ </member>
+ <member name="layer_names/3d_navigation/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 13. If left empty, the layer will display as "Layer 13".
+ </member>
+ <member name="layer_names/3d_navigation/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 14. If left empty, the layer will display as "Layer 14".
+ </member>
+ <member name="layer_names/3d_navigation/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 15. If left empty, the layer will display as "Layer 15".
+ </member>
+ <member name="layer_names/3d_navigation/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 16. If left empty, the layer will display as "Layer 16".
+ </member>
+ <member name="layer_names/3d_navigation/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 17. If left empty, the layer will display as "Layer 17".
+ </member>
+ <member name="layer_names/3d_navigation/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 18. If left empty, the layer will display as "Layer 18".
+ </member>
+ <member name="layer_names/3d_navigation/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 19. If left empty, the layer will display as "Layer 19".
+ </member>
+ <member name="layer_names/3d_navigation/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2".
+ </member>
+ <member name="layer_names/3d_navigation/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3".
+ </member>
+ <member name="layer_names/3d_navigation/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4".
+ </member>
+ <member name="layer_names/3d_navigation/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5".
+ </member>
+ <member name="layer_names/3d_navigation/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6".
+ </member>
+ <member name="layer_names/3d_navigation/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7".
+ </member>
+ <member name="layer_names/3d_navigation/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8".
+ </member>
+ <member name="layer_names/3d_navigation/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9".
+ </member>
+ <member name="layer_names/3d_physics/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0".
</member>
<member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 1.
+ Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1".
</member>
<member name="layer_names/3d_physics/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 10.
+ Optional name for the 3D physics layer 10. If left empty, the layer will display as "Layer 10".
</member>
<member name="layer_names/3d_physics/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 11.
+ Optional name for the 3D physics layer 11. If left empty, the layer will display as "Layer 11".
</member>
<member name="layer_names/3d_physics/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 12.
+ Optional name for the 3D physics layer 12. If left empty, the layer will display as "Layer 12".
</member>
<member name="layer_names/3d_physics/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 13.
+ Optional name for the 3D physics layer 13. If left empty, the layer will display as "Layer 13".
</member>
<member name="layer_names/3d_physics/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 14.
+ Optional name for the 3D physics layer 14. If left empty, the layer will display as "Layer 14".
</member>
<member name="layer_names/3d_physics/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 15.
+ Optional name for the 3D physics layer 15. If left empty, the layer will display as "Layer 15".
</member>
<member name="layer_names/3d_physics/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 16.
+ Optional name for the 3D physics layer 16. If left empty, the layer will display as "Layer 16".
</member>
<member name="layer_names/3d_physics/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 17.
+ Optional name for the 3D physics layer 17. If left empty, the layer will display as "Layer 17".
</member>
<member name="layer_names/3d_physics/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 18.
+ Optional name for the 3D physics layer 18. If left empty, the layer will display as "Layer 18".
</member>
<member name="layer_names/3d_physics/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 19.
+ Optional name for the 3D physics layer 19. If left empty, the layer will display as "Layer 19".
</member>
<member name="layer_names/3d_physics/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 2.
- </member>
- <member name="layer_names/3d_physics/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 20.
+ Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2".
</member>
<member name="layer_names/3d_physics/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 3.
+ Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3".
</member>
<member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 4.
+ Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4".
</member>
<member name="layer_names/3d_physics/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 5.
+ Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5".
</member>
<member name="layer_names/3d_physics/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 6.
+ Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6".
</member>
<member name="layer_names/3d_physics/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 7.
+ Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7".
</member>
<member name="layer_names/3d_physics/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 8.
+ Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8".
</member>
<member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D physics layer 9.
+ Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9".
+ </member>
+ <member name="layer_names/3d_render/layer_0" type="String" setter="" getter="" default="&quot;&quot;">
+ Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0".
</member>
<member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 1.
+ Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1".
</member>
<member name="layer_names/3d_render/layer_10" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 10.
+ Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10".
</member>
<member name="layer_names/3d_render/layer_11" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 11.
+ Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11".
</member>
<member name="layer_names/3d_render/layer_12" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 12.
+ Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12".
</member>
<member name="layer_names/3d_render/layer_13" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 13.
+ Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13".
</member>
<member name="layer_names/3d_render/layer_14" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 14
+ Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14"
</member>
<member name="layer_names/3d_render/layer_15" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 15.
+ Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15".
</member>
<member name="layer_names/3d_render/layer_16" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 16.
+ Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16".
</member>
<member name="layer_names/3d_render/layer_17" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 17.
+ Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17".
</member>
<member name="layer_names/3d_render/layer_18" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 18.
+ Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18".
</member>
<member name="layer_names/3d_render/layer_19" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 19.
+ Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19".
</member>
<member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 2.
- </member>
- <member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 20.
+ Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2".
</member>
<member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 3.
+ Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3".
</member>
<member name="layer_names/3d_render/layer_4" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 4.
+ Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4".
</member>
<member name="layer_names/3d_render/layer_5" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 5.
+ Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5".
</member>
<member name="layer_names/3d_render/layer_6" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 6.
+ Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6".
</member>
<member name="layer_names/3d_render/layer_7" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 7.
+ Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7".
</member>
<member name="layer_names/3d_render/layer_8" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 8.
+ Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8".
</member>
<member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default="&quot;&quot;">
- Optional name for the 3D render layer 9.
- </member>
- <member name="locale/fallback" type="String" setter="" getter="" default="&quot;en&quot;">
- The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used.
- </member>
- <member name="locale/test" type="String" setter="" getter="" default="&quot;&quot;">
- If non-empty, this locale will be used when running the project from the editor.
- </member>
- <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false">
- If [code]true[/code], logs all output to files.
- </member>
- <member name="logging/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true">
- </member>
- <member name="logging/file_logging/log_path" type="String" setter="" getter="" default="&quot;user://logs/godot.log&quot;">
- Path to logs within the project. Using an [code]user://[/code] path is recommended.
- </member>
- <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5">
- Specifies the maximum amount of log files allowed (used for rotation).
+ Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9".
</member>
<member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256">
</member>
@@ -845,6 +1140,18 @@
</member>
<member name="mono/unhandled_exception_policy" type="int" setter="" getter="" default="0">
</member>
+ <member name="navigation/2d/default_cell_size" type="int" setter="" getter="" default="10">
+ Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size].
+ </member>
+ <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="5">
+ Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin].
+ </member>
+ <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.3">
+ Default cell size for 3D navigation maps. See [method NavigationServer3D.map_set_cell_size].
+ </member>
+ <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="5.0">
+ Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin].
+ </member>
<member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768">
Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
</member>
@@ -858,7 +1165,7 @@
Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
</member>
<member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16">
- Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped.
+ Default size of packet peer stream for deserializing Godot data (in bytes, specified as a power of two). The default value [code]16[/code] is equal to 65,536 bytes. Over this size, data is dropped.
</member>
<member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30">
Timeout (in seconds) for connection attempts using TCP.
@@ -876,12 +1183,6 @@
The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used.
If in doubt, leave this setting empty.
</member>
- <member name="node/name_casing" type="int" setter="" getter="" default="0">
- When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
- </member>
- <member name="node/name_num_separator" type="int" setter="" getter="" default="0">
- What to use to separate node name from number. This is mostly an editor setting.
- </member>
<member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096">
Size of the hash table used for the broad-phase 2D hash grid algorithm.
</member>
@@ -895,18 +1196,30 @@
<member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98">
The default gravity strength in 2D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Set the default gravity strength to 98.
- PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY, 98)
- [/codeblock]
+ PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98)
+ [/gdscript]
+ [csharp]
+ // Set the default gravity strength to 98.
+ PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98);
+ [/csharp]
+ [/codeblocks]
</member>
<member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )">
The default gravity direction in 2D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Set the default gravity direction to `Vector2(0, 1)`.
- PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1))
- [/codeblock]
+ PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2.DOWN)
+ [/gdscript]
+ [csharp]
+ // Set the default gravity direction to `Vector2(0, 1)`.
+ PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.GravityVector, Vector2.Down)
+ [/csharp]
+ [/codeblocks]
</member>
<member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1">
The default linear damp in 2D.
@@ -919,22 +1232,18 @@
Sets which physics engine to use for 2D physics.
"DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented.
</member>
+ <member name="physics/2d/run_on_thread" type="bool" setter="" getter="" default="false">
+ Sets whether 2D physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
+ </member>
<member name="physics/2d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626">
Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD].
</member>
<member name="physics/2d/sleep_threshold_linear" type="float" setter="" getter="" default="2.0">
Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
</member>
- <member name="physics/2d/thread_model" type="int" setter="" getter="" default="1">
- Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
- [b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it.
- </member>
<member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5">
Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP].
</member>
- <member name="physics/3d/active_soft_world" type="bool" setter="" getter="" default="true">
- Sets whether the 3D physics world will be created with support for [SoftBody3D] physics. Only applies to the Bullet physics engine.
- </member>
<member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1">
The default angular damp in 3D.
[b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration.
@@ -942,18 +1251,30 @@
<member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8">
The default gravity strength in 3D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Set the default gravity strength to 9.8.
- PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8)
- [/codeblock]
+ PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8)
+ [/gdscript]
+ [csharp]
+ // Set the default gravity strength to 9.8.
+ PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8);
+ [/csharp]
+ [/codeblocks]
</member>
<member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )">
The default gravity direction in 3D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Set the default gravity direction to `Vector3(0, -1, 0)`.
- PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0))
- [/codeblock]
+ PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN)
+ [/gdscript]
+ [csharp]
+ // Set the default gravity direction to `Vector3(0, -1, 0)`.
+ PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down)
+ [/csharp]
+ [/codeblocks]
</member>
<member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1">
The default linear damp in 3D.
@@ -963,6 +1284,15 @@
Sets which physics engine to use for 3D physics.
"DEFAULT" is currently the [url=https://bulletphysics.org]Bullet[/url] physics engine. The "GodotPhysics3D" engine is still supported as an alternative.
</member>
+ <member name="physics/3d/run_on_thread" type="bool" setter="" getter="" default="false">
+ Sets whether 3D physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
+ </member>
+ <member name="physics/3d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626">
+ </member>
+ <member name="physics/3d/sleep_threshold_linear" type="float" setter="" getter="" default="0.1">
+ </member>
+ <member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5">
+ </member>
<member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true">
Enables [member Viewport.physics_object_picking] on the root viewport.
</member>
@@ -974,242 +1304,269 @@
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
</member>
- <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
- Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
+ <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1">
</member>
- <member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
- [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
+ <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1">
</member>
- <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
+ <member name="rendering/2d/shadow_atlas/size" type="int" setter="" getter="" default="2048">
</member>
- <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
+ <member name="rendering/2d/snap/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512">
+ <member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
+ <member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0">
+ Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
</member>
- <member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
+ <member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0">
+ Sets the screen-space antialiasing mode for the default screen [Viewport]. 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.
+ Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
- <member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
+ <member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
+ <member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25">
</member>
- <member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
+ <member name="rendering/anti_aliasing/screen_space_roughness_limiter/enabled" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
+ <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18">
</member>
- <member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
+ <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
+ Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother.
</member>
- <member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
+ <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1">
+ Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute.
</member>
- <member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536">
+ <member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples.
</member>
- <member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15">
+ <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
+ Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
</member>
- <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000">
- Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
+ <member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
</member>
- <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
+ <member name="rendering/driver/driver_name" type="String" setter="" getter="" default="&quot;Vulkan&quot;">
+ The video driver to use (currently only "Vulkan" is implemented).
+ [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
+ [b]FIXME:[/b] No longer valid after DisplayServer split:
+ In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
</member>
- <member name="rendering/quality/2d/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false">
+ <member name="rendering/driver/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false">
</member>
- <member name="rendering/quality/2d/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false">
+ <member name="rendering/driver/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/quality/2d_shadow_atlas/size" type="int" setter="" getter="" default="2048">
+ <member name="rendering/driver/threads/thread_model" type="int" setter="" getter="" default="1">
+ Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
</member>
- <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
- Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother.
+ <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )">
+ Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color].
</member>
- <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1">
- Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute.
+ <member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
+ [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
</member>
- <member name="rendering/quality/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false">
- If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples.
+ <member name="rendering/environment/glow/upscale_mode" type="int" setter="" getter="" default="1">
+ Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth.
</member>
- <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default="&quot;PowerVR,Mali,Adreno,Apple&quot;">
- Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
+ <member name="rendering/environment/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/environment/glow/upscale_mode] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/depth_prepass/enable" type="bool" setter="" getter="" default="true">
- If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
+ <member name="rendering/environment/glow/use_high_quality" type="bool" setter="" getter="" default="false">
+ Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long.
</member>
- <member name="rendering/quality/directional_shadow/size" type="int" setter="" getter="" default="4096">
- The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
+ <member name="rendering/environment/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1">
+ Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better.
</member>
- <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/environment/ssao/adaptive_target" type="float" setter="" getter="" default="0.5">
+ Quality target to use when [member rendering/environment/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/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2">
- Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ <member name="rendering/environment/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/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/quality/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/environment/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/driver/driver_name" type="String" setter="" getter="" default="&quot;Vulkan&quot;">
- The video driver to use ("GLES2" or "Vulkan").
- [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
- [b]FIXME:[/b] No longer valid after DisplayServer split:
- In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
+ <member name="rendering/environment/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/environment/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/environment/ssao/half_size.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/environment/ssao/half_size] on mobile devices, due to performance concerns.
+ </member>
+ <member name="rendering/environment/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/environment/ssao/adaptive_target] setting.
+ </member>
+ <member name="rendering/environment/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.
+ </member>
+ <member name="rendering/environment/subsurface_scattering/subsurface_scattering_quality" type="int" setter="" getter="" default="1">
+ Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer.
+ </member>
+ <member name="rendering/environment/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05">
+ Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light.
+ </member>
+ <member name="rendering/environment/volumetric_fog/use_filter" type="int" setter="" getter="" default="1">
</member>
- <member name="rendering/quality/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
+ <member name="rendering/environment/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128">
+ </member>
+ <member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false">
+ </member>
+ <member name="rendering/global_illumination/gi_probes/anisotropic" type="bool" setter="" getter="" default="false">
If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction.
</member>
- <member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1">
+ <member name="rendering/global_illumination/gi_probes/quality" type="int" setter="" getter="" default="1">
Sets the number of cone samples taken when rendering objects affected by [GIProbe]s.
</member>
- <member name="rendering/quality/glow/upscale_mode" type="int" setter="" getter="" default="1">
- Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth.
+ <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4">
</member>
- <member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
- Lower-end override for [member rendering/quality/glow/upscale_mode] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2">
</member>
- <member name="rendering/quality/glow/use_high_quality" type="bool" setter="" getter="" default="false">
- Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long.
+ <member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1">
</member>
- <member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2">
- Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
+ <member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
</member>
- <member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3">
- Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
</member>
- <member name="rendering/quality/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64">
- Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM.
+ <member name="rendering/lightmapping/bake_performance/region_size" type="int" setter="" getter="" default="512">
</member>
- <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256">
- Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower.
+ <member name="rendering/lightmapping/bake_quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
</member>
- <member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128">
- Lower-end override for [member rendering/quality/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/lightmapping/bake_quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
</member>
- <member name="rendering/quality/reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false">
- Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed.
+ <member name="rendering/lightmapping/bake_quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
</member>
- <member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024">
- Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail.
+ <member name="rendering/lightmapping/bake_quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
</member>
- <member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128">
- Lower-end override for [member rendering/quality/reflections/ggx_samples] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/lightmapping/bake_quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
</member>
- <member name="rendering/quality/reflections/roughness_layers" type="int" setter="" getter="" default="8">
- Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM.
+ <member name="rendering/lightmapping/bake_quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
</member>
- <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true">
- If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/quality/reflections/roughness_layers] times more memory.
+ <member name="rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
</member>
- <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
- Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
</member>
- <member name="rendering/quality/screen_filters/msaa" type="int" setter="" getter="" default="0">
- Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
- [b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend.
+ <member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15">
</member>
- <member name="rendering/quality/screen_filters/screen_space_aa" type="int" setter="" getter="" default="0">
- Sets the screen-space antialiasing mode for the default screen [Viewport]. 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.
- Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter_enabled].
+ <member name="rendering/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512">
</member>
- <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_amount" type="float" setter="" getter="" default="0.25">
+ <member name="rendering/limits/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500">
</member>
- <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_enabled" type="bool" setter="" getter="" default="true">
+ <member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536">
</member>
- <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_limit" type="float" setter="" getter="" default="0.18">
+ <member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000">
</member>
- <member name="rendering/quality/screen_filters/use_debanding" type="bool" setter="" getter="" default="false">
+ <member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10">
</member>
- <member name="rendering/quality/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1">
- Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better.
+ <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600">
</member>
- <member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
+ <member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0">
</member>
- <member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true">
- Lower-end override for [member rendering/quality/shading/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/reflections/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64">
+ Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM.
</member>
- <member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley.
+ <member name="rendering/reflections/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256">
+ Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower.
</member>
- <member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true">
- Lower-end override for [member rendering/quality/shading/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/reflections/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128">
+ Lower-end override for [member rendering/reflections/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter="" default="false">
- If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices.
+ <member name="rendering/reflections/sky_reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false">
+ Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed.
</member>
- <member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true">
- Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/reflections/sky_reflections/ggx_samples" type="int" setter="" getter="" default="1024">
+ Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail.
</member>
- <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ <member name="rendering/reflections/sky_reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128">
+ Lower-end override for [member rendering/reflections/sky_reflections/ggx_samples] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ <member name="rendering/reflections/sky_reflections/roughness_layers" type="int" setter="" getter="" default="8">
+ Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM.
</member>
- <member name="rendering/quality/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ <member name="rendering/reflections/sky_reflections/texture_array_reflections" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/reflections/sky_reflections/roughness_layers] times more memory.
</member>
- <member name="rendering/quality/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4">
- Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
+ <member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false">
+ Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shadow_atlas/size" type="int" setter="" getter="" default="4096">
- Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
+ <member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
</member>
- <member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
- Lower-end override for [member rendering/quality/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
+ <member name="rendering/shading/overrides/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/shading/overrides/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
- Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
+ <member name="rendering/shading/overrides/force_lambert_over_burley" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley.
</member>
- <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 name="rendering/shading/overrides/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/shading/overrides/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support.
</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 name="rendering/shading/overrides/force_vertex_shading" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices.
</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/shading/overrides/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true">
+ Lower-end override for [member rendering/shading/overrides/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
</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.
+ <member name="rendering/shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/quality/subsurface_scattering/subsurface_scattering_quality" type="int" setter="" getter="" default="1">
- Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer.
+ <member name="rendering/shadows/directional_shadow/size" type="int" setter="" getter="" default="4096">
+ The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
</member>
- <member name="rendering/quality/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05">
- Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light.
+ <member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/quality/texture_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2">
- Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
+ <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
</member>
- <member name="rendering/quality/texture_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
+ <member name="rendering/shadows/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/sdfgi/frames_to_converge" type="int" setter="" getter="" default="1">
+ <member name="rendering/shadows/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true">
</member>
- <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2">
+ <member name="rendering/shadows/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1">
- Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
+ <member name="rendering/shadows/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/volumetric_fog/directional_shadow_shrink" type="int" setter="" getter="" default="512">
+ <member name="rendering/shadows/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/volumetric_fog/positional_shadow_shrink" type="int" setter="" getter="" default="512">
+ <member name="rendering/shadows/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4">
+ Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
</member>
- <member name="rendering/volumetric_fog/use_filter" type="int" setter="" getter="" default="0">
+ <member name="rendering/shadows/shadow_atlas/size" type="int" setter="" getter="" default="4096">
+ Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
+ </member>
+ <member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
+ Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
+ </member>
+ <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
+ Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
</member>
- <member name="rendering/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128">
+ <member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
+ Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
</member>
- <member name="rendering/volumetric_fog/volume_size" type="int" setter="" getter="" default="64">
+ <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2">
+ Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled.
+ </member>
+ <member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false">
+ If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
</member>
- <member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
+ <member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer.
</member>
- <member name="rendering/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
+ <member name="rendering/textures/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
</member>
- <member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
+ <member name="rendering/textures/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
</member>
- <member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
+ <member name="rendering/textures/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
</member>
- <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
+ <member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
</member>
<member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
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..1c0a3e37c0 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -83,7 +83,7 @@
Constructs a quaternion defined by the given values.
</description>
</method>
- <method name="cubic_slerp">
+ <method name="cubic_slerp" qualifiers="const">
<return type="Quat">
</return>
<argument index="0" name="b" type="Quat">
@@ -92,13 +92,13 @@
</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">
+ <method name="dot" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Quat">
@@ -107,51 +107,51 @@
Returns the dot product of two quaternions.
</description>
</method>
- <method name="get_euler">
+ <method name="get_euler" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
</description>
</method>
- <method name="inverse">
+ <method name="inverse" qualifiers="const">
<return type="Quat">
</return>
<description>
Returns the inverse of the quaternion.
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="to" type="Quat">
</argument>
<description>
- Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="is_normalized">
+ <method name="is_normalized" qualifiers="const">
<return type="bool">
</return>
<description>
Returns whether the quaternion is normalized or not.
</description>
</method>
- <method name="length">
+ <method name="length" qualifiers="const">
<return type="float">
</return>
<description>
Returns the length of the quaternion.
</description>
</method>
- <method name="length_squared">
+ <method name="length_squared" qualifiers="const">
<return type="float">
</return>
<description>
Returns the length of the quaternion, squared.
</description>
</method>
- <method name="normalized">
+ <method name="normalized" qualifiers="const">
<return type="Quat">
</return>
<description>
@@ -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>
@@ -250,24 +258,24 @@
<description>
</description>
</method>
- <method name="slerp">
+ <method name="slerp" qualifiers="const">
<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].
[b]Note:[/b] Both quaternions must be normalized.
</description>
</method>
- <method name="slerpni">
+ <method name="slerpni" qualifiers="const">
<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/RID.xml b/doc/classes/RID.xml
index 0ee34d4194..e686a4b8fd 100644
--- a/doc/classes/RID.xml
+++ b/doc/classes/RID.xml
@@ -25,7 +25,7 @@
Constructs a [RID] as a copy of the given [RID].
</description>
</method>
- <method name="get_id">
+ <method name="get_id" qualifiers="const">
<return type="int">
</return>
<description>
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/RayCast3D.xml b/doc/classes/RayCast3D.xml
index d24e86a08b..443890438f 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -136,6 +136,13 @@
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
</member>
+ <member name="debug_shape_custom_color" type="Color" setter="set_debug_shape_custom_color" getter="get_debug_shape_custom_color" default="Color( 0, 0, 0, 1 )">
+ The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something.
+ If set to [code]Color(0.0, 0.0, 0.0)[/code] (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used.
+ </member>
+ <member name="debug_shape_thickness" type="float" setter="set_debug_shape_thickness" getter="get_debug_shape_thickness" default="2.0">
+ If set to [code]1[/code], a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [RayCast3D]. Requires [b]Visible Collision Shapes[/b] to be enabled in the [b]Debug[/b] menu for the debug shape to be visible at run-time.
+ </member>
<member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true">
If [code]true[/code], collisions will be reported.
</member>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 02a77a0e24..352a18e326 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -65,23 +65,14 @@
Constructs a [Rect2] by x, y, width, and height.
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Rect2">
</return>
<description>
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">
- <return type="Rect2">
- </return>
- <argument index="0" name="b" type="Rect2">
- </argument>
- <description>
- Returns the intersection of this [Rect2] and b.
- </description>
- </method>
- <method name="encloses">
+ <method name="encloses" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="b" type="Rect2">
@@ -90,7 +81,7 @@
Returns [code]true[/code] if this [Rect2] completely encloses another one.
</description>
</method>
- <method name="expand">
+ <method name="expand" qualifiers="const">
<return type="Rect2">
</return>
<argument index="0" name="to" type="Vector2">
@@ -99,23 +90,23 @@
Returns this [Rect2] expanded to include a given point.
</description>
</method>
- <method name="get_area">
+ <method name="get_area" qualifiers="const">
<return type="float">
</return>
<description>
Returns the area of the [Rect2].
</description>
</method>
- <method name="grow">
+ <method name="grow" qualifiers="const">
<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">
+ <method name="grow_individual" qualifiers="const">
<return type="Rect2">
</return>
<argument index="0" name="left" type="float">
@@ -127,28 +118,28 @@
<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" qualifiers="const">
<return type="Rect2">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="side" type="int">
</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">
+ <method name="has_no_area" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [Rect2] is flat or empty.
</description>
</method>
- <method name="has_point">
+ <method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="point" type="Vector2">
@@ -157,7 +148,17 @@
Returns [code]true[/code] if the [Rect2] contains a point.
</description>
</method>
- <method name="intersects">
+ <method name="intersection" qualifiers="const">
+ <return type="Rect2">
+ </return>
+ <argument index="0" name="b" type="Rect2">
+ </argument>
+ <description>
+ 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="intersects" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="b" type="Rect2">
@@ -169,7 +170,7 @@
If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="rect" type="Rect2">
@@ -178,7 +179,7 @@
Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
- <method name="merge">
+ <method name="merge" qualifiers="const">
<return type="Rect2">
</return>
<argument index="0" name="b" type="Rect2">
@@ -220,7 +221,7 @@
Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )">
- Size from [member position] to [member end]. Typically all components are positive.
+ Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index e8b75a6ac6..84bef9b406 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -63,23 +63,14 @@
Constructs a [Rect2i] by x, y, width, and height.
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Rect2i">
</return>
<description>
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">
- <return type="Rect2i">
- </return>
- <argument index="0" name="b" type="Rect2i">
- </argument>
- <description>
- Returns the intersection of this [Rect2i] and b.
- </description>
- </method>
- <method name="encloses">
+ <method name="encloses" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="b" type="Rect2i">
@@ -88,7 +79,7 @@
Returns [code]true[/code] if this [Rect2i] completely encloses another one.
</description>
</method>
- <method name="expand">
+ <method name="expand" qualifiers="const">
<return type="Rect2i">
</return>
<argument index="0" name="to" type="Vector2i">
@@ -97,23 +88,23 @@
Returns this [Rect2i] expanded to include a given point.
</description>
</method>
- <method name="get_area">
+ <method name="get_area" qualifiers="const">
<return type="int">
</return>
<description>
Returns the area of the [Rect2i].
</description>
</method>
- <method name="grow">
+ <method name="grow" qualifiers="const">
<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">
+ <method name="grow_individual" qualifiers="const">
<return type="Rect2i">
</return>
<argument index="0" name="left" type="int">
@@ -125,28 +116,28 @@
<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" qualifiers="const">
<return type="Rect2i">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="side" type="int">
</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">
+ <method name="has_no_area" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the [Rect2i] is flat or empty.
</description>
</method>
- <method name="has_point">
+ <method name="has_point" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="point" type="Vector2i">
@@ -155,7 +146,17 @@
Returns [code]true[/code] if the [Rect2i] contains a point.
</description>
</method>
- <method name="intersects">
+ <method name="intersection" qualifiers="const">
+ <return type="Rect2i">
+ </return>
+ <argument index="0" name="b" type="Rect2i">
+ </argument>
+ <description>
+ 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="intersects" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="b" type="Rect2i">
@@ -165,7 +166,7 @@
If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection.
</description>
</method>
- <method name="merge">
+ <method name="merge" qualifiers="const">
<return type="Rect2i">
</return>
<argument index="0" name="b" type="Rect2i">
@@ -199,7 +200,7 @@
Beginning corner. Typically has values lower than [member end].
</member>
<member name="size" type="Vector2i" setter="" getter="" default="Vector2i( 0, 0 )">
- Size from [member position] to [member end]. Typically all components are positive.
+ Size from [member position] to [member end]. Typically, all components are positive.
If the size is negative, you can use [method abs] to fix it.
</member>
</members>
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/Reference.xml b/doc/classes/Reference.xml
index 9c3d1d5d9d..724d2db924 100644
--- a/doc/classes/Reference.xml
+++ b/doc/classes/Reference.xml
@@ -5,8 +5,9 @@
</brief_description>
<description>
Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class.
- Unlike [Object]s, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
+ Unlike other [Object] types, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free].
In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused.
+ [b]Note:[/b] In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed.
</description>
<tutorials>
<link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link>
diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml
index 5458b496da..cd08778c89 100644
--- a/doc/classes/ReflectionProbe.xml
+++ b/doc/classes/ReflectionProbe.xml
@@ -37,6 +37,8 @@
<member name="interior" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false">
If [code]true[/code], reflections will ignore sky contribution.
</member>
+ <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ </member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
Sets the max distance away from the probe an object can be before it is culled.
</member>
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 7e5df9c40d..841d2bde72 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -7,6 +7,30 @@
<tutorials>
</tutorials>
<methods>
+ <method name="barrier">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="int" default="7">
+ </argument>
+ <argument index="1" name="to" type="int" default="7">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="buffer_clear">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="buffer" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="int">
+ </argument>
+ <argument index="2" name="size_bytes" type="int">
+ </argument>
+ <argument index="3" name="post_barrier" type="int" default="7">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="buffer_get_data">
<return type="PackedByteArray">
</return>
@@ -26,7 +50,7 @@
</argument>
<argument index="3" name="data" type="PackedByteArray">
</argument>
- <argument index="4" name="sync_with_draw" type="bool" default="true">
+ <argument index="4" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -36,8 +60,6 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="sync_to_draw" type="bool">
- </argument>
<description>
</description>
</method>
@@ -52,6 +74,8 @@
<method name="compute_list_begin">
<return type="int">
</return>
+ <argument index="0" name="allow_draw_overlap" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
@@ -94,6 +118,8 @@
<method name="compute_list_end">
<return type="void">
</return>
+ <argument index="0" name="post_barrier" type="int" default="7">
+ </argument>
<description>
</description>
</method>
@@ -131,6 +157,32 @@
<description>
</description>
</method>
+ <method name="draw_command_begin_label">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="draw_command_end_label">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="draw_command_insert_label">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="draw_list_begin">
<return type="int">
</return>
@@ -272,6 +324,8 @@
<method name="draw_list_end">
<return type="void">
</return>
+ <argument index="0" name="post_barrier" type="int" default="7">
+ </argument>
<description>
</description>
</method>
@@ -302,7 +356,9 @@
</return>
<argument index="0" name="size" type="Vector2i">
</argument>
- <argument index="1" name="validate_with_format" type="int" default="-1">
+ <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0">
+ </argument>
+ <argument index="2" name="validate_with_format" type="int" default="-1">
</argument>
<description>
</description>
@@ -318,7 +374,7 @@
<method name="framebuffer_format_create_empty">
<return type="int">
</return>
- <argument index="0" name="size" type="Vector2i">
+ <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0">
</argument>
<description>
</description>
@@ -347,6 +403,12 @@
<description>
</description>
</method>
+ <method name="full_barrier">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_captured_timestamp_cpu_time" qualifiers="const">
<return type="int">
</return>
@@ -383,6 +445,24 @@
<description>
</description>
</method>
+ <method name="get_device_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_device_pipeline_cache_uuid" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_device_vendor_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_frame_delay" qualifiers="const">
<return type="int">
</return>
@@ -410,7 +490,7 @@
</argument>
<argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )">
</argument>
- <argument index="3" name="arg3" type="bool" default="false">
+ <argument index="3" name="use_restart_indices" type="bool" default="false">
</argument>
<description>
</description>
@@ -485,6 +565,16 @@
<description>
</description>
</method>
+ <method name="set_resource_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="RID">
+ </argument>
+ <argument index="1" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="shader_compile_from_source">
<return type="RDShaderBytecode">
</return>
@@ -562,7 +652,7 @@
</argument>
<argument index="5" name="layer_count" type="int">
</argument>
- <argument index="6" name="sync_with_draw" type="bool" default="false">
+ <argument index="6" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -588,7 +678,7 @@
</argument>
<argument index="8" name="dst_layer" type="int">
</argument>
- <argument index="9" name="sync_with_draw" type="bool" default="false">
+ <argument index="9" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -674,7 +764,7 @@
</argument>
<argument index="1" name="to_texture" type="RID">
</argument>
- <argument index="2" name="sync_with_draw" type="bool" default="false">
+ <argument index="2" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -688,7 +778,7 @@
</argument>
<argument index="2" name="data" type="PackedByteArray">
</argument>
- <argument index="3" name="sync_with_draw" type="bool" default="false">
+ <argument index="3" name="post_barrier" type="int" default="7">
</argument>
<description>
</description>
@@ -730,6 +820,8 @@
</argument>
<argument index="1" name="data" type="PackedByteArray" default="PackedByteArray( )">
</argument>
+ <argument index="2" name="use_as_storage" type="bool" default="false">
+ </argument>
<description>
</description>
</method>
@@ -743,6 +835,16 @@
</method>
</methods>
<constants>
+ <constant name="BARRIER_MASK_RASTER" value="1">
+ </constant>
+ <constant name="BARRIER_MASK_COMPUTE" value="2">
+ </constant>
+ <constant name="BARRIER_MASK_TRANSFER" value="4">
+ </constant>
+ <constant name="BARRIER_MASK_ALL" value="7">
+ </constant>
+ <constant name="BARRIER_MASK_NO_BARRIER" value="8">
+ </constant>
<constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat">
</constant>
<constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat">
@@ -1505,13 +1607,17 @@
</constant>
<constant name="INITIAL_ACTION_CLEAR" value="0" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_KEEP" value="1" enum="InitialAction">
+ <constant name="INITIAL_ACTION_CLEAR_REGION" value="1" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_CLEAR_REGION_CONTINUE" value="2" enum="InitialAction">
+ </constant>
+ <constant name="INITIAL_ACTION_KEEP" value="3" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_DROP" value="2" enum="InitialAction">
+ <constant name="INITIAL_ACTION_DROP" value="4" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_CONTINUE" value="3" enum="InitialAction">
+ <constant name="INITIAL_ACTION_CONTINUE" value="5" enum="InitialAction">
</constant>
- <constant name="INITIAL_ACTION_MAX" value="4" enum="InitialAction">
+ <constant name="INITIAL_ACTION_MAX" value="6" enum="InitialAction">
</constant>
<constant name="FINAL_ACTION_READ" value="0" enum="FinalAction">
</constant>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 5830a8452c..f82301bcf4 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -10,7 +10,7 @@
Resources are created using the [code]*_create[/code] functions.
All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas].
In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any [Node3D] node with [method Node3D.get_world_3d]. Otherwise, a scenario can be created with [method scenario_create].
- Similarly in 2D, a canvas is needed to draw all canvas items.
+ Similarly, in 2D, a canvas is needed to draw all canvas items.
In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
</description>
@@ -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="detail" type="float">
</argument>
- <argument index="5" name="light_affect" type="float">
+ <argument index="6" name="horizon" type="float">
</argument>
- <argument index="6" name="ao_channel_affect" type="float">
+ <argument index="7" name="sharpness" type="float">
</argument>
- <argument index="7" name="blur" type="int" enum="RenderingServer.EnvironmentSSAOBlur">
+ <argument index="8" name="light_affect" type="float">
</argument>
- <argument index="8" name="bilateral_sharpness" type="float">
+ <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">
@@ -865,6 +859,12 @@
Tries to free an object in the RenderingServer.
</description>
</method>
+ <method name="get_frame_setup_time_cpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_render_info">
<return type="int">
</return>
@@ -1292,7 +1292,7 @@
<argument index="1" name="margin" type="float">
</argument>
<description>
- Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin].
+ Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin].
</description>
</method>
<method name="instance_set_layer_mask">
@@ -1360,7 +1360,7 @@
<argument index="1" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -1372,7 +1372,7 @@
<argument index="1" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -1386,7 +1386,7 @@
<argument index="2" name="scenario" type="RID">
</argument>
<description>
- Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
+ Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update.
[b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision.
</description>
</method>
@@ -1423,6 +1423,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>
@@ -1509,7 +1520,7 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face].
+ If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face].
</description>
</method>
<method name="light_set_shadow">
@@ -1612,25 +1623,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 +1721,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">
@@ -1796,7 +1802,7 @@
Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh.
</description>
</method>
- <method name="multimesh_allocate">
+ <method name="multimesh_allocate_data">
<return type="void">
</return>
<argument index="0" name="multimesh" type="RID">
@@ -2198,7 +2204,7 @@
<argument index="1" name="time" type="float">
</argument>
<description>
- Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess].
+ Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess].
</description>
</method>
<method name="particles_set_process_material">
@@ -2543,7 +2549,7 @@
Sets a shader's default texture. Overwrites the texture given by name.
</description>
</method>
- <method name="skeleton_allocate">
+ <method name="skeleton_allocate_data">
<return type="void">
</return>
<argument index="0" name="skeleton" type="RID">
@@ -2553,7 +2559,6 @@
<argument index="2" name="is_2d_skeleton" type="bool" default="false">
</argument>
<description>
- Allocates the GPU buffers for this skeleton.
</description>
</method>
<method name="skeleton_bone_get_transform" qualifiers="const">
@@ -2699,11 +2704,14 @@
<description>
Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
- [codeblock]
+ FIXME: The method seems to be non-existent.
+ [codeblocks]
+ [gdscript]
func _ready():
get_viewport().set_attach_to_screen_rect(Rect2())
$Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
- [/codeblock]
+ [/gdscript]
+ [/codeblocks]
Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen].
</description>
</method>
@@ -2715,6 +2723,22 @@
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
</description>
</method>
+ <method name="viewport_get_measured_render_time_cpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="viewport_get_measured_render_time_gpu" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="viewport_get_render_info">
<return type="int">
</return>
@@ -2852,6 +2876,16 @@
Currently unimplemented in Godot 3.x.
</description>
</method>
+ <method name="viewport_set_measure_render_time">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="RID">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="viewport_set_msaa">
<return type="void">
</return>
@@ -2917,6 +2951,8 @@
</argument>
<argument index="1" name="size" type="int">
</argument>
+ <argument index="2" name="use_16_bits" type="bool" default="false">
+ </argument>
<description>
Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
</description>
@@ -3071,16 +3107,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 +3145,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.
@@ -3365,7 +3414,8 @@
Objects are displayed with only light information.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_OVERDRAW" value="3" enum="ViewportDebugDraw">
- Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others.
+ Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others.
+ [b]Note:[/b] When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore.
</constant>
<constant name="VIEWPORT_DEBUG_DRAW_WIREFRAME" value="4" enum="ViewportDebugDraw">
Debug draw draws objects in wireframe.
@@ -3405,7 +3455,7 @@
<constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw">
</constant>
<constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode">
- Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
+ Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples].
</constant>
<constant name="SKY_MODE_REALTIME" value="3" enum="SkyMode">
Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times.
@@ -3488,29 +3538,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 e79a2e0ea9..2548f8d911 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,7 +4,8 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Unlike [Object]s, they are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [Reference], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ [b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
<link title="Resources">https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link>
@@ -28,6 +29,19 @@
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
</description>
</method>
+ <method name="emit_changed">
+ <return type="void">
+ </return>
+ <description>
+ Emits the [signal changed] signal.
+ If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).
+ The method is equivalent to:
+ [codeblock]
+ emit_signal("changed")
+ [/codeblock]
+ [b]Note:[/b] This method is called automatically for built-in resources.
+ </description>
+ </method>
<method name="get_local_scene" qualifiers="const">
<return type="Node">
</return>
@@ -65,7 +79,7 @@
If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name" default="&quot;&quot;">
- The name of the resource. This is an optional identifier.
+ The name of the resource. This is an optional identifier. If [member resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [member resource_name] will be displayed as the tab name in the script editor.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path" default="&quot;&quot;">
The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.
@@ -75,6 +89,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/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index ad0c438f98..9943f644cf 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -6,7 +6,7 @@
<description>
Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine.
Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver].
- [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
+ [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
@@ -57,8 +57,13 @@
</argument>
<argument index="1" name="original_path" type="String">
</argument>
+ <argument index="2" name="use_sub_threads" type="bool">
+ </argument>
+ <argument index="3" name="cache_mode" type="int">
+ </argument>
<description>
Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure.
+ The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
<method name="rename_dependencies" qualifiers="virtual">
@@ -75,5 +80,11 @@
</method>
</methods>
<constants>
+ <constant name="CACHE_MODE_IGNORE" value="0" enum="CacheMode">
+ </constant>
+ <constant name="CACHE_MODE_REUSE" value="1" enum="CacheMode">
+ </constant>
+ <constant name="CACHE_MODE_REPLACE" value="2" enum="CacheMode">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 049613fa5d..c81b21333f 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">
@@ -58,13 +58,13 @@
</argument>
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
- <argument index="2" name="no_cache" type="bool" default="false">
+ <argument index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1">
</argument>
<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].
- 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.
+ 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].
+ The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
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.
</description>
@@ -127,5 +127,11 @@
<constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus">
The resource was loaded successfully and can be accessed via [method load_threaded_get].
</constant>
+ <constant name="CACHE_MODE_IGNORE" value="0" enum="CacheMode">
+ </constant>
+ <constant name="CACHE_MODE_REUSE" value="1" enum="CacheMode">
+ </constant>
+ <constant name="CACHE_MODE_REPLACE" value="2" enum="CacheMode">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 726b26fbc7..edab35f162 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -6,10 +6,16 @@
<description>
A custom effect for use with [RichTextLabel].
[b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script.
- [codeblock]
+ [codeblocks]
+ [gdscript]
# The RichTextEffect will be usable like this: `[example]Some text[/example]`
var bbcode = "example"
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // The RichTextEffect will be usable like this: `[example]Some text[/example]`
+ public string bbcode = "example";
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively.
</description>
<tutorials>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index faf0d97766..7ca70f5a7a 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -6,6 +6,7 @@
<description>
Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights.
[b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods.
+ [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
[b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property.
</description>
<tutorials>
@@ -25,6 +26,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.
@@ -67,7 +70,35 @@
<return type="int">
</return>
<description>
- Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line.
+ Returns the total number of lines in the text. Wrapped text is counted as multiple lines.
+ </description>
+ </method>
+ <method name="get_paragraph_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph.
+ </description>
+ </method>
+ <method name="get_selected_text" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the current selection text. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_from" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
+ </description>
+ </method>
+ <method name="get_selection_to" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes.
</description>
</method>
<method name="get_total_character_count" qualifiers="const">
@@ -91,6 +122,13 @@
Returns the number of visible lines.
</description>
</method>
+ <method name="get_visible_paragraph_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible.
+ </description>
+ </method>
<method name="install_effect">
<return type="void">
</return>
@@ -132,15 +170,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>
@@ -171,6 +200,27 @@
Adds a [code][color][/code] tag to the tag stack.
</description>
</method>
+ <method name="push_dropcap">
+ <return type="void">
+ </return>
+ <argument index="0" name="string" type="String">
+ </argument>
+ <argument index="1" name="font" type="Font">
+ </argument>
+ <argument index="2" name="size" type="int">
+ </argument>
+ <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ </argument>
+ <argument index="4" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <argument index="5" name="outline_size" type="int" default="0">
+ </argument>
+ <argument index="6" name="outline_color" type="Color" default="Color( 0, 0, 0, 0 )">
+ </argument>
+ <description>
+ Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
+ </description>
+ </method>
<method name="push_font">
<return type="void">
</return>
@@ -180,6 +230,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 +267,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 +300,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 +345,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 +377,55 @@
Scrolls the window's top line to match [code]line[/code].
</description>
</method>
+ <method name="scroll_to_paragraph">
+ <return type="void">
+ </return>
+ <argument index="0" name="paragraph" type="int">
+ </argument>
+ <description>
+ Scrolls the window's top line to match first line of the [code]paragraph[/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 +458,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 +481,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,8 +494,12 @@
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.
+ [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count].
</member>
</members>
<signals>
@@ -375,7 +544,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,69 +560,100 @@
</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_COLOR" value="7" enum="ItemType">
+ </constant>
+ <constant name="ITEM_OUTLINE_SIZE" value="8" enum="ItemType">
</constant>
- <constant name="ITEM_UNDERLINE" value="6" enum="ItemType">
+ <constant name="ITEM_OUTLINE_COLOR" value="9" enum="ItemType">
</constant>
- <constant name="ITEM_STRIKETHROUGH" value="7" enum="ItemType">
+ <constant name="ITEM_UNDERLINE" value="10" enum="ItemType">
</constant>
- <constant name="ITEM_ALIGN" value="8" enum="ItemType">
+ <constant name="ITEM_STRIKETHROUGH" value="11" enum="ItemType">
</constant>
- <constant name="ITEM_INDENT" value="9" enum="ItemType">
+ <constant name="ITEM_PARAGRAPH" value="12" enum="ItemType">
</constant>
- <constant name="ITEM_LIST" value="10" enum="ItemType">
+ <constant name="ITEM_INDENT" value="13" enum="ItemType">
</constant>
- <constant name="ITEM_TABLE" value="11" enum="ItemType">
+ <constant name="ITEM_LIST" value="14" enum="ItemType">
</constant>
- <constant name="ITEM_FADE" value="12" enum="ItemType">
+ <constant name="ITEM_TABLE" value="15" enum="ItemType">
</constant>
- <constant name="ITEM_SHAKE" value="13" enum="ItemType">
+ <constant name="ITEM_FADE" value="16" enum="ItemType">
</constant>
- <constant name="ITEM_WAVE" value="14" enum="ItemType">
+ <constant name="ITEM_SHAKE" value="17" enum="ItemType">
</constant>
- <constant name="ITEM_TORNADO" value="15" enum="ItemType">
+ <constant name="ITEM_WAVE" value="18" enum="ItemType">
</constant>
- <constant name="ITEM_RAINBOW" value="16" enum="ItemType">
+ <constant name="ITEM_TORNADO" value="19" enum="ItemType">
</constant>
- <constant name="ITEM_CUSTOMFX" value="18" enum="ItemType">
+ <constant name="ITEM_RAINBOW" value="20" enum="ItemType">
</constant>
- <constant name="ITEM_META" value="17" enum="ItemType">
+ <constant name="ITEM_META" value="21" enum="ItemType">
+ </constant>
+ <constant name="ITEM_DROPCAP" value="22" enum="ItemType">
+ </constant>
+ <constant name="ITEM_CUSTOMFX" value="23" 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>
<theme_item name="focus" type="StyleBox">
The background The background used when the [RichTextLabel] is focused.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The default tint of text outline.
+ </theme_item>
+ <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )">
The color of selected text, used when [member selection_enabled] is [code]true[/code].
</theme_item>
- <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )">
The color of the font's shadow.
</theme_item>
<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="outline_size" type="int" default="0">
+ The size of the text outline.
+ </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 +666,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..ed375a8b1e 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -4,7 +4,7 @@
A body that is controlled by the 2D physics engine.
</brief_description>
<description>
- This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
+ This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties.
A RigidBody2D has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic.
[b]Note:[/b] You should not change a RigidBody2D's [code]position[/code] or [code]linear_velocity[/code] every frame or even very often. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state.
Please also keep in mind that physics bodies manage their own transform which overwrites the ones you set. So any direct or indirect transformation (including scaling of the node or its parent) will be visible in the editor only, and immediately reset at runtime.
@@ -174,23 +174,22 @@
<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">
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a body exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -203,7 +202,11 @@
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="body_shape_exited">
@@ -216,7 +219,11 @@
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
+ [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D].
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
+ [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D].
+ [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D].
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index f8dc9887a9..1c6c8852a9 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -198,23 +198,22 @@
<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">
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Node">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
+ Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
</description>
</signal>
<signal name="body_shape_entered">
@@ -227,8 +226,12 @@
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
- This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with.
+ Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D].
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D].
+ [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
<signal name="body_shape_exited">
@@ -241,8 +244,12 @@
<argument index="3" name="local_shape" type="int">
</argument>
<description>
- Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions.
- This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with.
+ Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s.
+ [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s.
+ [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap].
+ [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D].
+ [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D].
+ [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices.
</description>
</signal>
<signal name="sleeping_state_changed">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 4ea457047f..9366d7dd44 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
As one of the most important classes, the [SceneTree] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded.
- You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once.
+ You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once.
[SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop.
</description>
<tutorials>
@@ -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">
@@ -62,17 +64,36 @@
</return>
<argument index="0" name="time_sec" type="float">
</argument>
- <argument index="1" name="pause_mode_process" type="bool" default="true">
+ <argument index="1" name="process_always" type="bool" default="true">
</argument>
<description>
- Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]pause_mode_process[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
+ Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer.
Commonly used to create a one-shot delay timer as in the following example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func some_function():
print("start")
yield(get_tree().create_timer(1.0), "timeout")
print("end")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public async void SomeFunction()
+ {
+ GD.Print("start");
+ await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
+ GD.Print("end");
+ }
+ [/csharp]
+ [/codeblocks]
+ The timer will be automatically freed after its time elapses.
+ </description>
+ </method>
+ <method name="get_first_node_in_group">
+ <return type="Node">
+ </return>
+ <argument index="0" name="group" type="StringName">
+ </argument>
+ <description>
</description>
</method>
<method name="get_frame" qualifiers="const">
@@ -178,10 +199,12 @@
<method name="quit">
<return type="void">
</return>
- <argument index="0" name="exit_code" type="int" default="-1">
+ <argument index="0" name="exit_code" type="int" default="0">
</argument>
<description>
- Quits the application. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application.
+ Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code.
+ By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error.
+ For portability reasons, the exit code should be set between 0 and 125 (inclusive).
</description>
</method>
<method name="reload_current_scene">
@@ -258,7 +281,7 @@
The default [MultiplayerAPI] instance for this [SceneTree].
</member>
<member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true">
- If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame].
+ If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame].
If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads.
</member>
<member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer">
@@ -296,11 +319,6 @@
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</signal>
- <signal name="idle_frame">
- <description>
- Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
- </description>
- </signal>
<signal name="network_peer_connected">
<argument index="0" name="id" type="int">
</argument>
@@ -348,6 +366,11 @@
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
</description>
</signal>
+ <signal name="process_frame">
+ <description>
+ Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
+ </description>
+ </signal>
<signal name="server_disconnected">
<description>
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
@@ -358,6 +381,11 @@
Emitted whenever the [SceneTree] hierarchy changed (children being moved or renamed, etc.).
</description>
</signal>
+ <signal name="tree_process_mode_changed">
+ <description>
+ This signal is only emitted in the editor, it allows the editor to update the visibility of disabled nodes. Emitted whenever any node's [member Node.process_mode] is changed.
+ </description>
+ </signal>
</signals>
<constants>
<constant name="GROUP_CALL_DEFAULT" value="0" enum="GroupCallFlags">
diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml
index a4a83fa65b..b223bf6821 100644
--- a/doc/classes/SceneTreeTimer.xml
+++ b/doc/classes/SceneTreeTimer.xml
@@ -6,12 +6,22 @@
<description>
A one-shot timer managed by the scene tree, which emits [signal timeout] on completion. See also [method SceneTree.create_timer].
As opposed to [Timer], it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func some_function():
print("Timer started.")
yield(get_tree().create_timer(1.0), "timeout")
print("Timer ended.")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public async void SomeFunction()
+ {
+ GD.Print("Timer started.");
+ await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
+ GD.Print("Timer ended.");
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml
index aa60ecb12b..7185213c44 100644
--- a/doc/classes/ScriptCreateDialog.xml
+++ b/doc/classes/ScriptCreateDialog.xml
@@ -5,12 +5,24 @@
</brief_description>
<description>
The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Window.popup] methods.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
- dialog.config("Node", "res://new_node.gd") # For in-engine types
- dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types
+ var dialog = ScriptCreateDialog.new();
+ dialog.config("Node", "res://new_node.gd") # For in-engine types.
+ dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types.
dialog.popup_centered()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var dialog = new ScriptCreateDialog();
+ dialog.Config("Node", "res://NewNode.cs"); // For in-engine types.
+ dialog.Config("\"res://BaseNode.cs\"", "res://DerivedNode.cs"); // For script types.
+ dialog.PopupCentered();
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index d5a32dd20c..28620bd29b 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -37,6 +37,7 @@
<return type="ScriptEditorBase">
</return>
<description>
+ Returns the [ScriptEditorBase] object that the user is currently editing.
</description>
</method>
<method name="get_current_script">
@@ -60,6 +61,7 @@
<return type="Array">
</return>
<description>
+ Returns an array with all [ScriptEditorBase] objects which are currently open in editor.
</description>
</method>
<method name="get_open_scripts" qualifiers="const">
@@ -95,6 +97,8 @@
<argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
</argument>
<description>
+ Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts.
+ [b]Note:[/b] Does not apply to scripts that are already opened.
</description>
</method>
<method name="unregister_syntax_highlighter">
@@ -103,6 +107,8 @@
<argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter">
</argument>
<description>
+ Unregisters the [EditorSyntaxHighlighter] from the editor.
+ [b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened.
</description>
</method>
</methods>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index 9968ae06c3..ee498de302 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0">
<brief_description>
+ Base editor for editing scripts in the [ScriptEditor].
</brief_description>
<description>
+ Base editor for editing scripts in the [ScriptEditor], this does not include documentation items.
</description>
<tutorials>
</tutorials>
@@ -13,34 +15,40 @@
<argument index="0" name="highlighter" type="Object">
</argument>
<description>
+ Adds a [EditorSyntaxHighlighter] to the open script.
</description>
</method>
</methods>
<signals>
<signal name="edited_script_changed">
<description>
+ Emitted after script validation. For visual scripts on modification.
</description>
</signal>
<signal name="go_to_help">
<argument index="0" name="what" type="String">
</argument>
<description>
+ Emitted when the user requests a specific documentation page.
</description>
</signal>
<signal name="name_changed">
<description>
+ Emitted after script validation or when the edited resource has changed. Not used by visual scripts.
</description>
</signal>
<signal name="replace_in_files_requested">
<argument index="0" name="text" type="String">
</argument>
<description>
+ Emitted when the user request to find and replace text in the file system. Not used by visual scripts.
</description>
</signal>
<signal name="request_help">
<argument index="0" name="topic" type="String">
</argument>
<description>
+ Emitted when the user requests contextual help.
</description>
</signal>
<signal name="request_open_script_at_line">
@@ -49,16 +57,19 @@
<argument index="1" name="line" type="int">
</argument>
<description>
+ Emitted when the user requests a script.
</description>
</signal>
<signal name="request_save_history">
<description>
+ Emitted when the user contextual goto and the item is in the same script.
</description>
</signal>
<signal name="search_in_files_requested">
<argument index="0" name="text" type="String">
</argument>
<description>
+ Emitted when the user request to search text in the file system. Not used by visual scripts.
</description>
</signal>
</signals>
diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml
index 2d8bb5d051..f8b749aebf 100644
--- a/doc/classes/Shape3D.xml
+++ b/doc/classes/Shape3D.xml
@@ -13,7 +13,8 @@
</methods>
<members>
<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04">
- The collision margin for the shape.
+ The collision margin for the shape. Used in Bullet Physics only.
+ Collision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp.
</member>
</members>
<constants>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index b7a2258fc1..84efc974c0 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -57,42 +57,42 @@
Disconnects this signal from the specified [Callable].
</description>
</method>
- <method name="emit" qualifiers="vararg">
+ <method name="emit" qualifiers="vararg const">
<return type="void">
</return>
<description>
Emits this signal to all connected objects.
</description>
</method>
- <method name="get_connections">
+ <method name="get_connections" qualifiers="const">
<return type="Array">
</return>
<description>
Returns the list of [Callable]s connected to this signal.
</description>
</method>
- <method name="get_name">
+ <method name="get_name" qualifiers="const">
<return type="StringName">
</return>
<description>
Returns the name of this signal.
</description>
</method>
- <method name="get_object">
+ <method name="get_object" qualifiers="const">
<return type="Object">
</return>
<description>
Returns the object emitting this signal.
</description>
</method>
- <method name="get_object_id">
+ <method name="get_object_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the ID of the object emitting this signal (see [method Object.get_instance_id]).
</description>
</method>
- <method name="is_connected">
+ <method name="is_connected" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="callable" type="Callable">
@@ -101,7 +101,7 @@
Returns [code]true[/code] if the specified [Callable] is connected to this signal.
</description>
</method>
- <method name="is_null">
+ <method name="is_null" qualifiers="const">
<return type="bool">
</return>
<description>
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index fe2cc1f5ad..cb72ae7e4c 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -297,7 +297,7 @@
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
- Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of it's parent prior to being reset.
+ Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset.
</description>
</method>
<method name="world_transform_to_bone_transform">
diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml
index a77515b3e6..d9553a3be3 100644
--- a/doc/classes/Sky.xml
+++ b/doc/classes/Sky.xml
@@ -52,13 +52,13 @@
Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant PROCESS_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant PROCESS_MODE_INCREMENTAL]. Otherwise, this defaults to [constant PROCESS_MODE_QUALITY].
</constant>
<constant name="PROCESS_MODE_QUALITY" value="1" enum="ProcessMode">
- Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples].
+ Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples].
</constant>
<constant name="PROCESS_MODE_INCREMENTAL" value="2" enum="ProcessMode">
- Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/quality/reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
+ Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly.
</constant>
<constant name="PROCESS_MODE_REALTIME" value="3" enum="ProcessMode">
- Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/quality/reflections/fast_filter_high_quality].
+ Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality].
[b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256].
</constant>
</constants>
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/SoftBody3D.xml b/doc/classes/SoftBody3D.xml
index d3ab955570..7999ad774d 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -44,6 +44,12 @@
Returns an individual bit on the collision mask.
</description>
</method>
+ <method name="get_physics_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="remove_collision_exception_with">
<return type="void">
</return>
@@ -77,8 +83,6 @@
</method>
</methods>
<members>
- <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5">
- </member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers this SoftBody3D is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
@@ -96,8 +100,6 @@
<member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
[NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping.
</member>
- <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0">
- </member>
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
</member>
<member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
@@ -109,8 +111,6 @@
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
The SoftBody3D's mass.
</member>
- <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5">
- </member>
</members>
<constants>
</constants>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index e674ceb57e..7e2481f458 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -6,15 +6,25 @@
<description>
SpinBox is a numerical input text field. It allows entering integers and floats.
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
var spin_box = SpinBox.new()
add_child(spin_box)
var line_edit = spin_box.get_line_edit()
line_edit.context_menu_enabled = false
spin_box.align = LineEdit.ALIGN_RIGHT
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var spinBox = new SpinBox();
+ AddChild(spinBox);
+ var lineEdit = spinBox.GetLineEdit();
+ lineEdit.ContextMenuEnabled = false;
+ spinBox.Align = LineEdit.AlignEnum.Right;
+ [/csharp]
+ [/codeblocks]
The above code will create a [SpinBox], disable context menu on it and set the text alignment to right.
See [Range] class for more options over the [SpinBox].
+ [b]Note:[/b] [SpinBox] relies on an underlying [LineEdit] node. To theme a [SpinBox]'s background, add theme items for [LineEdit] and customize them.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index c56596423d..617ad3a371 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -15,12 +15,29 @@
</return>
<description>
Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _input(event):
- if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT:
+ if event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:
if get_rect().has_point(to_local(event.position)):
print("A click!")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Input(InputEvent inputEvent)
+ {
+ if (inputEvent is InputEventMouseButton inputEventMouse)
+ {
+ if (inputEventMouse.Pressed &amp;&amp; inputEventMouse.ButtonIndex == (int)ButtonList.Left)
+ {
+ if (GetRect().HasPoint(ToLocal(inputEventMouse.Position)))
+ {
+ GD.Print("A click!");
+ }
+ }
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="is_pixel_opaque" qualifiers="const">
@@ -56,11 +73,11 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )">
The texture's drawing offset.
</member>
- <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false">
+ <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false">
If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect].
</member>
- <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled" default="false">
- If [code]true[/code], the outermost pixels get blurred out.
+ <member name="region_filter_clip_enabled" type="bool" setter="set_region_filter_clip_enabled" getter="is_region_filter_clip_enabled" default="false">
+ If [code]true[/code], the outermost pixels get blurred out. [member region_enabled] must be [code]true[/code].
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
The region of the atlas texture to display. [member region_enabled] must be [code]true[/code].
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index f9b947fa3d..658fd1a4f2 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -20,7 +20,7 @@
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1">
The number of columns in the sprite sheet.
</member>
- <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false">
+ <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false">
If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect].
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 44b08408c1..06b9c2b042 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -73,7 +73,7 @@
The texture's drawing offset.
</member>
<member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0">
- The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible.
+ The objects' visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible.
</member>
<member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
The size of one pixel's width on the sprite to scale it in 3D.
@@ -102,7 +102,7 @@
This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
</constant>
<constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
- This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/quality/screen_filters/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
+ This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
</constant>
<constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode">
This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index a73d3c8212..a1b858acf6 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -212,9 +212,14 @@
<description>
Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.
Note: To put an ASCII string without prepending its size, you can use [method put_data]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
put_data("Hello world".to_ascii())
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ PutData("Hello World".ToAscii());
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="put_u16">
@@ -261,9 +266,14 @@
<description>
Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.
Note: To put an UTF-8 string without prepending its size, you can use [method put_data]:
- [codeblock]
+ [codeblocks]
+ [gdscript]
put_data("Hello world".to_utf8())
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ PutData("Hello World".ToUTF8());
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="put_var">
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 4ee9dbf1f9..416438e648 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -44,7 +44,7 @@
Constructs a new String from the given [StringName].
</description>
</method>
- <method name="begins_with">
+ <method name="begins_with" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="text" type="String">
@@ -53,29 +53,38 @@
Returns [code]true[/code] if the string begins with the given string.
</description>
</method>
- <method name="bigrams">
+ <method name="bigrams" qualifiers="const">
<return type="PackedStringArray">
</return>
<description>
Returns the bigrams (pairs of consecutive letters) of this string.
</description>
</method>
- <method name="bin_to_int">
+ <method name="bin_to_int" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="with_prefix" type="bool" default="true">
- </argument>
<description>
+ Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
+ [codeblocks]
+ [gdscript]
+ print("0x101".bin_to_int()) # Prints "5".
+ print("101".bin_to_int()) # Prints "5".
+ [/gdscript]
+ [csharp]
+ GD.Print("0x101".BinToInt()); // Prints "5".
+ GD.Print("101".BinToInt()); // Prints "5".
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="c_escape">
+ <method name="c_escape" qualifiers="const">
<return type="String">
</return>
<description>
Returns a copy of the string with special characters escaped using the C language standard.
</description>
</method>
- <method name="c_unescape">
+ <method name="c_unescape" qualifiers="const">
<return type="String">
</return>
<description>
@@ -83,14 +92,14 @@
[b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence.
</description>
</method>
- <method name="capitalize">
+ <method name="capitalize" qualifiers="const">
<return type="String">
</return>
<description>
Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camel Case Mixed With Underscores[/code].
</description>
</method>
- <method name="casecmp_to">
+ <method name="casecmp_to" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="to" type="String">
@@ -102,7 +111,15 @@
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
- <method name="count">
+ <method name="chr" qualifiers="static">
+ <return type="String">
+ </return>
+ <argument index="0" name="char" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -115,7 +132,7 @@
Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
</description>
</method>
- <method name="countn">
+ <method name="countn" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -128,21 +145,14 @@
Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
</description>
</method>
- <method name="dedent">
+ <method name="dedent" qualifiers="const">
<return type="String">
</return>
<description>
Returns a copy of the string with indentation (leading tabs and spaces) removed.
</description>
</method>
- <method name="empty">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the length of the string equals [code]0[/code].
- </description>
- </method>
- <method name="ends_with">
+ <method name="ends_with" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="text" type="String">
@@ -151,7 +161,7 @@
Returns [code]true[/code] if the string ends with the given string.
</description>
</method>
- <method name="find">
+ <method name="find" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -161,14 +171,18 @@
<description>
Returns the index of the [b]first[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
[b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows:
- [codeblock]
- # Will evaluate to `false`.
- if "i" in "team":
- pass
- [/codeblock]
- </description>
- </method>
- <method name="findn">
+ [codeblocks]
+ [gdscript]
+ print("i" in "team") # Will print `false`.
+ [/gdscript]
+ [csharp]
+ // C# has no in operator, but we can use `Contains()`.
+ GD.Print("team".Contains("i")); // Will print `false`.
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="findn" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -179,7 +193,7 @@
Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string.
</description>
</method>
- <method name="format">
+ <method name="format" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="values" type="Variant">
@@ -190,75 +204,67 @@
Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code].
</description>
</method>
- <method name="get_base_dir">
+ <method name="get_base_dir" qualifiers="const">
<return type="String">
</return>
<description>
If the string is a valid file path, returns the base directory name.
</description>
</method>
- <method name="get_basename">
+ <method name="get_basename" qualifiers="const">
<return type="String">
</return>
<description>
If the string is a valid file path, returns the full file path without the extension.
</description>
</method>
- <method name="get_extension">
+ <method name="get_extension" qualifiers="const">
<return type="String">
</return>
<description>
If the string is a valid file path, returns the extension.
</description>
</method>
- <method name="get_file">
+ <method name="get_file" qualifiers="const">
<return type="String">
</return>
<description>
If the string is a valid file path, returns the filename.
</description>
</method>
- <method name="hash">
+ <method name="hash" qualifiers="const">
<return type="int">
</return>
<description>
Hashes the string and returns a 32-bit integer.
</description>
</method>
- <method name="hex_to_int">
+ <method name="hex_to_int" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="with_prefix" type="bool" default="true">
- </argument>
- <description>
- Converts a string containing a hexadecimal number into a decimal integer. If [code]with_prefix[/code] is [code]true[/code], the hexadecimal string should start with the [code]0x[/code] prefix, otherwise [code]0[/code] is returned.
- [codeblock]
- print("0xff".hex_to_int()) # Print "255"
- print("ab".hex_to_int(false)) # Print "171"
- [/codeblock]
- </description>
- </method>
- <method name="http_escape">
- <return type="String">
- </return>
<description>
- Escapes (encodes) a string to URL friendly format. Also referred to as 'URL encode'.
- [codeblock]
- print("https://example.org/?escaped=" + "Godot Engine:'docs'".http_escape())
- [/codeblock]
+ Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with [code]0x[/code] or not, and they can also start with a [code]-[/code] before the optional prefix.
+ [codeblocks]
+ [gdscript]
+ print("0xff".hex_to_int()) # Prints "255".
+ print("ab".hex_to_int()) # Prints "171".
+ [/gdscript]
+ [csharp]
+ GD.Print("0xff".HexToInt()); // Prints "255".
+ GD.Print("ab".HexToInt()); // Prints "171".
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="http_unescape">
+ <method name="humanize_size" qualifiers="static">
<return type="String">
</return>
+ <argument index="0" name="size" type="int">
+ </argument>
<description>
- Unescapes (decodes) a string in URL encoded format. Also referred to as 'URL decode'.
- [codeblock]
- print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".http_unescape())
- [/codeblock]
</description>
</method>
- <method name="insert">
+ <method name="insert" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="position" type="int">
@@ -269,21 +275,28 @@
Returns a copy of the string with the substring [code]what[/code] inserted at the given position.
</description>
</method>
- <method name="is_abs_path">
+ <method name="is_abs_path" qualifiers="const">
<return type="bool">
</return>
<description>
If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute.
</description>
</method>
- <method name="is_rel_path">
+ <method name="is_empty" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the length of the string equals [code]0[/code].
+ </description>
+ </method>
+ <method name="is_rel_path" qualifiers="const">
<return type="bool">
</return>
<description>
If the string is a path to a file or directory, returns [code]true[/code] if the path is relative.
</description>
</method>
- <method name="is_subsequence_of">
+ <method name="is_subsequence_of" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="text" type="String">
@@ -292,7 +305,7 @@
Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
- <method name="is_subsequence_ofi">
+ <method name="is_subsequence_ofi" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="text" type="String">
@@ -301,7 +314,7 @@
Returns [code]true[/code] if this string is a subsequence of the given string, without considering case.
</description>
</method>
- <method name="is_valid_filename">
+ <method name="is_valid_filename" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -309,14 +322,14 @@
[code]: / \ ? * " | % &lt; &gt;[/code]
</description>
</method>
- <method name="is_valid_float">
+ <method name="is_valid_float" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this string contains a valid float.
</description>
</method>
- <method name="is_valid_hex_number">
+ <method name="is_valid_hex_number" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="with_prefix" type="bool" default="false">
@@ -325,35 +338,35 @@
Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
</description>
</method>
- <method name="is_valid_html_color">
+ <method name="is_valid_html_color" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or [code]hsl()[/code] colors aren't considered valid by this method and will return [code]false[/code].
</description>
</method>
- <method name="is_valid_identifier">
+ <method name="is_valid_identifier" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit.
</description>
</method>
- <method name="is_valid_integer">
+ <method name="is_valid_integer" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this string contains a valid integer.
</description>
</method>
- <method name="is_valid_ip_address">
+ <method name="is_valid_ip_address" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this string contains only a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]0.0.0.0[/code] as valid.
</description>
</method>
- <method name="join">
+ <method name="join" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="parts" type="PackedStringArray">
@@ -361,19 +374,24 @@
<description>
Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method.
Example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
print(", ".join(["One", "Two", "Three", "Four"]))
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GD.Print(String.Join(",", new string[] {"One", "Two", "Three", "Four"}));
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="json_escape">
+ <method name="json_escape" qualifiers="const">
<return type="String">
</return>
<description>
Returns a copy of the string with special characters escaped using the JSON standard.
</description>
</method>
- <method name="left">
+ <method name="left" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="position" type="int">
@@ -382,14 +400,14 @@
Returns a number of characters from the left of the string.
</description>
</method>
- <method name="length">
+ <method name="length" qualifiers="const">
<return type="int">
</return>
<description>
Returns the string's amount of characters.
</description>
</method>
- <method name="lpad">
+ <method name="lpad" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="min_length" type="int">
@@ -400,16 +418,17 @@
Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the left of the string.
</description>
</method>
- <method name="lstrip">
+ <method name="lstrip" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="chars" type="String">
</argument>
<description>
- Returns a copy of the string with characters removed from the left.
+ Returns a copy of the string with characters removed from the left. The [code]chars[/code] argument is a string specifying the set of characters to be removed.
+ [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters.
</description>
</method>
- <method name="match">
+ <method name="match" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="expr" type="String">
@@ -418,7 +437,7 @@
Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]).
</description>
</method>
- <method name="matchn">
+ <method name="matchn" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="expr" type="String">
@@ -427,21 +446,21 @@
Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]).
</description>
</method>
- <method name="md5_buffer">
+ <method name="md5_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Returns the MD5 hash of the string as an array of bytes.
</description>
</method>
- <method name="md5_text">
+ <method name="md5_text" qualifiers="const">
<return type="String">
</return>
<description>
Returns the MD5 hash of the string as a string.
</description>
</method>
- <method name="naturalnocasecmp_to">
+ <method name="naturalnocasecmp_to" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="to" type="String">
@@ -454,7 +473,7 @@
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to].
</description>
</method>
- <method name="nocasecmp_to">
+ <method name="nocasecmp_to" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="to" type="String">
@@ -466,6 +485,24 @@
To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
+ <method name="num" qualifiers="static">
+ <return type="String">
+ </return>
+ <argument index="0" name="number" type="float">
+ </argument>
+ <argument index="1" name="decimals" type="int" default="-1">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="num_scientific" qualifiers="static">
+ <return type="String">
+ </return>
+ <argument index="0" name="number" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="operator !=" qualifiers="operator">
<return type="bool">
</return>
@@ -546,16 +583,7 @@
<description>
</description>
</method>
- <method name="ord_at">
- <return type="int">
- </return>
- <argument index="0" name="at" type="int">
- </argument>
- <description>
- Returns the character code at position [code]at[/code].
- </description>
- </method>
- <method name="pad_decimals">
+ <method name="pad_decimals" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="digits" type="int">
@@ -564,7 +592,7 @@
Formats a number to have an exact number of [code]digits[/code] after the decimal point.
</description>
</method>
- <method name="pad_zeros">
+ <method name="pad_zeros" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="digits" type="int">
@@ -573,21 +601,7 @@
Formats a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
- <method name="percent_decode">
- <return type="String">
- </return>
- <description>
- Decode a percent-encoded string. See [method percent_encode].
- </description>
- </method>
- <method name="percent_encode">
- <return type="String">
- </return>
- <description>
- Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests).
- </description>
- </method>
- <method name="plus_file">
+ <method name="plus_file" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="file" type="String">
@@ -596,7 +610,7 @@
If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
</description>
</method>
- <method name="repeat">
+ <method name="repeat" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="count" type="int">
@@ -605,7 +619,7 @@
Returns original string repeated a number of times. The number of repetitions is given by the argument.
</description>
</method>
- <method name="replace">
+ <method name="replace" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="what" type="String">
@@ -616,7 +630,7 @@
Replaces occurrences of a case-sensitive substring with the given one inside the string.
</description>
</method>
- <method name="replacen">
+ <method name="replacen" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="what" type="String">
@@ -627,7 +641,7 @@
Replaces occurrences of a case-insensitive substring with the given one inside the string.
</description>
</method>
- <method name="rfind">
+ <method name="rfind" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -638,7 +652,7 @@
Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
- <method name="rfindn">
+ <method name="rfindn" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="what" type="String">
@@ -649,7 +663,7 @@
Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string.
</description>
</method>
- <method name="right">
+ <method name="right" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="position" type="int">
@@ -658,7 +672,7 @@
Returns the right side of the string from a given position.
</description>
</method>
- <method name="rpad">
+ <method name="rpad" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="min_length" type="int">
@@ -669,7 +683,7 @@
Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the right of the string.
</description>
</method>
- <method name="rsplit">
+ <method name="rsplit" qualifiers="const">
<return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
@@ -683,53 +697,59 @@
The splits in the returned array are sorted in the same order as the original string, from left to right.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split].
Example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var some_string = "One,Two,Three,Four"
var some_array = some_string.rsplit(",", true, 1)
print(some_array.size()) # Prints 2
print(some_array[0]) # Prints "Four"
print(some_array[1]) # Prints "Three,Two,One"
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // There is no Rsplit.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
- <method name="rstrip">
+ <method name="rstrip" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="chars" type="String">
</argument>
<description>
- Returns a copy of the string with characters removed from the right.
+ Returns a copy of the string with characters removed from the right. The [code]chars[/code] argument is a string specifying the set of characters to be removed.
+ [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters.
</description>
</method>
- <method name="sha1_buffer">
+ <method name="sha1_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Returns the SHA-1 hash of the string as an array of bytes.
</description>
</method>
- <method name="sha1_text">
+ <method name="sha1_text" qualifiers="const">
<return type="String">
</return>
<description>
Returns the SHA-1 hash of the string as a string.
</description>
</method>
- <method name="sha256_buffer">
+ <method name="sha256_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Returns the SHA-256 hash of the string as an array of bytes.
</description>
</method>
- <method name="sha256_text">
+ <method name="sha256_text" qualifiers="const">
<return type="String">
</return>
<description>
Returns the SHA-256 hash of the string as a string.
</description>
</method>
- <method name="similarity">
+ <method name="similarity" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="text" type="String">
@@ -738,7 +758,7 @@
Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
- <method name="split">
+ <method name="split" qualifiers="const">
<return type="PackedStringArray">
</return>
<argument index="0" name="delimiter" type="String">
@@ -751,17 +771,25 @@
Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length.
If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split.
Example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var some_string = "One,Two,Three,Four"
var some_array = some_string.split(",", true, 1)
print(some_array.size()) # Prints 2
- print(some_array[0]) # Prints "One"
- print(some_array[1]) # Prints "Two,Three,Four"
- [/codeblock]
+ print(some_array[0]) # Prints "Four"
+ print(some_array[1]) # Prints "Three,Two,One"
+ [/gdscript]
+ [csharp]
+ var someString = "One,Two,Three,Four";
+ var someArray = someString.Split(",", true); // This is as close as it gets to Godots API.
+ GD.Print(someArray[0]); // Prints "Four"
+ GD.Print(someArray[1]); // Prints "Three,Two,One"
+ [/csharp]
+ [/codeblocks]
If you need to split strings with more complex rules, use the [RegEx] class instead.
</description>
</method>
- <method name="split_floats">
+ <method name="split_floats" qualifiers="const">
<return type="PackedFloat32Array">
</return>
<argument index="0" name="delimiter" type="String">
@@ -773,7 +801,7 @@
For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code].
</description>
</method>
- <method name="strip_edges">
+ <method name="strip_edges" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="left" type="bool" default="true">
@@ -784,14 +812,14 @@
Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
</method>
- <method name="strip_escapes">
+ <method name="strip_escapes" qualifiers="const">
<return type="String">
</return>
<description>
Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (&lt; 32), such as tabulation ([code]\t[/code] in C) and newline ([code]\n[/code] and [code]\r[/code]) characters, but not spaces.
</description>
</method>
- <method name="substr">
+ <method name="substr" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="from" type="int">
@@ -802,63 +830,63 @@
Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position.
</description>
</method>
- <method name="to_ascii_buffer">
+ <method name="to_ascii_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Converts the String (which is a character array) to ASCII/Latin-1 encoded [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8_buffer], as this method assumes that all the characters in the String are ASCII/Latin-1 characters, unsupported characters are replaced with spaces.
</description>
</method>
- <method name="to_float">
+ <method name="to_float" qualifiers="const">
<return type="float">
</return>
<description>
Converts a string containing a decimal number into a [code]float[/code].
</description>
</method>
- <method name="to_int">
+ <method name="to_int" qualifiers="const">
<return type="int">
</return>
<description>
Converts a string containing an integer number into an [code]int[/code].
</description>
</method>
- <method name="to_lower">
+ <method name="to_lower" qualifiers="const">
<return type="String">
</return>
<description>
Returns the string converted to lowercase.
</description>
</method>
- <method name="to_upper">
+ <method name="to_upper" qualifiers="const">
<return type="String">
</return>
<description>
Returns the string converted to uppercase.
</description>
</method>
- <method name="to_utf16_buffer">
+ <method name="to_utf16_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Converts the String (which is an array of characters) to UTF-16 encoded [PackedByteArray] (which is an array of bytes).
</description>
</method>
- <method name="to_utf32_buffer">
+ <method name="to_utf32_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Converts the String (which is an array of characters) to UTF-32 encoded [PackedByteArray] (which is an array of bytes).
</description>
</method>
- <method name="to_utf8_buffer">
+ <method name="to_utf8_buffer" qualifiers="const">
<return type="PackedByteArray">
</return>
<description>
Converts the String (which is an array of characters) to UTF-8 encode [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii_buffer], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii_buffer].
</description>
</method>
- <method name="trim_prefix">
+ <method name="trim_prefix" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="prefix" type="String">
@@ -867,7 +895,7 @@
Removes a given string from the start if it starts with it or leaves the string unchanged.
</description>
</method>
- <method name="trim_suffix">
+ <method name="trim_suffix" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="suffix" type="String">
@@ -876,7 +904,53 @@
Removes a given string from the end if it ends with it or leaves the string unchanged.
</description>
</method>
- <method name="xml_escape">
+ <method name="unicode_at" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="at" type="int">
+ </argument>
+ <description>
+ Returns the character code at position [code]at[/code].
+ </description>
+ </method>
+ <method name="uri_decode" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Decodes a string in URL encoded format. This is meant to decode parameters in a URL when receiving an HTTP request.
+ [codeblocks]
+ [gdscript]
+ print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".uri_decode())
+ [/gdscript]
+ [csharp]
+ GD.Print("https://example.org/?escaped=" + "Godot%20Engine%3a%27Docs%27".URIDecode());
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="uri_encode" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Encodes a string to URL friendly format. This is meant to encode parameters in a URL when sending an HTTP request.
+ [codeblocks]
+ [gdscript]
+ print("https://example.org/?escaped=" + "Godot Engine:'docs'".uri_encode())
+ [/gdscript]
+ [csharp]
+ GD.Print("https://example.org/?escaped=" + "Godot Engine:'docs'".URIEncode());
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="validate_node_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Removes any characters from the string that are prohibited in [Node] names ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code]).
+ </description>
+ </method>
+ <method name="xml_escape" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="escape_quotes" type="bool" default="false">
@@ -885,7 +959,7 @@
Returns a copy of the string with special characters escaped using the XML standard. If [code]escape_quotes[/code] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped.
</description>
</method>
- <method name="xml_unescape">
+ <method name="xml_unescape" qualifiers="const">
<return type="String">
</return>
<description>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index af0074f080..be32f6a234 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -4,7 +4,7 @@
An optimized string type for unique names.
</brief_description>
<description>
- [StringName]s are immutable strings designed for general-purpose represention of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings.
+ [StringName]s are immutable strings designed for general-purpose representation of unique names. [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 04f8eb9d13..a01dfbd4b8 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="margin" 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="margin" 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="margin" 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..d66ae210ec 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -4,12 +4,12 @@
Customizable [StyleBox] with a given set of parameters (no texture required).
</brief_description>
<description>
- This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable:
+ This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. The following properties are customizable:
- Color
- Border width (individual width for each border)
- Rounded corners (individual radius for each corner)
- Shadow (with blur and offset)
- Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example:
+ Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example:
[codeblock]
height = 30
corner_radius_top_left = 50
@@ -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="margin" 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="margin" 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="margin" 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="margin" 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">
@@ -178,8 +178,8 @@
Border width for the top border.
</member>
<member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" default="8">
- This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account.
- For corner radii smaller than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii smaller than 30, values between [code]8[/code] and [code]12[/code] should be enough.
+ This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account.
+ For corner radii less than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii less than 30, values between [code]8[/code] and [code]12[/code] should be enough.
A corner detail of [code]1[/code] will result in chamfered corners instead of rounded corners, which is useful for some artistic effects.
</member>
<member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0">
diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml
index 6f5577b61b..895d0c357d 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="margin" 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="margin" 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="margin" 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="margin" 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..1195e4aa2b 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -5,14 +5,23 @@
</brief_description>
<description>
The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from a script. All properties except indices need to be added before calling [method add_vertex]. For example, to add vertex colors and UVs:
- [codeblock]
+ [codeblocks]
+ [gdscript]
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))
- [/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.
+ st.set_color(Color(1, 0, 0))
+ st.set_uv(Vector2(0, 0))
+ st.set_vertex(Vector3(0, 0, 0))
+ [/gdscript]
+ [csharp]
+ var st = new SurfaceTool();
+ st.Begin(Mesh.PrimitiveType.Triangles);
+ st.SetColor(new Color(1, 0, 0));
+ st.SetUv(new Vector2(0, 0));
+ st.SetVertex(new Vector3(0, 0, 0));
+ [/csharp]
+ [/codeblocks]
+ 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 +31,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,33 +40,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>
- <argument index="0" name="smooth" type="bool">
- </argument>
- <description>
- 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">
@@ -212,14 +148,24 @@
Removes the index array by expanding the vertex array.
</description>
</method>
+ <method name="generate_lod">
+ <return type="PackedInt32Array">
+ </return>
+ <argument index="0" name="nd_threshold" type="float">
+ </argument>
+ <argument index="1" name="target_index_count" type="int" default="3">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="generate_normals">
<return type="void">
</return>
<argument index="0" name="flip" type="bool" default="false">
</argument>
<description>
- Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted.
- Requires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
+ Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays].
+ [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
</description>
</method>
<method name="generate_tangents">
@@ -229,11 +175,82 @@
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_max_axis_length" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_primitive" qualifiers="const">
+ <return type="int" enum="Mesh.PrimitiveType">
+ </return>
+ <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>
<description>
- Shrinks the vertex array by creating an index array (avoids reusing vertices).
+ Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse.
+ </description>
+ </method>
+ <method name="optimize_indices_for_cache">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_bones">
+ <return type="void">
+ </return>
+ <argument index="0" name="bones" type="PackedInt32Array">
+ </argument>
+ <description>
+ Specifies an array of bones to use for the [i]next[/i] vertex. [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] to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ [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">
@@ -245,7 +262,91 @@
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 to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ </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_smooth_group">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ 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="set_tangent">
+ <return type="void">
+ </return>
+ <argument index="0" name="tangent" type="Plane">
+ </argument>
+ <description>
+ Specifies a tangent to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ </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 [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ </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 [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ </description>
+ </method>
+ <method name="set_weights">
+ <return type="void">
+ </return>
+ <argument index="0" name="weights" type="PackedFloat32Array">
+ </argument>
+ <description>
+ Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
+ </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/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index 2d6e3de02a..642d75fa9b 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -1,50 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SyntaxHighlighter" inherits="Resource" version="4.0">
<brief_description>
+ Base Syntax highlighter resource for [TextEdit].
</brief_description>
<description>
+ Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to [TextEdit].
+ The associated [TextEdit] node will call into the [SyntaxHighlighter] on a as needed basis.
+ [b]Note:[/b] Each Syntax highlighter instance should not be shared across multiple [TextEdit] nodes.
</description>
<tutorials>
</tutorials>
<methods>
+ <method name="_clear_highlighting_cache" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ Virtual method which can be overridden to clear any local caches.
+ </description>
+ </method>
<method name="_get_line_syntax_highlighting" qualifiers="virtual">
<return type="Dictionary">
</return>
- <argument index="0" name="p_line" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
+ Virtual method which can be overridden to return syntax highlighting data.
+ See [method get_line_syntax_highlighting] for more details.
</description>
</method>
<method name="_update_cache" qualifiers="virtual">
<return type="void">
</return>
<description>
+ Virtual method which can be overridden to update any local caches.
</description>
</method>
<method name="clear_highlighting_cache">
<return type="void">
</return>
<description>
+ Clears all cached syntax highlighting data.
+ Then calls overridable method [method _clear_highlighting_cache].
</description>
</method>
<method name="get_line_syntax_highlighting">
<return type="Dictionary">
</return>
- <argument index="0" name="p_line" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
+ Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data.
+ The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported.
+ [b]Example return:[/b]
+ [codeblock]
+ var color_map = {
+ 0: {
+ "color": Color(1, 0, 0)
+ },
+ 5: {
+ "color": Color(0, 1, 0)
+ }
+ }
+ [/codeblock]
+ This will color columns 0-4 red, and columns 5-eol in green.
</description>
</method>
<method name="get_text_edit">
<return type="TextEdit">
</return>
<description>
+ Returns the associated [TextEdit] node.
</description>
</method>
<method name="update_cache">
<return type="void">
</return>
<description>
+ Clears then updates the [SyntaxHighlighter] caches. Override [method _update_cache] for a callback.
+ [b]Note:[/b] This is called automatically when the associated [TextEdit] node, updates its own cache.
</description>
</method>
</methods>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index d56781105b..ddf6b465a4 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -137,6 +137,9 @@
</method>
</methods>
<members>
+ <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="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0">
The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code].
</member>
@@ -195,15 +198,21 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
- Font color of inactive tabs.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the tab name.
+ </theme_item>
+ <theme_item name="font_selected_color" 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="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of the other, unselected tabs.
+ </theme_item>
<theme_item name="icon_separation" type="int" default="4">
Space between tab's name and its icon.
</theme_item>
@@ -219,20 +228,23 @@
<theme_item name="menu_highlight" type="Texture2D">
The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the tab text outline.
+ </theme_item>
<theme_item name="panel" type="StyleBox">
The style for the background fill.
</theme_item>
<theme_item name="side_margin" type="int" default="8">
The space at the left and right edges of the tab bar.
</theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- The style of inactive tabs.
- </theme_item>
<theme_item name="tab_disabled" type="StyleBox">
The style of disabled tabs.
</theme_item>
- <theme_item name="tab_fg" type="StyleBox">
+ <theme_item name="tab_selected" type="StyleBox">
The style of the currently selected tab.
</theme_item>
+ <theme_item name="tab_unselected" type="StyleBox">
+ The style of the other, unselected tabs.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml
index 15c2d3504c..79fa8896e3 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>
@@ -181,6 +254,9 @@
</method>
</methods>
<members>
+ <member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true">
+ If [code]true[/code], tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
+ </member>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0">
Select tab at index [code]tab_idx[/code].
</member>
@@ -188,7 +264,7 @@
If [code]true[/code], tabs can be rearranged with mouse drag.
</member>
<member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true">
- if [code]true[/code], the mouse's scroll wheel cab be used to navigate the scroll view.
+ if [code]true[/code], the mouse's scroll wheel can be used to navigate the scroll view.
</member>
<member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1">
The alignment of all tabs. See [enum TabAlign] for details.
@@ -226,14 +302,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>
@@ -286,15 +362,21 @@
<theme_item name="font" type="Font">
The font used to draw tab names.
</theme_item>
- <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
- Font color of inactive tabs.
- </theme_item>
- <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
Font color of disabled tabs.
</theme_item>
- <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the tab name.
+ </theme_item>
+ <theme_item name="font_selected_color" 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="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
+ Font color of the other, unselected tabs.
+ </theme_item>
<theme_item name="hseparation" type="int" default="4">
The horizontal separation between the tabs.
</theme_item>
@@ -304,16 +386,19 @@
<theme_item name="increment_highlight" type="Texture2D">
Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor.
</theme_item>
- <theme_item name="panel" type="StyleBox">
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the tab text outline.
</theme_item>
- <theme_item name="tab_bg" type="StyleBox">
- The style of an inactive tab.
+ <theme_item name="panel" type="StyleBox">
</theme_item>
<theme_item name="tab_disabled" type="StyleBox">
- The style of a disabled tab
+ The style of disabled tabs.
</theme_item>
- <theme_item name="tab_fg" type="StyleBox">
+ <theme_item name="tab_selected" type="StyleBox">
The style of the currently selected tab.
</theme_item>
+ <theme_item name="tab_unselected" type="StyleBox">
+ The style of the other, unselected tabs.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 168cc8a1c3..088bcd1c3c 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>
@@ -386,13 +402,24 @@
<description>
Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum.
Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g:
- [codeblock]
- var result = search(key, flags, line, column)
+ [codeblocks]
+ [gdscript]
+ var result = search("print", SEARCH_WHOLE_WORDS, 0, 0)
if !result.empty():
# Result found.
var line_number = result.line
var column_number = result.column
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
+ if (result.Length &gt; 0)
+ {
+ // Result found.
+ int lineNumber = result[(int)TextEdit.SearchResult.Line];
+ int columnNumber = result[(int)TextEdit.SearchResult.Column];
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="select">
@@ -573,6 +600,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 +667,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 +678,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 +697,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>
@@ -660,7 +708,7 @@
</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="1" />
<member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text.
+ If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
</member>
<member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false">
If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added.
@@ -681,11 +729,21 @@
<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">
+ Sets the [SyntaxHighlighter] to use.
</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,13 +857,76 @@
<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>
<theme_items>
<theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )">
- Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled.
+ Sets the background [Color] of this [TextEdit].
</theme_item>
<theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )">
</theme_item>
@@ -844,11 +965,17 @@
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
Sets the font [Color].
</theme_item>
- <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the [TextEdit].
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )">
+ <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )">
+ </theme_item>
+ <theme_item name="font_selected_color" 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>
@@ -858,6 +985,9 @@
<theme_item name="normal" type="StyleBox">
Sets the [StyleBox] of this [TextEdit].
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="read_only" type="StyleBox">
Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled.
</theme_item>
@@ -865,6 +995,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..8df53b8423
--- /dev/null
+++ b/doc/classes/TextParagraph.xml
@@ -0,0 +1,393 @@
+<?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="clear_dropcap">
+ <return type="void">
+ </return>
+ <description>
+ Removes dropcap.
+ </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>
+ <argument index="3" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw all lines of the text and drop cap 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_dropcap" 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 drop cap 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_dropcap_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 drop cap outline 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="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>
+ <argument index="4" name="dc_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Draw outlines of all lines of the text and drop cap 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_dropcap_lines" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns number of lines used by dropcap.
+ </description>
+ </method>
+ <method name="get_dropcap_rid" qualifiers="const">
+ <return type="RID">
+ </return>
+ <description>
+ Return drop cap text buffer RID.
+ </description>
+ </method>
+ <method name="get_dropcap_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns drop cap bounding box size.
+ </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="get_spacing_bottom" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom].
+ </description>
+ </method>
+ <method name="get_spacing_top" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns extra spacing at the top of the line. See [member Font.extra_spacing_top].
+ </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="set_dropcap">
+ <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="dropcap_margins" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
+ </argument>
+ <argument index="4" name="opentype_features" type="Dictionary" default="{
+}">
+ </argument>
+ <argument index="5" name="language" type="String" default="&quot;&quot;">
+ </argument>
+ <description>
+ Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
+ </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..fe63e434c9
--- /dev/null
+++ b/doc/classes/TextServer.xml
@@ -0,0 +1,1330 @@
+<?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_bitmap">
+ <return type="RID">
+ </return>
+ <argument index="0" name="height" type="float">
+ </argument>
+ <argument index="1" name="ascent" type="float">
+ </argument>
+ <argument index="2" name="base_size" type="int">
+ </argument>
+ <description>
+ Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method.
+ </description>
+ </method>
+ <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_bitmap_add_char">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="char" type="int">
+ </argument>
+ <argument index="2" name="texture_idx" type="int">
+ </argument>
+ <argument index="3" name="rect" type="Rect2">
+ </argument>
+ <argument index="4" name="align" type="Vector2">
+ </argument>
+ <argument index="5" name="advance" type="float">
+ </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="font_bitmap_add_kerning_pair">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="A" type="int">
+ </argument>
+ <argument index="2" name="B" type="int">
+ </argument>
+ <argument index="3" name="kerning" type="int">
+ </argument>
+ <description>
+ Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character.
+ </description>
+ </method>
+ <method name="font_bitmap_add_texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ Adds a texture to the bitmap font.
+ </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_contours" qualifiers="const">
+ <return type="Dictionary">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="size" type="int">
+ </argument>
+ <argument index="2" name="index" type="int">
+ </argument>
+ <description>
+ Returns outline contours of the glyph in a Dictionary.
+ [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
+ [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
+ [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
+ </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_spacing_glyph" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Returns extra spacing for each glyph in pixels.
+ </description>
+ </method>
+ <method name="font_get_spacing_space" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <description>
+ Sets extra spacing for each glyph in pixels.
+ </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_spacing_glyph">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Returns extra spacing for the space character in pixels.
+ </description>
+ </method>
+ <method name="font_set_spacing_space">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="RID">
+ </argument>
+ <argument index="1" name="value" type="int">
+ </argument>
+ <description>
+ Sets extra spacing for the space character in pixels.
+ </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="rid" 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>
+ <constant name="CONTOUR_CURVE_TAG_ON" value="1" enum="ContourPointTag">
+ Contour point is on the curve.
+ </constant>
+ <constant name="CONTOUR_CURVE_TAG_OFF_CONIC" value="0" enum="ContourPointTag">
+ Contour point isn't on the curve, but serves as a control point for a conic (quadratic) Bézier arc.
+ </constant>
+ <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag">
+ Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc.
+ </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/Texture2D.xml b/doc/classes/Texture2D.xml
index ff8b439a3d..b648098a94 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -7,6 +7,7 @@
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite2D] or GUI [Control].
Textures are often created by loading them from a file. See [method @GDScript.load].
[Texture2D] is a base for other resources. It cannot be used directly.
+ [b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. Larger textures may fail to import.
</description>
<tutorials>
</tutorials>
@@ -62,7 +63,7 @@
Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API.
</description>
</method>
- <method name="get_data" qualifiers="const">
+ <method name="get_image" qualifiers="const">
<return type="Image">
</return>
<description>
diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgressBar.xml
index 4937121ebf..b40759578f 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="margin" 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="margin" 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 2824159f0e..3173dddb42 100644
--- a/doc/classes/Theme.xml
+++ b/doc/classes/Theme.xml
@@ -23,10 +23,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Clears the [Color] at [code]name[/code] if the theme has [code]type[/code].
+ Clears the [Color] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="clear_constant">
@@ -34,10 +34,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Clears the constant at [code]name[/code] if the theme has [code]type[/code].
+ Clears the constant at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="clear_font">
@@ -45,10 +45,21 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Clears the [Font] at [code]name[/code] if the theme has [code]type[/code].
+ 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">
@@ -56,10 +67,10 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Clears the icon at [code]name[/code] if the theme has [code]type[/code].
+ Clears the icon at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="clear_stylebox">
@@ -67,10 +78,23 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
+ Clears [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code].
+ </description>
+ </method>
+ <method name="clear_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="copy_default_theme">
@@ -94,19 +118,26 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns the [Color] at [code]name[/code] if the theme has [code]type[/code].
+ Returns the [Color] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="get_color_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="node_type" type="String">
</argument>
<description>
- 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]type[/code].
+ 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">
@@ -114,19 +145,26 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns the constant at [code]name[/code] if the theme has [code]type[/code].
+ Returns the constant at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="get_constant_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="node_type" type="String">
</argument>
<description>
- Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code].
+ 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">
@@ -134,19 +172,53 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns the [Font] at [code]name[/code] if the theme has [code]type[/code].
+ Returns the [Font] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="get_font_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="node_type" type="String">
</argument>
<description>
- 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]type[/code].
+ 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_size_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list].
+ </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">
@@ -154,19 +226,26 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]type[/code].
+ Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]node_type[/code].
</description>
</method>
<method name="get_icon_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="node_type" type="String">
</argument>
<description>
- Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]type[/code].
+ 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">
@@ -174,35 +253,70 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code].
+ Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code].
+ Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list].
</description>
</method>
<method name="get_stylebox_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="node_type" type="String">
</argument>
<description>
- 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]type[/code].
+ 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].
+ Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list].
</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]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">
+ <method name="get_theme_item" qualifiers="const">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]node_type[/code].
+ Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ </description>
+ </method>
+ <method name="get_theme_item_list" qualifiers="const">
<return type="PackedStringArray">
</return>
- <argument index="0" name="type" type="String">
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="node_type" type="String">
</argument>
<description>
- Returns all the types in [code]type[/code] as a [PackedStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code].
+ Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]node_type[/code].
+ Valid [code]node_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method.
+ </description>
+ </method>
+ <method name="get_theme_item_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <description>
+ Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods.
+ </description>
+ </method>
+ <method name="get_type_list" qualifiers="const">
+ <return type="PackedStringArray">
+ </return>
+ <description>
+ 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">
@@ -210,11 +324,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if [Color] 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_constant" qualifiers="const">
@@ -222,11 +336,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if constant 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_font" qualifiers="const">
@@ -234,11 +348,23 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if [Font] 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_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] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ 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">
@@ -246,11 +372,11 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if icon [Texture2D] 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_stylebox" qualifiers="const">
@@ -258,11 +384,118 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<description>
- Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code].
- Returns [code]false[/code] if the theme does not have [code]type[/code].
+ Returns [code]true[/code] if [StyleBox] 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_theme_item" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Returns [code]true[/code] if a theme item of [code]data_type[/code] 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="rename_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_constant">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_font">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_font_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_stylebox">
+ <return type="void">
+ </return>
+ <argument index="0" name="old_name" type="StringName">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
+ </description>
+ </method>
+ <method name="rename_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="old_name" type="StringName">
+ </argument>
+ <argument index="2" name="name" type="StringName">
+ </argument>
+ <argument index="3" name="node_type" type="StringName">
+ </argument>
+ <description>
+ Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]node_type[/code]. If [code]name[/code] is already taken, this method fails.
</description>
</method>
<method name="set_color">
@@ -270,13 +503,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<argument index="2" name="color" type="Color">
</argument>
<description>
- Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the theme does not have [code]type[/code].
+ Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_constant">
@@ -284,13 +517,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<argument index="2" name="constant" type="int">
</argument>
<description>
- Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the theme does not have [code]type[/code].
+ Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_font">
@@ -298,13 +531,27 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<argument index="2" name="font" type="Font">
</argument>
<description>
- Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the theme does not have [code]type[/code].
+ Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
+ </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].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_icon">
@@ -312,13 +559,13 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<argument index="2" name="texture" type="Texture2D">
</argument>
<description>
- Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the theme does not have [code]type[/code].
+ Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
<method name="set_stylebox">
@@ -326,13 +573,30 @@
</return>
<argument index="0" name="name" type="StringName">
</argument>
- <argument index="1" name="type" type="StringName">
+ <argument index="1" name="node_type" type="StringName">
</argument>
<argument index="2" name="texture" type="StyleBox">
</argument>
<description>
- Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
- Does nothing if the theme does not have [code]type[/code].
+ Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]node_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
+ </description>
+ </method>
+ <method name="set_theme_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="data_type" type="int" enum="Theme.DataType">
+ </argument>
+ <argument index="1" name="name" type="StringName">
+ </argument>
+ <argument index="2" name="node_type" type="StringName">
+ </argument>
+ <argument index="3" name="value" type="Variant">
+ </argument>
+ <description>
+ Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]node_type[/code].
+ Does nothing if the [code]value[/code] type does not match [code]data_type[/code].
+ Creates [code]node_type[/code] if the theme does not have it.
</description>
</method>
</methods>
@@ -340,7 +604,31 @@
<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>
+ <constant name="DATA_TYPE_COLOR" value="0" enum="DataType">
+ Theme's [Color] item type.
+ </constant>
+ <constant name="DATA_TYPE_CONSTANT" value="1" enum="DataType">
+ Theme's constant item type.
+ </constant>
+ <constant name="DATA_TYPE_FONT" value="2" enum="DataType">
+ Theme's [Font] item type.
+ </constant>
+ <constant name="DATA_TYPE_FONT_SIZE" value="3" enum="DataType">
+ Theme's font size item type.
+ </constant>
+ <constant name="DATA_TYPE_ICON" value="4" enum="DataType">
+ Theme's icon [Texture2D] item type.
+ </constant>
+ <constant name="DATA_TYPE_STYLEBOX" value="5" enum="DataType">
+ Theme's [StyleBox] item type.
+ </constant>
+ <constant name="DATA_TYPE_MAX" value="6" enum="DataType">
+ Maximum value for the DataType enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index c500052592..7ed8ad6d4a 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps.
+ When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method PhysicsDirectSpaceState2D.intersect_shape], [method PhysicsDirectBodyState2D.get_contact_collider_shape_metadata] etc.
</description>
<tutorials>
<link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
@@ -143,7 +144,7 @@
<argument index="1" name="ignore_half_ofs" type="bool" default="false">
</argument>
<description>
- Returns the global position corresponding to the given tilemap (grid-based) coordinates.
+ Returns the local position corresponding to the given tilemap (grid-based) coordinates.
Optionally, the tilemap's half offset can be ignored.
</description>
</method>
@@ -171,12 +172,22 @@
[b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.
If you need these to be immediately updated, you can call [method update_dirty_quadrants].
Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2())
# Write your custom logic here.
# To call the default method:
.set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public void SetCell(int x, int y, int tile, bool flipX = false, bool flipY = false, bool transpose = false, Vector2 autotileCoord = new Vector2())
+ {
+ // Write your custom logic here.
+ // To call the default method:
+ base.SetCell(x, y, tile, flipX, flipY, transpose, autotileCoord);
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_cellv">
@@ -261,6 +272,9 @@
</method>
</methods>
<members>
+ <member name="bake_navigation" type="bool" setter="set_bake_navigation" getter="is_baking_navigation" default="false">
+ If [code]true[/code], this TileMap bakes a navigation region.
+ </member>
<member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false">
If [code]true[/code], the cell's UVs will be clipped.
</member>
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index ab75e21ce8..807d8033c1 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode.
- [b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer].
+ [b]Note:[/b] To create a one-shot timer without instantiating a node, use [method SceneTree.create_timer].
</description>
<tutorials>
<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
@@ -47,8 +47,8 @@
<member name="paused" type="bool" setter="set_paused" getter="is_paused">
If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called.
</member>
- <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode" default="1">
- Processing mode. See [enum TimerProcessMode].
+ <member name="process_callback" type="int" setter="set_timer_process_callback" getter="get_timer_process_callback" enum="Timer.TimerProcessCallback" default="1">
+ Processing callback. See [enum TimerProcessCallback].
</member>
<member name="time_left" type="float" setter="" getter="get_time_left">
The timer's remaining time in seconds. Returns 0 if the timer is inactive.
@@ -66,10 +66,10 @@
</signal>
</signals>
<constants>
- <constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessMode">
+ <constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessCallback">
Update the timer during the physics step at each frame (fixed framerate processing).
</constant>
- <constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessMode">
+ <constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessCallback">
Update the timer during the idle time at each frame.
</constant>
</constants>
diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml
index 355804f2a3..bb4c17c531 100644
--- a/doc/classes/TouchScreenButton.xml
+++ b/doc/classes/TouchScreenButton.xml
@@ -4,7 +4,7 @@
Button for touch screen devices for gameplay use.
</brief_description>
<description>
- TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move.
+ TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. Unlike [Button], TouchScreenButton supports multitouch out of the box. Several TouchScreenButtons can be pressed at the same time with touch input.
This node inherits from [Node2D]. Unlike with [Control] nodes, you cannot set anchors on it. If you want to create menus or user interfaces, you may want to use [Button] nodes instead. To make button nodes react to touch events, you can enable the Emulate Mouse option in the Project Settings.
You can configure TouchScreenButton to be visible only on touch devices, helping you develop your game both for desktop and mobile devices.
</description>
@@ -30,7 +30,8 @@
The button's texture for the normal state.
</member>
<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false">
- If [code]true[/code], pass-by presses are enabled.
+ If [code]true[/code], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.
+ [b]Note:[/b] this is a "pass-by" (not "bypass") press mode.
</member>
<member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
The button's texture for the pressed state.
@@ -42,7 +43,7 @@
If [code]true[/code], the button's shape is centered in the provided texture. If no texture is used, this property has no effect.
</member>
<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true">
- If [code]true[/code], the button's shape is visible.
+ If [code]true[/code], the button's shape is visible in the editor.
</member>
<member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode" default="0">
The button's visibility mode. See [enum VisibilityMode] for possible values.
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index cda69f6a64..9d8721e2de 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -58,14 +58,14 @@
Constructs a Transform from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
</description>
</method>
- <method name="affine_inverse">
+ <method name="affine_inverse" qualifiers="const">
<return type="Transform">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
</description>
</method>
- <method name="interpolate_with">
+ <method name="interpolate_with" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="xform" type="Transform">
@@ -76,14 +76,14 @@
Interpolates the transform to other Transform by weight amount (on the range of 0.0 to 1.0).
</description>
</method>
- <method name="inverse">
+ <method name="inverse" qualifiers="const">
<return type="Transform">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling).
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="xform" type="Transform">
@@ -92,12 +92,12 @@
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
- <method name="looking_at">
+ <method name="looking_at" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="target" type="Vector3">
</argument>
- <argument index="1" name="up" type="Vector3">
+ <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )">
</argument>
<description>
Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position.
@@ -153,14 +153,14 @@
<description>
</description>
</method>
- <method name="orthonormalized">
+ <method name="orthonormalized" qualifiers="const">
<return type="Transform">
</return>
<description>
Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors.
</description>
</method>
- <method name="rotated">
+ <method name="rotated" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="axis" type="Vector3">
@@ -171,7 +171,7 @@
Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector.
</description>
</method>
- <method name="scaled">
+ <method name="scaled" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="scale" type="Vector3">
@@ -180,7 +180,7 @@
Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description>
</method>
- <method name="translated">
+ <method name="translated" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="offset" type="Vector3">
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index ff291663fa..6ae7fbcf79 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -54,14 +54,14 @@
Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors).
</description>
</method>
- <method name="affine_inverse">
+ <method name="affine_inverse" qualifiers="const">
<return type="Transform2D">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
</description>
</method>
- <method name="basis_xform">
+ <method name="basis_xform" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="v" type="Vector2">
@@ -71,7 +71,7 @@
This method does not account for translation (the origin vector).
</description>
</method>
- <method name="basis_xform_inv">
+ <method name="basis_xform_inv" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="v" type="Vector2">
@@ -81,46 +81,46 @@
This method does not account for translation (the origin vector).
</description>
</method>
- <method name="get_origin">
+ <method name="get_origin" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the transform's origin (translation).
</description>
</method>
- <method name="get_rotation">
+ <method name="get_rotation" qualifiers="const">
<return type="float">
</return>
<description>
Returns the transform's rotation (in radians).
</description>
</method>
- <method name="get_scale">
+ <method name="get_scale" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the scale.
</description>
</method>
- <method name="interpolate_with">
+ <method name="interpolate_with" qualifiers="const">
<return type="Transform2D">
</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">
+ <method name="inverse" qualifiers="const">
<return type="Transform2D">
</return>
<description>
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling).
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="xform" type="Transform2D">
@@ -185,14 +185,14 @@
<description>
</description>
</method>
- <method name="orthonormalized">
+ <method name="orthonormalized" qualifiers="const">
<return type="Transform2D">
</return>
<description>
Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
</description>
</method>
- <method name="rotated">
+ <method name="rotated" qualifiers="const">
<return type="Transform2D">
</return>
<argument index="0" name="phi" type="float">
@@ -201,7 +201,7 @@
Rotates the transform by the given angle (in radians), using matrix multiplication.
</description>
</method>
- <method name="scaled">
+ <method name="scaled" qualifiers="const">
<return type="Transform2D">
</return>
<argument index="0" name="scale" type="Vector2">
@@ -210,7 +210,7 @@
Scales the transform by the given scale factor, using matrix multiplication.
</description>
</method>
- <method name="translated">
+ <method name="translated" qualifiers="const">
<return type="Transform2D">
</return>
<argument index="0" name="offset" type="Vector2">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 0b2fb80480..a09f1bf470 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -6,16 +6,30 @@
<description>
This shows a tree of items that can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like text editing, buttons and popups. It can be useful for structured displays and interactions.
Trees are built via code, using [TreeItem] objects to create the structure. They have a single root but multiple roots can be simulated if a dummy hidden root is added.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
var tree = Tree.new()
var root = tree.create_item()
- tree.set_hide_root(true)
+ tree.hide_root = true
var child1 = tree.create_item(root)
var child2 = tree.create_item(root)
var subchild1 = tree.create_item(child1)
subchild1.set_text(0, "Subchild1")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var tree = new Tree();
+ TreeItem root = tree.CreateItem();
+ tree.HideRoot = true;
+ TreeItem child1 = tree.CreateItem(root);
+ TreeItem child2 = tree.CreateItem(root);
+ TreeItem subchild1 = tree.CreateItem(child1);
+ subchild1.SetText(0, "Subchild1");
+ }
+ [/csharp]
+ [/codeblocks]
To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree].
</description>
<tutorials>
@@ -35,6 +49,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>
@@ -48,6 +71,13 @@
The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings.
</description>
</method>
+ <method name="edit_selected">
+ <return type="bool">
+ </return>
+ <description>
+ Edits the selected tree item as if it was clicked. The item must be set editable with [method TreeItem.set_editable]. Returns [code]true[/code] if the item could be edited. Fails if no item is selected.
+ </description>
+ </method>
<method name="ensure_cursor_is_visible">
<return type="void">
</return>
@@ -75,6 +105,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>
@@ -106,14 +165,34 @@
<return type="TreeItem">
</return>
<description>
- Returns the currently edited item. This is only available for custom cell mode.
+ Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified.
+ [codeblocks]
+ [gdscript]
+ func _ready():
+ $Tree.item_edited.connect(on_Tree_item_edited)
+
+ func on_Tree_item_edited():
+ print($Tree.get_edited()) # This item just got edited (e.g. checked).
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ GetNode&lt;Tree&gt;("Tree").ItemEdited += OnTreeItemEdited;
+ }
+
+ public void OnTreeItemEdited()
+ {
+ GD.Print(GetNode&lt;Tree&gt;("Tree").GetEdited()); // This item just got edited (e.g. checked).
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_edited_column" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the column for the currently edited item. This is only available for custom cell mode.
+ Returns the column for the currently edited item.
</description>
</method>
<method name="get_item_area_rect" qualifiers="const">
@@ -185,6 +264,14 @@
To tell whether a column of an item is selected, use [method TreeItem.is_selected].
</description>
</method>
+ <method name="scroll_to_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="item" type="Object">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_column_expand">
<return type="void">
</return>
@@ -218,6 +305,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>
@@ -391,7 +513,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.
@@ -441,9 +566,15 @@
<theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )">
Default text [Color] of the item.
</theme_item>
- <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
+ <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of text outline of the item.
+ </theme_item>
+ <theme_item name="font_selected_color" 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>
@@ -453,6 +584,9 @@
<theme_item name="item_margin" type="int" default="12">
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
</theme_item>
+ <theme_item name="outline_size" type="int" default="0">
+ The size of the text outline.
+ </theme_item>
<theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )">
[Color] of the relationship lines.
</theme_item>
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index 22e643a51d..add23c2ce6 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,12 +193,22 @@
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>
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns the metadata value that was set for the given column using [method set_metadata].
</description>
</method>
<method name="get_next">
@@ -209,6 +228,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>
@@ -239,6 +269,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="get_range_config">
@@ -247,6 +278,23 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
+ </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">
@@ -255,6 +303,7 @@
<argument index="0" name="column" type="int">
</argument>
<description>
+ Gets the suffix string shown after the column value.
</description>
</method>
<method name="get_text" qualifiers="const">
@@ -275,6 +324,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 +591,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>
@@ -541,6 +610,20 @@
<argument index="1" name="meta" type="Variant">
</argument>
<description>
+ Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
+ </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">
@@ -551,6 +634,7 @@
<argument index="1" name="value" type="float">
</argument>
<description>
+ Sets the value of a [constant CELL_MODE_RANGE] column.
</description>
</method>
<method name="set_range_config">
@@ -567,6 +651,8 @@
<argument index="4" name="expr" type="bool" default="false">
</argument>
<description>
+ Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
+ If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
</description>
</method>
<method name="set_selectable">
@@ -580,6 +666,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>
@@ -588,6 +694,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
+ Sets a string to be shown after a column's value (for example, a unit abbreviation).
</description>
</method>
<method name="set_text">
@@ -598,6 +705,7 @@
<argument index="1" name="text" type="String">
</argument>
<description>
+ Sets the given column's text value.
</description>
</method>
<method name="set_text_align">
@@ -611,6 +719,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>
@@ -622,6 +741,12 @@
Sets the given column's tooltip text.
</description>
</method>
+ <method name="uncollapse_tree">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed">
@@ -639,7 +764,7 @@
Cell contains a string.
</constant>
<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
- Cell can be checked.
+ Cell contains a checkbox.
</constant>
<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
Cell contains a range.
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index 56ccaaf383..00cca40093 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -7,14 +7,23 @@
Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name [i]tween[/i] comes from [i]in-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them.
[Tween] is more suited than [AnimationPlayer] for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a [Tween] node; it would be difficult to do the same thing with an [AnimationPlayer] node.
Here is a brief usage example that makes a 2D node move smoothly between two positions:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var tween = get_node("Tween")
tween.interpolate_property($Node2D, "position",
Vector2(0, 0), Vector2(100, 100), 1,
Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
tween.start()
- [/codeblock]
- Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component.
+ [/gdscript]
+ [csharp]
+ var tween = GetNode&lt;Tween&gt;("Tween");
+ tween.InterpolateProperty(GetNode&lt;Node2D&gt;("Node2D"), "position",
+ new Vector2(0, 0), new Vector2(100, 100), 1,
+ Tween.TransitionType.Linear, Tween.EaseType.InOut);
+ tween.Start();
+ [/csharp]
+ [/codeblocks]
+ Many methods require a property name, such as [code]"position"[/code] above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (e.g. [code]position:x[/code]), where it would only apply to that particular component.
Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [url=https://easings.net/]easings.net[/url] for some examples). The second accepts an [enum EaseType] constant, and controls where the [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best.
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/tween_cheatsheet.png]Tween easing and transition types cheatsheet[/url]
</description>
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml
index aabfed85f0..0fc00f67f8 100644
--- a/doc/classes/UDPServer.xml
+++ b/doc/classes/UDPServer.xml
@@ -7,8 +7,9 @@
A simple server that opens a UDP socket and returns connected [PacketPeerUDP] upon receiving new packets. See also [method PacketPeerUDP.connect_to_host].
After starting the server ([method listen]), you will need to [method poll] it at regular intervals (e.g. inside [method Node._process]) for it to process new packets, delivering them to the appropriate [PacketPeerUDP], and taking new connections.
Below a small example of how it can be used:
- [codeblock]
- # server.gd
+ [codeblocks]
+ [gdscript]
+ class_name Server
extends Node
var server := UDPServer.new()
@@ -21,20 +22,57 @@
server.poll() # Important!
if server.is_connection_available():
var peer : PacketPeerUDP = server.take_connection()
- var pkt = peer.get_packet()
+ var packet = peer.get_packet()
print("Accepted peer: %s:%s" % [peer.get_packet_ip(), peer.get_packet_port()])
- print("Received data: %s" % [pkt.get_string_from_utf8()])
+ print("Received data: %s" % [packet.get_string_from_utf8()])
# Reply so it knows we received the message.
- peer.put_packet(pkt)
+ peer.put_packet(packet)
# Keep a reference so we can keep contacting the remote peer.
peers.append(peer)
for i in range(0, peers.size()):
pass # Do something with the connected peers.
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Collections.Generic;
- [/codeblock]
- [codeblock]
- # client.gd
+ public class Server : Node
+ {
+ public UDPServer Server = new UDPServer();
+ public List&lt;PacketPeerUDP&gt; Peers = new List&lt;PacketPeerUDP&gt;();
+
+ public override void _Ready()
+ {
+ Server.Listen(4242);
+ }
+
+ public override void _Process(float delta)
+ {
+ Server.Poll(); // Important!
+ if (Server.IsConnectionAvailable())
+ {
+ PacketPeerUDP peer = Server.TakeConnection();
+ byte[] packet = peer.GetPacket();
+ GD.Print($"Accepted Peer: {peer.GetPacketIp()}:{peer.GetPacketPort()}");
+ GD.Print($"Received Data: {packet.GetStringFromUTF8()}");
+ // Reply so it knows we received the message.
+ peer.PutPacket(packet);
+ // Keep a reference so we can keep contacting the remote peer.
+ Peers.Add(peer);
+ }
+ foreach (var peer in Peers)
+ {
+ // Do something with the peers.
+ }
+ }
+ }
+ [/csharp]
+ [/codeblocks]
+ [codeblocks]
+ [gdscript]
+ class_name Client
extends Node
var udp := PacketPeerUDP.new()
@@ -50,7 +88,37 @@
if udp.get_available_packet_count() &gt; 0:
print("Connected: %s" % udp.get_packet().get_string_from_utf8())
connected = true
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+
+ public class Client : Node
+ {
+ public PacketPeerUDP Udp = new PacketPeerUDP();
+ public bool Connected = false;
+
+ public override void _Ready()
+ {
+ Udp.ConnectToHost("127.0.0.1", 4242);
+ }
+
+ public override void _Process(float delta)
+ {
+ if (!Connected)
+ {
+ // Try to contact server
+ Udp.PutPacket("The Answer Is..42!".ToUTF8());
+ }
+ if (Udp.GetAvailablePacketCount() &gt; 0)
+ {
+ GD.Print($"Connected: {Udp.GetPacket().GetStringFromUTF8()}");
+ Connected = true;
+ }
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml
index 2cc3e974e2..aba6183124 100644
--- a/doc/classes/UndoRedo.xml
+++ b/doc/classes/UndoRedo.xml
@@ -7,7 +7,8 @@
Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions".
Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action.
Here's an example on how to add an action to the Godot editor's own [UndoRedo], from a plugin:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var undo_redo = get_undo_redo() # Method of EditorPlugin.
func do_something():
@@ -24,7 +25,37 @@
undo_redo.add_do_property(node, "position", Vector2(100,100))
undo_redo.add_undo_property(node, "position", node.position)
undo_redo.commit_action()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public UndoRedo UndoRedo;
+
+ public override void _Ready()
+ {
+ UndoRedo = GetUndoRedo(); // Method of EditorPlugin.
+ }
+
+ public void DoSomething()
+ {
+ // Put your code here.
+ }
+
+ public void UndoSomething()
+ {
+ // Put here the code that reverts what's done by "DoSomething()".
+ }
+
+ private void OnMyButtonPressed()
+ {
+ var node = GetNode&lt;Node2D&gt;("MyNode2D");
+ UndoRedo.CreateAction("Move the node");
+ UndoRedo.AddDoMethod(this, nameof(DoSomething));
+ UndoRedo.AddUndoMethod(this, nameof(UndoSomething));
+ UndoRedo.AddDoProperty(node, "position", new Vector2(100, 100));
+ UndoRedo.AddUndoProperty(node, "position", node.Position);
+ UndoRedo.CommitAction();
+ }
+ [/csharp]
+ [/codeblocks]
[method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes.
If you don't need to register a method, you can leave [method add_do_method] and [method add_undo_method] out; the same goes for properties. You can also register more than one method/property.
</description>
@@ -110,8 +141,10 @@
<method name="commit_action">
<return type="void">
</return>
+ <argument index="0" name="execute" type="bool" default="true">
+ </argument>
<description>
- Commit the action. All "do" methods/properties are called/set when this function is called.
+ Commit the action. If [code]execute[/code] is true (default), all "do" methods/properties are called/set when this function is called.
</description>
</method>
<method name="create_action">
@@ -126,11 +159,34 @@
The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details.
</description>
</method>
+ <method name="get_action_name">
+ <return type="String">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ Gets the action name from its index.
+ </description>
+ </method>
+ <method name="get_current_action">
+ <return type="int">
+ </return>
+ <description>
+ Gets the index of the current action.
+ </description>
+ </method>
<method name="get_current_action_name" qualifiers="const">
<return type="String">
</return>
<description>
- Gets the name of the current action.
+ Gets the name of the current action, equivalent to [code]get_action_name(get_current_action())[/code].
+ </description>
+ </method>
+ <method name="get_history_count">
+ <return type="int">
+ </return>
+ <description>
+ Return how many elements are in the history.
</description>
</method>
<method name="get_version" qualifiers="const">
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index cd76689ffe..775bd58bcf 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -17,7 +17,7 @@
- VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time.
- C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept.
- The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects.
- The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
+ The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblock]
var foo = 2
match typeof(foo):
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index f99231de39..b979425b85 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -53,23 +53,23 @@
Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code].
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns a new vector with all components in absolute values (i.e. positive).
</description>
</method>
- <method name="angle">
+ <method name="angle" qualifiers="const">
<return type="float">
</return>
<description>
Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians.
For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees).
- Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
+ Equivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code].
</description>
</method>
- <method name="angle_to">
+ <method name="angle_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to" type="Vector2">
@@ -78,7 +78,7 @@
Returns the angle to the given vector, in radians.
</description>
</method>
- <method name="angle_to_point">
+ <method name="angle_to_point" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to" type="Vector2">
@@ -87,14 +87,14 @@
Returns the angle between the line connecting the two points and the X axis, in radians.
</description>
</method>
- <method name="aspect">
+ <method name="aspect" qualifiers="const">
<return type="float">
</return>
<description>
Returns the aspect ratio of this vector, the ratio of [member x] to [member y].
</description>
</method>
- <method name="bounce">
+ <method name="bounce" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="n" type="Vector2">
@@ -103,14 +103,14 @@
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
</method>
- <method name="ceil">
+ <method name="ceil" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the vector with all components rounded up (towards positive infinity).
</description>
</method>
- <method name="clamped">
+ <method name="clamped" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="length" type="float">
@@ -119,7 +119,7 @@
Returns the vector with a maximum length by limiting its length to [code]length[/code].
</description>
</method>
- <method name="cross">
+ <method name="cross" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector2">
@@ -128,7 +128,7 @@
Returns the cross product of this vector and [code]with[/code].
</description>
</method>
- <method name="cubic_interpolate">
+ <method name="cubic_interpolate" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="b" type="Vector2">
@@ -137,22 +137,22 @@
</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">
+ <method name="direction_to" qualifiers="const">
<return type="Vector2">
</return>
<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">
+ <method name="distance_squared_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to" type="Vector2">
@@ -162,7 +162,7 @@
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
- <method name="distance_to">
+ <method name="distance_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to" type="Vector2">
@@ -171,7 +171,7 @@
Returns the distance between this vector and [code]to[/code].
</description>
</method>
- <method name="dot">
+ <method name="dot" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector2">
@@ -183,37 +183,37 @@
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
</description>
</method>
- <method name="floor">
+ <method name="floor" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the vector with all components rounded down (towards negative infinity).
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="is_normalized">
+ <method name="is_normalized" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
</description>
</method>
- <method name="length">
+ <method name="length" qualifiers="const">
<return type="float">
</return>
<description>
Returns the length (magnitude) of this vector.
</description>
</method>
- <method name="length_squared">
+ <method name="length_squared" qualifiers="const">
<return type="float">
</return>
<description>
@@ -221,18 +221,18 @@
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
- <method name="lerp">
+ <method name="lerp" qualifiers="const">
<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.
</description>
</method>
- <method name="move_toward">
+ <method name="move_toward" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="to" type="Vector2">
@@ -243,7 +243,7 @@
Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
</description>
</method>
- <method name="normalized">
+ <method name="normalized" qualifiers="const">
<return type="Vector2">
</return>
<description>
@@ -390,25 +390,32 @@
<description>
</description>
</method>
- <method name="posmod">
+ <method name="orthogonal" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.
+ </description>
+ </method>
+ <method name="posmod" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
- <method name="posmodv">
+ <method name="posmodv" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="modv" type="Vector2">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
- <method name="project">
+ <method name="project" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="b" type="Vector2">
@@ -417,7 +424,7 @@
Returns the vector projected onto the vector [code]b[/code].
</description>
</method>
- <method name="reflect">
+ <method name="reflect" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="n" type="Vector2">
@@ -426,42 +433,42 @@
Returns the vector reflected from a plane defined by the given normal.
</description>
</method>
- <method name="rotated">
+ <method name="rotated" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="phi" type="float">
</argument>
<description>
- Returns the vector rotated by [code]phi[/code] radians. See also [method @GDScript.deg2rad].
+ Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad].
</description>
</method>
- <method name="round">
+ <method name="round" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
- <method name="sign">
+ <method name="sign" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
+ Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
</description>
</method>
- <method name="slerp">
+ <method name="slerp" qualifiers="const">
<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.
[b]Note:[/b] Both vectors must be normalized.
</description>
</method>
- <method name="slide">
+ <method name="slide" qualifiers="const">
<return type="Vector2">
</return>
<argument index="0" name="n" type="Vector2">
@@ -470,22 +477,15 @@
Returns this vector slid along a plane defined by the given normal.
</description>
</method>
- <method name="snapped">
+ <method name="snapped" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="by" type="Vector2">
+ <argument index="0" name="step" type="Vector2">
</argument>
<description>
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">
- <return type="Vector2">
- </return>
- <description>
- Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length.
- </description>
- </method>
</methods>
<members>
<member name="x" type="float" setter="" getter="" default="0.0">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index a4ea5c2742..b38b968ba3 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -50,14 +50,14 @@
Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code].
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Vector2i">
</return>
<description>
Returns a new vector with all components in absolute values (i.e. positive).
</description>
</method>
- <method name="aspect">
+ <method name="aspect" qualifiers="const">
<return type="float">
</return>
<description>
@@ -212,7 +212,7 @@
<description>
</description>
</method>
- <method name="sign">
+ <method name="sign" qualifiers="const">
<return type="Vector2i">
</return>
<description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 6ba0d6ab8d..bd568e01ec 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -55,23 +55,23 @@
Returns a [Vector3] with the given components.
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns a new vector with all components in absolute values (i.e. positive).
</description>
</method>
- <method name="angle_to">
+ <method name="angle_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="to" type="Vector3">
</argument>
<description>
- Returns the minimum angle to the given vector, in radians.
+ Returns the unsigned minimum angle to the given vector, in radians.
</description>
</method>
- <method name="bounce">
+ <method name="bounce" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="n" type="Vector3">
@@ -80,14 +80,14 @@
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
</method>
- <method name="ceil">
+ <method name="ceil" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns a new vector with all components rounded up (towards positive infinity).
</description>
</method>
- <method name="cross">
+ <method name="cross" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="with" type="Vector3">
@@ -96,7 +96,7 @@
Returns the cross product of this vector and [code]b[/code].
</description>
</method>
- <method name="cubic_interpolate">
+ <method name="cubic_interpolate" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="b" type="Vector3">
@@ -105,22 +105,22 @@
</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">
+ <method name="direction_to" qualifiers="const">
<return type="Vector3">
</return>
<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">
+ <method name="distance_squared_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="b" type="Vector3">
@@ -130,7 +130,7 @@
This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
- <method name="distance_to">
+ <method name="distance_to" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="b" type="Vector3">
@@ -139,7 +139,7 @@
Returns the distance between this vector and [code]b[/code].
</description>
</method>
- <method name="dot">
+ <method name="dot" qualifiers="const">
<return type="float">
</return>
<argument index="0" name="with" type="Vector3">
@@ -151,44 +151,44 @@
[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code].
</description>
</method>
- <method name="floor">
+ <method name="floor" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns a new vector with all components rounded down (towards negative infinity).
</description>
</method>
- <method name="inverse">
+ <method name="inverse" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code].
</description>
</method>
- <method name="is_equal_approx">
+ <method name="is_equal_approx" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="to" type="Vector3">
</argument>
<description>
- Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
- <method name="is_normalized">
+ <method name="is_normalized" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
</description>
</method>
- <method name="length">
+ <method name="length" qualifiers="const">
<return type="float">
</return>
<description>
Returns the length (magnitude) of this vector.
</description>
</method>
- <method name="length_squared">
+ <method name="length_squared" qualifiers="const">
<return type="float">
</return>
<description>
@@ -196,32 +196,32 @@
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
</description>
</method>
- <method name="lerp">
+ <method name="lerp" qualifiers="const">
<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">
+ <method name="max_axis" qualifiers="const">
<return type="int">
</return>
<description>
Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="min_axis">
+ <method name="min_axis" qualifiers="const">
<return type="int">
</return>
<description>
Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z].
</description>
</method>
- <method name="move_toward">
+ <method name="move_toward" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="to" type="Vector3">
@@ -232,7 +232,7 @@
Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount.
</description>
</method>
- <method name="normalized">
+ <method name="normalized" qualifiers="const">
<return type="Vector3">
</return>
<description>
@@ -395,7 +395,7 @@
<description>
</description>
</method>
- <method name="outer">
+ <method name="outer" qualifiers="const">
<return type="Basis">
</return>
<argument index="0" name="with" type="Vector3">
@@ -404,25 +404,25 @@
Returns the outer product with [code]b[/code].
</description>
</method>
- <method name="posmod">
+ <method name="posmod" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="mod" type="float">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]mod[/code].
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code].
</description>
</method>
- <method name="posmodv">
+ <method name="posmodv" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="modv" type="Vector3">
</argument>
<description>
- Returns a vector composed of the [method @GDScript.fposmod] of this vector's components and [code]modv[/code]'s components.
+ Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components.
</description>
</method>
- <method name="project">
+ <method name="project" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="b" type="Vector3">
@@ -431,7 +431,7 @@
Returns this vector projected onto another vector [code]b[/code].
</description>
</method>
- <method name="reflect">
+ <method name="reflect" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="n" type="Vector3">
@@ -440,7 +440,7 @@
Returns this vector reflected from a plane defined by the given normal.
</description>
</method>
- <method name="rotated">
+ <method name="rotated" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="by_axis" type="Vector3">
@@ -451,33 +451,44 @@
Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector.
</description>
</method>
- <method name="round">
+ <method name="round" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero.
</description>
</method>
- <method name="sign">
+ <method name="sign" qualifiers="const">
<return type="Vector3">
</return>
<description>
- Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GDScript.sign] on each component.
+ Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component.
+ </description>
+ </method>
+ <method name="signed_angle_to" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="to" type="Vector3">
+ </argument>
+ <argument index="1" name="axis" type="Vector3">
+ </argument>
+ <description>
+ Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code].
</description>
</method>
- <method name="slerp">
+ <method name="slerp" qualifiers="const">
<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.
[b]Note:[/b] Both vectors must be normalized.
</description>
</method>
- <method name="slide">
+ <method name="slide" qualifiers="const">
<return type="Vector3">
</return>
<argument index="0" name="n" type="Vector3">
@@ -486,16 +497,16 @@
Returns this vector slid along a plane defined by the given normal.
</description>
</method>
- <method name="snapped">
+ <method name="snapped" qualifiers="const">
<return type="Vector3">
</return>
- <argument index="0" name="by" type="Vector3">
+ <argument index="0" name="step" type="Vector3">
</argument>
<description>
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="to_diagonal_matrix">
+ <method name="to_diagonal_matrix" qualifiers="const">
<return type="Basis">
</return>
<description>
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index a1ae2aceab..ea5945f5b7 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -52,20 +52,20 @@
Returns a [Vector3i] with the given components.
</description>
</method>
- <method name="abs">
+ <method name="abs" qualifiers="const">
<return type="Vector3i">
</return>
<description>
</description>
</method>
- <method name="max_axis">
+ <method name="max_axis" qualifiers="const">
<return type="int">
</return>
<description>
Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
</description>
</method>
- <method name="min_axis">
+ <method name="min_axis" qualifiers="const">
<return type="int">
</return>
<description>
@@ -220,7 +220,7 @@
<description>
</description>
</method>
- <method name="sign">
+ <method name="sign" qualifiers="const">
<return type="Vector3i">
</return>
<description>
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..b2ab356b0d 100644
--- a/doc/classes/VideoPlayer.xml
+++ b/doc/classes/VideoPlayer.xml
@@ -6,6 +6,8 @@
<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.
+ [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 85dc5e8fd8..471d21374d 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -80,9 +80,9 @@
</return>
<description>
Returns the viewport's texture.
- [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_data] to flip it back, for example:
+ [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example:
[codeblock]
- var img = get_viewport().get_texture().get_data()
+ var img = get_viewport().get_texture().get_image()
img.flip_y()
[/codeblock]
</description>
@@ -213,7 +213,7 @@
The global canvas transform of the viewport. The canvas transform is relative to this.
</member>
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
- If [code]true[/code], the viewport will not receive input event.
+ If [code]true[/code], the viewport will not receive input events.
</member>
<member name="gui_embed_subwindows" type="bool" setter="set_embed_subwindows_hint" getter="get_embed_subwindows_hint" default="false">
</member>
@@ -222,6 +222,8 @@
</member>
<member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true">
</member>
+ <member name="lod_threshold" type="float" setter="set_lod_threshold" getter="get_lod_threshold" default="1.0">
+ </member>
<member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0">
The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems.
</member>
@@ -234,6 +236,12 @@
<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_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true">
+ </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>
@@ -246,9 +254,9 @@
<member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
The subdivision amount of the fourth quadrant on the shadow atlas.
</member>
- <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0">
+ <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048">
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
- [b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
+ [b]Note:[/b] If this is set to 0, shadows won't be visible.
</member>
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
</member>
@@ -401,6 +409,16 @@
</constant>
<constant name="DEBUG_DRAW_GI_BUFFER" value="17" enum="DebugDraw">
</constant>
+ <constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="DebugDraw">
+ </constant>
+ <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw">
+ </constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
</constant>
@@ -428,5 +446,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/VisualShader.xml b/doc/classes/VisualShader.xml
index f03550bd5e..c29c30289a 100644
--- a/doc/classes/VisualShader.xml
+++ b/doc/classes/VisualShader.xml
@@ -169,6 +169,19 @@
Removes the specified node from the shader.
</description>
</method>
+ <method name="replace_node">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="VisualShader.Type">
+ </argument>
+ <argument index="1" name="id" type="int">
+ </argument>
+ <argument index="2" name="new_class" type="StringName">
+ </argument>
+ <description>
+ Replaces the specified node with a node of new class type.
+ </description>
+ </method>
<method name="set_mode">
<return type="void">
</return>
diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml
index cccb64e874..688679f2a3 100644
--- a/doc/classes/VisualShaderNodeBooleanConstant.xml
+++ b/doc/classes/VisualShaderNodeBooleanConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A boolean constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml
new file mode 100644
index 0000000000..504171bb13
--- /dev/null
+++ b/doc/classes/VisualShaderNodeClamp.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeClamp" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Clamps a value within the visual shader graph.
+ </brief_description>
+ <description>
+ Constrains a value to lie between [code]min[/code] and [code]max[/code] values.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeClamp.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_FLOAT" value="0" enum="OpType">
+ A floating-point scalar.
+ </constant>
+ <constant name="OP_TYPE_INT" value="1" enum="OpType">
+ An integer scalar.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml
index 9b122ca8e1..8644013ef2 100644
--- a/doc/classes/VisualShaderNodeColorConstant.xml
+++ b/doc/classes/VisualShaderNodeColorConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A [Color] constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml
new file mode 100644
index 0000000000..8c61529dd1
--- /dev/null
+++ b/doc/classes/VisualShaderNodeConstant.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeConstant" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A base type for the constants within the visual shader graph.
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml
index b6813bdae8..13b367e8f2 100644
--- a/doc/classes/VisualShaderNodeCubemap.xml
+++ b/doc/classes/VisualShaderNodeCubemap.xml
@@ -34,7 +34,7 @@
<constant name="TYPE_COLOR" value="1" enum="TextureType">
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
</constant>
- <constant name="TYPE_NORMALMAP" value="2" enum="TextureType">
+ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml
index 59b501660a..17fc2f8c4d 100644
--- a/doc/classes/VisualShaderNodeCustom.xml
+++ b/doc/classes/VisualShaderNodeCustom.xml
@@ -20,7 +20,7 @@
<return type="String">
</return>
<description>
- Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may looks like [code]"MyGame/MyFunctions/Noise"[/code].
+ Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code].
Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category.
</description>
</method>
diff --git a/doc/classes/VisualShaderNodeDeterminant.xml b/doc/classes/VisualShaderNodeDeterminant.xml
index 72be31872d..6b042f6172 100644
--- a/doc/classes/VisualShaderNodeDeterminant.xml
+++ b/doc/classes/VisualShaderNodeDeterminant.xml
@@ -4,7 +4,7 @@
Calculates the determinant of a [Transform] within the visual shader graph.
</brief_description>
<description>
- Translates to [code]deteminant(x)[/code] in the shader language.
+ Translates to [code]determinant(x)[/code] in the shader language.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml
index f571edaab3..c2cbf41f45 100644
--- a/doc/classes/VisualShaderNodeExpression.xml
+++ b/doc/classes/VisualShaderNodeExpression.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Custom Godot Shading Language expression, with a custom amount of input and output ports.
- The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions.
+ The provided code is directly injected into the graph's matching shader function ([code]vertex[/code], [code]fragment[/code], or [code]light[/code]), so it cannot be used to declare functions, varyings, uniforms, or global constants. See [VisualShaderNodeGlobalExpression] for such global definitions.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeFaceForward.xml b/doc/classes/VisualShaderNodeFaceForward.xml
index 5ef08ea8c2..48f84e5495 100644
--- a/doc/classes/VisualShaderNodeFaceForward.xml
+++ b/doc/classes/VisualShaderNodeFaceForward.xml
@@ -4,7 +4,7 @@
Returns the vector that points in the same direction as a reference vector within the visual shader graph.
</brief_description>
<description>
- Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise [code]-N[/code] is returned.
+ Translates to [code]faceforward(N, I, Nref)[/code] in the shader language. The function has three vector parameters: [code]N[/code], the vector to orient, [code]I[/code], the incident vector, and [code]Nref[/code], the reference vector. If the dot product of [code]I[/code] and [code]Nref[/code] is smaller than zero the return value is [code]N[/code]. Otherwise, [code]-N[/code] is returned.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index 3ba9ff07d3..a71563af54 100644
--- a/doc/classes/VisualShaderNodeFloatConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A scalar floating-point constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml
index afa14c776e..be3f7f173d 100644
--- a/doc/classes/VisualShaderNodeGroupBase.xml
+++ b/doc/classes/VisualShaderNodeGroupBase.xml
@@ -74,7 +74,7 @@
<return type="String">
</return>
<description>
- Returns a [String] description of the input ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]).
+ Returns a [String] description of the input ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]).
</description>
</method>
<method name="get_output_port_count" qualifiers="const">
@@ -88,7 +88,7 @@
<return type="String">
</return>
<description>
- Returns a [String] description of the output ports as as colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]).
+ Returns a [String] description of the output ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]).
</description>
</method>
<method name="has_input_port" qualifiers="const">
diff --git a/doc/classes/VisualShaderNodeIf.xml b/doc/classes/VisualShaderNodeIf.xml
index ad0b21a370..418999863b 100644
--- a/doc/classes/VisualShaderNodeIf.xml
+++ b/doc/classes/VisualShaderNodeIf.xml
@@ -4,7 +4,7 @@
Compares two floating-point numbers in order to return a required vector within the visual shader graph.
</brief_description>
<description>
- First two ports are scalar floatin-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectively.
+ First two ports are scalar floating-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if [code]a == b[/code], [code]a &gt; b[/code] and [code]a &lt; b[/code] respectively.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 8e819b011c..067f78dffe 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -14,7 +14,7 @@
<return type="String">
</return>
<description>
- Returns a translated name of the current constant in the Godot Shader Language. eg. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
+ Returns a translated name of the current constant in the Godot Shader Language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
index 1c407b21ca..18d6e96ab5 100644
--- a/doc/classes/VisualShaderNodeIntConstant.xml
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A scalar integer constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml
index 5c68c0ec71..a9f4144a01 100644
--- a/doc/classes/VisualShaderNodeIntFunc.xml
+++ b/doc/classes/VisualShaderNodeIntFunc.xml
@@ -11,7 +11,7 @@
<methods>
</methods>
<members>
- <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3">
+ <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2">
A function to be applied to the scalar. See [enum Function] for options.
</member>
</members>
@@ -19,13 +19,10 @@
<constant name="FUNC_ABS" value="0" enum="Function">
Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language.
</constant>
- <constant name="FUNC_CLAMP" value="1" enum="Function">
- Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language.
- </constant>
- <constant name="FUNC_NEGATE" value="2" enum="Function">
+ <constant name="FUNC_NEGATE" value="1" enum="Function">
Negates the [code]x[/code] using [code]-(x)[/code].
</constant>
- <constant name="FUNC_SIGN" value="3" enum="Function">
+ <constant name="FUNC_SIGN" value="2" enum="Function">
Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml
new file mode 100644
index 0000000000..c70ac7e599
--- /dev/null
+++ b/doc/classes/VisualShaderNodeMix.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeMix" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Linearly interpolates between two values within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]mix(a, b, weight)[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMix.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]weight[/code] port is using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml
new file mode 100644
index 0000000000..775f2814c2
--- /dev/null
+++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeSDFRaymarch" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ SDF raymarching algorithm to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Casts a ray against the screen SDF (signed-distance field) and returns the distance travelled.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
new file mode 100644
index 0000000000..40fb66e364
--- /dev/null
+++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeSDFToScreenUV" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A function to convert an SDF (signed-distance field) to screen UV, to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]sdf_to_screen_uv(sdf_pos)[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml
deleted file mode 100644
index 7432e8dfca..0000000000
--- a/doc/classes/VisualShaderNodeScalarClamp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Clamps a scalar value within the visual shader graph.
- </brief_description>
- <description>
- Constrains a value to lie between [code]min[/code] and [code]max[/code] values.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml
deleted file mode 100644
index 393ea70e1a..0000000000
--- a/doc/classes/VisualShaderNodeScalarInterp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two scalars within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml
deleted file mode 100644
index e619cc8571..0000000000
--- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a scalar SmoothStep function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml
deleted file mode 100644
index 2ad5202745..0000000000
--- a/doc/classes/VisualShaderNodeScalarSwitch.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" version="4.0">
- <brief_description>
- A boolean/scalar function for use within the visual shader graph.
- </brief_description>
- <description>
- Returns an associated scalar if the provided boolean value is [code]true[/code] or [code]false[/code].
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
new file mode 100644
index 0000000000..2e121ffc54
--- /dev/null
+++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeScreenUVToSDF" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ A function to convert screen UV to an SDF (signed-distance field), to be used within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]screen_uv_to_sdf(uv)[/code] in the shader language. If the UV port isn't connected, [code]SCREEN_UV[/code] is used instead.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml
new file mode 100644
index 0000000000..0ed53a8c26
--- /dev/null
+++ b/doc/classes/VisualShaderNodeSmoothStep.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeSmoothStep" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Calculates a SmoothStep function within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise, the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSmoothStep.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]edge0[/code] and [code]edge1[/code] are using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml
new file mode 100644
index 0000000000..694c144445
--- /dev/null
+++ b/doc/classes/VisualShaderNodeStep.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeStep" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Calculates a Step function within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]step(edge, x)[/code] in the shader language.
+ Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeStep.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
+ <constants>
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
+ A scalar type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType">
+ A vector type. [code]edge[/code] port is using a scalar type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="3" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 9f8a12c0fd..3961070a74 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -1,15 +1,38 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0">
<brief_description>
- A boolean/vector function for use within the visual shader graph.
+ A selector function for use within the visual shader graph.
</brief_description>
<description>
- Returns an associated vector if the provided boolean value is [code]true[/code] or [code]false[/code].
+ Returns an associated value of the [code]op_type[/code] type if the provided boolean value is [code]true[/code] or [code]false[/code].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
+ <members>
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSwitch.OpType" default="0">
+ A type of operands and returned value.
+ </member>
+ </members>
<constants>
+ <constant name="OP_TYPE_FLOAT" value="0" enum="OpType">
+ A floating-point scalar.
+ </constant>
+ <constant name="OP_TYPE_INT" value="1" enum="OpType">
+ An integer scalar.
+ </constant>
+ <constant name="OP_TYPE_VECTOR" value="2" enum="OpType">
+ A vector type.
+ </constant>
+ <constant name="OP_TYPE_BOOLEAN" value="3" enum="OpType">
+ A boolean type.
+ </constant>
+ <constant name="OP_TYPE_TRANSFORM" value="4" enum="OpType">
+ A transform type.
+ </constant>
+ <constant name="OP_TYPE_MAX" value="5" enum="OpType">
+ Represents the size of the [enum OpType] enum.
+ </constant>
</constants>
</class>
diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml
index 0c83ffffe4..8fa71b490d 100644
--- a/doc/classes/VisualShaderNodeTexture.xml
+++ b/doc/classes/VisualShaderNodeTexture.xml
@@ -46,7 +46,7 @@
<constant name="TYPE_COLOR" value="1" enum="TextureType">
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
</constant>
- <constant name="TYPE_NORMALMAP" value="2" enum="TextureType">
+ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
</constant>
</constants>
diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml
new file mode 100644
index 0000000000..b5c89c2c31
--- /dev/null
+++ b/doc/classes/VisualShaderNodeTextureSDF.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeTextureSDF" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Performs an SDF (signed-distance field) texture lookup within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]texture_sdf(sdf_pos)[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
new file mode 100644
index 0000000000..25fe1c4b28
--- /dev/null
+++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="VisualShaderNodeTextureSDFNormal" inherits="VisualShaderNode" version="4.0">
+ <brief_description>
+ Performs an SDF (signed-distance field) normal texture lookup within the visual shader graph.
+ </brief_description>
+ <description>
+ Translates to [code]texture_sdf_normal(sdf_pos)[/code] in the shader language.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml
index 107f08ba28..5a7474cca1 100644
--- a/doc/classes/VisualShaderNodeTextureUniform.xml
+++ b/doc/classes/VisualShaderNodeTextureUniform.xml
@@ -25,7 +25,7 @@
<constant name="TYPE_COLOR" value="1" enum="TextureType">
Adds [code]hint_albedo[/code] as hint to the uniform declaration for proper sRGB to linear conversion.
</constant>
- <constant name="TYPE_NORMALMAP" value="2" enum="TextureType">
+ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType">
Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map.
</constant>
<constant name="TYPE_ANISO" value="3" enum="TextureType">
diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml
index e5004e5bb6..b8f054e914 100644
--- a/doc/classes/VisualShaderNodeTransformConstant.xml
+++ b/doc/classes/VisualShaderNodeTransformConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A [Transform] constant for use within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml
index 4dfc9dc081..b01bb514fe 100644
--- a/doc/classes/VisualShaderNodeVec3Constant.xml
+++ b/doc/classes/VisualShaderNodeVec3Constant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" version="4.0">
+<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNodeConstant" version="4.0">
<brief_description>
A [Vector3] constant to be used within the visual shader graph.
</brief_description>
diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml
deleted file mode 100644
index 567fed8a41..0000000000
--- a/doc/classes/VisualShaderNodeVectorClamp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Clamps a vector value within the visual shader graph.
- </brief_description>
- <description>
- Constrains a value to lie between [code]min[/code] and [code]max[/code] values. The operation is performed on each component of the vector individually.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml
deleted file mode 100644
index b63d34b742..0000000000
--- a/doc/classes/VisualShaderNodeVectorInterp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two vectors within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]weight[/code] is a [Vector3] with weights for each component.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml
deleted file mode 100644
index 791a9e6be1..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarMix.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Linearly interpolates between two vectors using a scalar. For use within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]a[/code] and [code]b[/code] are vectors and [code]weight[/code] is a scalar.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
deleted file mode 100644
index 580abaf5fe..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector SmoothStep function using scalar within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a scalar.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml
deleted file mode 100644
index d61414f3a8..0000000000
--- a/doc/classes/VisualShaderNodeVectorScalarStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector Step function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]step(edge, x)[/code] in the shader language.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml
deleted file mode 100644
index 1b77a3c535..0000000000
--- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" version="4.0">
- <brief_description>
- Calculates a vector SmoothStep function within the visual shader graph.
- </brief_description>
- <description>
- Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a vector.
- Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials.
- </description>
- <tutorials>
- </tutorials>
- <methods>
- </methods>
- <constants>
- </constants>
-</class>
diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml
index 07d82289a3..4140df5828 100644
--- a/doc/classes/WeakRef.xml
+++ b/doc/classes/WeakRef.xml
@@ -4,7 +4,7 @@
Holds an [Object], but does not contribute to the reference count if the object is a reference.
</brief_description>
<description>
- A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GDScript.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
+ A weakref can hold a [Reference], without contributing to the reference counter. A weakref can be created from an [Object] using [method @GlobalScope.weakref]. If this object is not a reference, weakref still works, however, it does not have any effect on the object. Weakrefs are useful in cases where multiple classes have variables that refer to each other. Without weakrefs, using these classes could lead to memory leaks, since both references keep each other from being released. Making part of the variables a weakref can prevent this cyclic dependency, and allows the references to be released.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index a0711b4214..b99a251a11 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>
@@ -236,7 +276,7 @@
<method name="set_ime_active">
<return type="void">
</return>
- <argument index="0" name="arg0" type="bool">
+ <argument index="0" name="active" type="bool">
</argument>
<description>
</description>
@@ -244,9 +284,18 @@
<method name="set_ime_position">
<return type="void">
</return>
- <argument index="0" name="arg0" type="Vector2i">
+ <argument index="0" name="position" type="Vector2i">
+ </argument>
+ <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">
@@ -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">
@@ -413,8 +474,17 @@
</theme_item>
<theme_item name="title_font" type="Font">
</theme_item>
+ <theme_item name="title_font_size" type="int">
+ The size of the title font.
+ </theme_item>
<theme_item name="title_height" type="int" default="20">
</theme_item>
+ <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ The color of the title outline.
+ </theme_item>
+ <theme_item name="title_outline_size" type="int" default="0">
+ The size of the title outline.
+ </theme_item>
<theme_item name="window_panel" type="StyleBox">
</theme_item>
</theme_items>
diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml
index b0bfd7f418..20b3afbd0b 100644
--- a/doc/classes/World2D.xml
+++ b/doc/classes/World2D.xml
@@ -16,7 +16,10 @@
The [RID] of this world's canvas resource. Used by the [RenderingServer] for 2D drawing.
</member>
<member name="direct_space_state" type="PhysicsDirectSpaceState2D" setter="" getter="get_direct_space_state">
- Direct access to the world's physics 2D space state. Used for querying current and potential collisions. Must only be accessed from the main thread within [code]_physics_process(delta)[/code].
+ Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread.
+ </member>
+ <member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
+ The [RID] of this world's navigation map. Used by the [NavigationServer2D].
</member>
<member name="space" type="RID" setter="" getter="get_space">
The [RID] of this world's physics space resource. Used by the [PhysicsServer2D] for 2D physics, treating it as both a space and an area.
diff --git a/doc/classes/World3D.xml b/doc/classes/World3D.xml
index d804485d4e..610ecacff4 100644
--- a/doc/classes/World3D.xml
+++ b/doc/classes/World3D.xml
@@ -15,7 +15,7 @@
<member name="camera_effects" type="CameraEffects" setter="set_camera_effects" getter="get_camera_effects">
</member>
<member name="direct_space_state" type="PhysicsDirectSpaceState3D" setter="" getter="get_direct_space_state">
- Direct access to the world's physics 3D space state. Used for querying current and potential collisions. Must only be accessed from within [code]_physics_process(delta)[/code].
+ Direct access to the world's physics 3D space state. Used for querying current and potential collisions.
</member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
The World3D's [Environment].
@@ -23,6 +23,9 @@
<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
The World3D's fallback_environment will be used if the World3D's [Environment] fails or is missing.
</member>
+ <member name="navigation_map" type="RID" setter="" getter="get_navigation_map">
+ The [RID] of this world's navigation map. Used by the [NavigationServer3D].
+ </member>
<member name="scenario" type="RID" setter="" getter="get_scenario">
The World3D's visual scenario.
</member>
diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml
index c0f64d9e27..5d8c23bd6f 100644
--- a/doc/classes/XRController3D.xml
+++ b/doc/classes/XRController3D.xml
@@ -19,13 +19,6 @@
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">
- <return type="int" enum="XRPositionalTracker.TrackerHand">
- </return>
- <description>
- Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
- </description>
- </method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
@@ -56,13 +49,20 @@
If provided by the [XRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
</description>
</method>
+ <method name="get_tracker_hand" qualifiers="const">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand].
+ </description>
+ </method>
<method name="is_button_pressed" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="button" type="int">
</argument>
<description>
- Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButtonList].
+ Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButton].
</description>
</method>
</methods>
@@ -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..36cd6e2ea0 100644
--- a/doc/classes/XRPositionalTracker.xml
+++ b/doc/classes/XRPositionalTracker.xml
@@ -12,13 +12,6 @@
<link title="VR tutorial index">https://docs.godotengine.org/en/latest/tutorials/vr/index.html</link>
</tutorials>
<methods>
- <method name="get_hand" qualifiers="const">
- <return type="int" enum="XRPositionalTracker.TrackerHand">
- </return>
- <description>
- Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
- </description>
- </method>
<method name="get_joy_id" qualifiers="const">
<return type="int">
</return>
@@ -33,13 +26,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>
@@ -54,6 +40,13 @@
Returns the world-space controller position.
</description>
</method>
+ <method name="get_tracker_hand" qualifiers="const">
+ <return type="int" enum="XRPositionalTracker.TrackerHand">
+ </return>
+ <description>
+ Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
+ </description>
+ </method>
<method name="get_tracker_id" qualifiers="const">
<return type="int">
</return>
@@ -61,18 +54,18 @@
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">
- <return type="bool">
+ <method name="get_tracker_name" qualifiers="const">
+ <return type="StringName">
</return>
<description>
- Returns [code]true[/code] if this device tracks orientation.
+ Returns the controller or anchor point's name, if applicable.
</description>
</method>
- <method name="get_tracks_position" qualifiers="const">
- <return type="bool">
+ <method name="get_tracker_type" qualifiers="const">
+ <return type="int" enum="XRServer.TrackerType">
</return>
<description>
- Returns [code]true[/code] if this device tracks position.
+ Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum.
</description>
</method>
<method name="get_transform" qualifiers="const">
@@ -84,11 +77,18 @@
Returns the transform combining this device's orientation and position.
</description>
</method>
- <method name="get_type" qualifiers="const">
- <return type="int" enum="XRServer.TrackerType">
+ <method name="is_tracking_orientation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if this device is tracking orientation.
+ </description>
+ </method>
+ <method name="is_tracking_position" qualifiers="const">
+ <return type="bool">
</return>
<description>
- Returns the tracker's type.
+ Returns [code]true[/code] if this device is tracking position.
</description>
</method>
</methods>
@@ -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/bool.xml b/doc/classes/bool.xml
index 03e8bee7d5..48f336d58c 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -4,7 +4,7 @@
Boolean built-in type.
</brief_description>
<description>
- Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as an switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements.
+ Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as a switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements.
Booleans can be directly used in [code]if[/code] statements. The code below demonstrates this on the [code]if can_shoot:[/code] line. You don't need to use [code]== true[/code], you only need [code]if can_shoot:[/code]. Similarly, use [code]if not can_shoot:[/code] rather than [code]== false[/code].
[codeblocks]
[gdscript]
@@ -49,6 +49,7 @@
[/csharp]
[/codeblocks]
The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again.
+ [codeblocks]
[gdscript]
var _can_shoot = true
onready var _cool_down = $CoolDownTimer
@@ -131,6 +132,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -139,6 +141,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if left operand is [code]false[/code] and right operand is [code]true[/code].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -147,6 +150,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -155,6 +159,7 @@
<argument index="0" name="right" type="bool">
</argument>
<description>
+ Returns [code]true[/code] if left operand is [code]true[/code] and right operand is [code]false[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 85fe31eec8..11f6d91b05 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -49,6 +49,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if two floats are different from each other.
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -57,6 +58,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the integer has different value than the float.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -65,6 +67,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Multiplies two [float]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -73,6 +76,10 @@
<argument index="0" name="right" type="Vector2">
</argument>
<description>
+ Multiplies each component of the [Vector2] by the given [float].
+ [codeblock]
+ print(2.5 * Vector2(1, 1)) # Vector2(2.5, 2.5)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -81,6 +88,10 @@
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
+ Multiplies each component of the [Vector2i] by the given [float].
+ [codeblock]
+ print(2.0 * Vector2i(1, 1)) # Vector2i(2.0, 2.0)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -89,6 +100,7 @@
<argument index="0" name="right" type="Vector3">
</argument>
<description>
+ Multiplies each component of the [Vector3] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -97,6 +109,7 @@
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
+ Multiplies each component of the [Vector3i] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -105,6 +118,7 @@
<argument index="0" name="right" type="Quat">
</argument>
<description>
+ Multiplies each component of the [Quat] by the given [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -113,6 +127,10 @@
<argument index="0" name="right" type="Color">
</argument>
<description>
+ Multiplies each component of the [Color] by the given [float].
+ [codeblock]
+ print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -121,12 +139,17 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Multiplies a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator +" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary plus operator. Doesn't have any effect.
+ [codeblock]
+ var a = +2.5 # a is 2.5.
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -135,6 +158,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Adds two floats.
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -143,12 +167,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Adds a [float] and an [int]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
<return type="float">
</return>
<description>
+ Unary minus operator. Negates the number.
+ [codeblock]
+ var a = -2.5 # a is -2.5.
+ print(-a) # 2.5
+ [/codeblock]
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -157,6 +187,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Subtracts a float from a float.
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -165,6 +196,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Subtracts an [int] from a [float]. The result is a [float].
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -173,6 +205,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Divides two floats.
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -181,6 +214,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Divides a [float] by an [int]. The result is a [float].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -189,6 +223,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is less than the right one.
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -197,6 +232,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than the given [int].
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -205,6 +241,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -213,6 +250,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is less than or equal to the given [int].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -221,6 +259,8 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if both floats are exactly equal.
+ [b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -229,6 +269,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if the [float] and the given [int] are equal.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -237,6 +278,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than the right one.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -245,6 +287,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than the given [int].
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -253,6 +296,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] the left float is greater than or equal to the right one.
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -261,6 +305,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if this [float] is greater than or equal to the given [int].
</description>
</method>
</methods>
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 5ac9f8405a..119cdf8eeb 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -7,18 +7,34 @@
Signed 64-bit integer type.
It can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around.
[int] is a [Variant] type, and will thus be used when assigning an integer value to a [Variant]. It can also be enforced with the [code]: int[/code] type hint.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var my_variant = 0 # int, value 0.
my_variant += 4.2 # float, value 4.2.
var my_int: int = 1 # int, value 1.
my_int = 4.2 # int, value 4, the right value is implicitly cast to int.
my_int = int("6.7") # int, value 6, the String is explicitly cast with int.
-
var max_int = 9223372036854775807
print(max_int) # 9223372036854775807, OK.
max_int += 1
print(max_int) # -9223372036854775808, we overflowed and wrapped around.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ int myInt = (int)"6.7".ToFloat(); // int, value 6, the String is explicitly cast with int.
+ // We have to use `long` here, because GDSript's `int`
+ // is 64 bits long while C#'s `int` is only 32 bits.
+ long maxInt = 9223372036854775807;
+ GD.Print(maxInt); // 9223372036854775807, OK.
+ maxInt++;
+ GD.Print(maxInt); // -9223372036854775808, we overflowed and wrapped around.
+
+ // Alternatively, if we used C#'s 32-bit `int` type, the maximum value is much smaller:
+ int halfInt = 2147483647;
+ GD.Print(halfInt); // 2147483647, OK.
+ halfInt++;
+ GD.Print(halfInt); // -2147483648, we overflowed and wrapped around.
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
@@ -54,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">
@@ -63,6 +79,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if operands are different from each other.
</description>
</method>
<method name="operator !=" qualifiers="operator">
@@ -71,6 +88,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if operands are different from each other.
</description>
</method>
<method name="operator %" qualifiers="operator">
@@ -79,6 +97,12 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers.
+ [codeblock]
+ print(5 % 2) # 1
+ print(12 % 4) # 0
+ print(12 % 2) # 2
+ [/codeblock]
</description>
</method>
<method name="operator &amp;" qualifiers="operator">
@@ -87,6 +111,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]AND[/code] operation for two integers.
+ [codeblock]
+ print(3 &amp; 1) # 1
+ print(11 &amp; 3) # 3
+ [/codeblock]
+ It's useful to retrieve binary flags from a variable.
+ [codeblock]
+ var flags = 5
+ # Do something if the first bit is enabled.
+ if flags &amp; 1:
+ do_stuff()
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -95,6 +131,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Multiplies an [int] and a [float]. The result is a [float].
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -103,6 +140,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Multiplies two [int]s.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -111,6 +149,10 @@
<argument index="0" name="right" type="Vector2">
</argument>
<description>
+ Multiplies each component of the vector by the given integer.
+ [codeblock]
+ print(2 * Vector2(1, 1)) # Vector2(2, 2)
+ [/codeblock]
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -119,6 +161,7 @@
<argument index="0" name="right" type="Vector2i">
</argument>
<description>
+ Multiplies each component of the integer vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -127,6 +170,7 @@
<argument index="0" name="right" type="Vector3">
</argument>
<description>
+ Multiplies each component of the vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -135,6 +179,7 @@
<argument index="0" name="right" type="Vector3i">
</argument>
<description>
+ Multiplies each component of the integer vector by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -143,6 +188,7 @@
<argument index="0" name="right" type="Quat">
</argument>
<description>
+ Multiplies each component of the quaternion by the given integer.
</description>
</method>
<method name="operator *" qualifiers="operator">
@@ -151,12 +197,20 @@
<argument index="0" name="right" type="Color">
</argument>
<description>
+ Multiplies each component of the color by the given integer.
+ [codeblock]
+ print(2 * Color(0.5, 0.5, 0.5)) # Color(1, 1, 1)
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
<return type="int">
</return>
<description>
+ Unary plus operator. Doesn't have any effect.
+ [codeblock]
+ var a = +1 # a is 1.
+ [/codeblock]
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -165,6 +219,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Adds an [int] to a [float]. The result is a [float].
</description>
</method>
<method name="operator +" qualifiers="operator">
@@ -173,12 +228,18 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Adds two integers.
</description>
</method>
<method name="operator -" qualifiers="operator">
<return type="int">
</return>
<description>
+ Unary minus operator. Negates the number.
+ [codeblock]
+ var a = -1 # a is -1.
+ print(-a) # 1
+ [/codeblock]
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -187,6 +248,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Subtracts a [float] from an [int]. The result is a [float].
</description>
</method>
<method name="operator -" qualifiers="operator">
@@ -195,6 +257,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Subtracts two integers.
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -203,6 +266,10 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Divides an [int] by a [float]. The result is a [float].
+ [codeblock]
+ print(10 / 3.0) # 3.333...
+ [/codeblock]
</description>
</method>
<method name="operator /" qualifiers="operator">
@@ -211,6 +278,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Divides two integers. The decimal part of the result is discarded (truncated).
+ [codeblock]
+ print(10 / 2) # 5
+ print(10 / 3) # 3
+ [/codeblock]
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -219,6 +291,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is less than the given [float].
</description>
</method>
<method name="operator &lt;" qualifiers="operator">
@@ -227,6 +300,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than the right one.
</description>
</method>
<method name="operator &lt;&lt;" qualifiers="operator">
@@ -235,6 +309,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2.
+ [codeblock]
+ print(10 &lt;&lt; 1) # 20
+ print(10 &lt;&lt; 4) # 160
+ [/codeblock]
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -243,6 +322,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is less than or equal to the given [float].
</description>
</method>
<method name="operator &lt;=" qualifiers="operator">
@@ -251,6 +331,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is less than or equal to the right one.
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -259,6 +340,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if the integer is equal to the given [float].
</description>
</method>
<method name="operator ==" qualifiers="operator">
@@ -267,6 +349,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] if both integers are equal.
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -275,6 +358,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is greater than the given [float].
</description>
</method>
<method name="operator &gt;" qualifiers="operator">
@@ -283,6 +367,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is greater than the right one.
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -291,6 +376,7 @@
<argument index="0" name="right" type="float">
</argument>
<description>
+ Returns [code]true[/code] if this [int] is greater than or equal to the given [float].
</description>
</method>
<method name="operator &gt;=" qualifiers="operator">
@@ -299,6 +385,7 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns [code]true[/code] the left integer is greater than or equal to the right one.
</description>
</method>
<method name="operator &gt;&gt;" qualifiers="operator">
@@ -307,6 +394,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2.
+ [codeblock]
+ print(10 &gt;&gt; 1) # 5
+ print(10 &gt;&gt; 2) # 2
+ [/codeblock]
</description>
</method>
<method name="operator ^" qualifiers="operator">
@@ -315,6 +407,11 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]XOR[/code] operation for two integers.
+ [codeblock]
+ print(5 ^ 1) # 4
+ print(4 ^ 7) # 3
+ [/codeblock]
</description>
</method>
<method name="operator |" qualifiers="operator">
@@ -323,12 +420,29 @@
<argument index="0" name="right" type="int">
</argument>
<description>
+ Returns the result of bitwise [code]OR[/code] operation for two integers.
+ [codeblock]
+ print(2 | 4) # 6
+ print(1 | 3) # 3
+ [/codeblock]
+ It's useful to store binary flags in a variable.
+ [codeblock]
+ var flags = 0
+ # Turn first and third bit on.
+ flags |= 1
+ flags |= 4
+ [/codeblock]
</description>
</method>
<method name="operator ~" qualifiers="operator">
<return type="int">
</return>
<description>
+ Returns the result of bitwise [code]NOT[/code] operation for the integer. It's effectively equal to [code]-int + 1[/code].
+ [codeblock]
+ print(~4) # -3
+ print(~7) # -6
+ [/codeblock]
</description>
</method>
</methods>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 5335116c8a..ae3cc73098 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -110,6 +110,9 @@ class ClassDef:
self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]]
self.tutorials = [] # type: List[str]
+ # Used to match the class with XML source for output filtering purposes.
+ self.filepath = "" # type: str
+
class State:
def __init__(self): # type: () -> None
@@ -118,11 +121,12 @@ class State:
self.classes = OrderedDict() # type: OrderedDict[str, ClassDef]
self.current_class = "" # type: str
- def parse_class(self, class_root): # type: (ET.Element) -> None
+ def parse_class(self, class_root, filepath): # type: (ET.Element, str) -> None
class_name = class_root.attrib["name"]
class_def = ClassDef(class_name)
self.classes[class_name] = class_def
+ class_def.filepath = filepath
inherits = class_root.get("inherits")
if inherits is not None:
@@ -278,6 +282,7 @@ def parse_arguments(root): # type: (ET.Element) -> List[ParameterDef]
def main(): # type: () -> None
parser = argparse.ArgumentParser()
parser.add_argument("path", nargs="+", help="A path to an XML file or a directory containing XML files to parse.")
+ parser.add_argument("--filter", default="", help="The filepath pattern for XML files to filter.")
group = parser.add_mutually_exclusive_group()
group.add_argument("--output", "-o", default=".", help="The directory to save output .rst files in.")
group.add_argument(
@@ -333,17 +338,21 @@ def main(): # type: () -> None
print_error("Duplicate class '{}'".format(name), state)
continue
- classes[name] = doc
+ classes[name] = (doc, cur_file)
for name, data in classes.items():
try:
- state.parse_class(data)
+ state.parse_class(data[0], data[1])
except Exception as e:
print_error("Exception while parsing class '{}': {}".format(name, e), state)
state.sort_classes()
+ pattern = re.compile(args.filter)
+
for class_name, class_def in state.classes.items():
+ if args.filter and not pattern.search(class_def.filepath):
+ continue
state.current_class = class_name
make_rst_class(class_def, state, args.dry_run, args.output)
diff --git a/doc/translations/README.md b/doc/translations/README.md
new file mode 100644
index 0000000000..a941eeaf49
--- /dev/null
+++ b/doc/translations/README.md
@@ -0,0 +1 @@
+These `.po` and `.pot` files come from Weblate. Do not modify them manually.
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index 1857e45627..b4ae664714 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -1,6 +1,6 @@
# Arabic translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Airbus5717 <Abdussamadf350@gmail.com>, 2020.
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index 2e5c7e2c84..6485111b20 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -1,6 +1,6 @@
# Catalan translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# roger <616steam@gmail.com>, 2020.
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 41c20b05ea..d14b0d9b1f 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -1,6 +1,6 @@
# LANGUAGE translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
@@ -25583,7 +25583,7 @@ msgstr ""
#: doc/classes/Input.xml:99
msgid ""
"Returns the current value of the joypad axis at given index (see [enum "
-"JoyAxisList])."
+"JoyAxis])."
msgstr ""
#: doc/classes/Input.xml:108
@@ -25592,7 +25592,7 @@ msgstr ""
#: doc/classes/Input.xml:117
msgid ""
-"Receives a [enum JoyAxisList] axis and returns its equivalent name as a "
+"Receives a [enum JoyAxis] axis and returns its equivalent name as a "
"string."
msgstr ""
@@ -25602,7 +25602,7 @@ msgstr ""
#: doc/classes/Input.xml:135
msgid ""
-"Receives a gamepad button from [enum JoyButtonList] and returns its "
+"Receives a gamepad button from [enum JoyButton] and returns its "
"equivalent name as a string."
msgstr ""
@@ -25677,7 +25677,7 @@ msgstr ""
#: doc/classes/Input.xml:238
msgid ""
"Returns [code]true[/code] if you are pressing the joypad button (see [enum "
-"JoyButtonList])."
+"JoyButton])."
msgstr ""
#: doc/classes/Input.xml:247
@@ -26077,7 +26077,7 @@ msgid ""
msgstr ""
#: doc/classes/InputEventJoypadButton.xml:16
-msgid "Button identifier. One of the [enum JoyButtonList] button constants."
+msgid "Button identifier. One of the [enum JoyButton] button constants."
msgstr ""
#: doc/classes/InputEventJoypadButton.xml:19
@@ -26105,7 +26105,7 @@ msgid ""
msgstr ""
#: doc/classes/InputEventJoypadMotion.xml:16
-msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants."
+msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants."
msgstr ""
#: doc/classes/InputEventJoypadMotion.xml:19
@@ -60259,7 +60259,7 @@ msgstr ""
#: doc/classes/XRController3D.xml:65
msgid ""
"Returns [code]true[/code] if the button at index [code]button[/code] is "
-"pressed. See [enum JoyButtonList]."
+"pressed. See [enum JoyButton]."
msgstr ""
#: doc/classes/XRController3D.xml:71
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 8d94351710..7b958a5049 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -1,6 +1,6 @@
# Czech translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Ondrej Pavelka <ondrej.pavelka@outlook.com>, 2020.
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 95b73f8257..2e3e219ba6 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -1,6 +1,6 @@
# German translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Jaigskim <filzstift112@gmail.com>, 2020.
diff --git a/doc/translations/es.po b/doc/translations/es.po
index ef6012b240..3078c1bf90 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -1,6 +1,6 @@
# Spanish translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# 44pes Games <44pes.games@gmail.com>, 2020.
diff --git a/doc/translations/extract.py b/doc/translations/extract.py
index a65f942b92..a2bc5e37ec 100644
--- a/doc/translations/extract.py
+++ b/doc/translations/extract.py
@@ -9,8 +9,8 @@ from collections import OrderedDict
EXTRACT_TAGS = ["description", "brief_description", "member", "constant", "theme_item", "link"]
HEADER = """\
# LANGUAGE translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 06d6ee47d7..733d3bb969 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -1,6 +1,6 @@
# LANGUAGE translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Tetra Homer <tetrahomer@gmail.com>, 2020.
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index 02ac9fdd76..0a40863a52 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -1,6 +1,6 @@
# Finnish translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Tapani Niemi <tapani.niemi@kapsi.fi>, 2020.
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index a8075d919d..f3e26ebc61 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -1,6 +1,6 @@
# French translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Rémi Verschelde <remi@godotengine.org>, 2020.
@@ -25946,7 +25946,7 @@ msgstr ""
#: doc/classes/Input.xml:99
msgid ""
"Returns the current value of the joypad axis at given index (see [enum "
-"JoyAxisList])."
+"JoyAxis])."
msgstr ""
#: doc/classes/Input.xml:108
@@ -25955,7 +25955,7 @@ msgstr ""
#: doc/classes/Input.xml:117
msgid ""
-"Receives a [enum JoyAxisList] axis and returns its equivalent name as a "
+"Receives a [enum JoyAxis] axis and returns its equivalent name as a "
"string."
msgstr ""
@@ -25965,7 +25965,7 @@ msgstr ""
#: doc/classes/Input.xml:135
msgid ""
-"Receives a gamepad button from [enum JoyButtonList] and returns its "
+"Receives a gamepad button from [enum JoyButton] and returns its "
"equivalent name as a string."
msgstr ""
@@ -26041,7 +26041,7 @@ msgstr ""
#, fuzzy
msgid ""
"Returns [code]true[/code] if you are pressing the joypad button (see [enum "
-"JoyButtonList])."
+"JoyButton])."
msgstr ""
"Retourne [code]true[/code] (vrai) si la chaîne de caractères finit par la "
"chaîne de caractères donnée."
@@ -26443,7 +26443,7 @@ msgid ""
msgstr ""
#: doc/classes/InputEventJoypadButton.xml:16
-msgid "Button identifier. One of the [enum JoyButtonList] button constants."
+msgid "Button identifier. One of the [enum JoyButton] button constants."
msgstr ""
#: doc/classes/InputEventJoypadButton.xml:19
@@ -26471,7 +26471,7 @@ msgid ""
msgstr ""
#: doc/classes/InputEventJoypadMotion.xml:16
-msgid "Axis identifier. Use one of the [enum JoyAxisList] axis constants."
+msgid "Axis identifier. Use one of the [enum JoyAxis] axis constants."
msgstr ""
#: doc/classes/InputEventJoypadMotion.xml:19
@@ -60738,7 +60738,7 @@ msgstr ""
#, fuzzy
msgid ""
"Returns [code]true[/code] if the button at index [code]button[/code] is "
-"pressed. See [enum JoyButtonList]."
+"pressed. See [enum JoyButton]."
msgstr ""
"Renvoie [code]true[/code] (vrai) si [code]s[/code] vaut zéro ou quasiment "
"zéro."
diff --git a/doc/translations/id.po b/doc/translations/id.po
index b686ef8de6..1bce3d6b50 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -1,6 +1,6 @@
# Indonesian translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Sofyan Sugianto <sofyanartem@gmail.com>, 2020.
diff --git a/doc/translations/it.po b/doc/translations/it.po
index f664268ebe..18e162476c 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -1,6 +1,6 @@
# Italian translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Micila Micillotto <micillotto@gmail.com>, 2020.
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index 9727ca0cd3..ede80a35ef 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -1,6 +1,6 @@
# Japanese translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Wataru Onuki <bettawat@yahoo.co.jp>, 2020.
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index f69b5f00c0..e71cd06ba7 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -1,6 +1,6 @@
# Korean translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Doyun Kwon <caen4516@gmail.com>, 2020.
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index 17bd3db383..032ff95bdb 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -1,6 +1,6 @@
# Dutch translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Stijn Hinlopen <f.a.hinlopen@gmail.com>, 2020.
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index fd494dc656..b0c94b55be 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -1,6 +1,6 @@
# Polish translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Tomek <kobewi4e@gmail.com>, 2020.
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index 2e8337989f..a508d38859 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -1,6 +1,6 @@
# Portuguese (Brazil) translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# José Paulo <jose.paulo1919@gmail.com>, 2020.
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index f7e5e0f86f..96c0161312 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -1,6 +1,6 @@
# LANGUAGE translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# EVOKZH <avip.ady@gmail.com>, 2020.
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index 6a397ec35d..1108967bc9 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -1,6 +1,6 @@
# Russian translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Alex <Alex.Gorichev@protonmail.com>, 2020.
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index 156fbabfc0..d7d2911b97 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -1,6 +1,6 @@
# Serbian (cyrillic) translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Младен Габић <cupakabra@protonmail.com>, 2020.
diff --git a/doc/translations/th.po b/doc/translations/th.po
index cbcbc51f63..5031ecfb0e 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -1,6 +1,6 @@
# Thai translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Thanachart Monpassorn <nunf_2539@hotmail.com>, 2020.
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index 33208243f8..a317f4ee83 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -1,6 +1,6 @@
# Turkish translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# hüseyinyıldız <hsynyldzcn@gmail.com>, 2020.
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index 45da6d19aa..8ca75e8b19 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -1,6 +1,6 @@
# Ukrainian translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Yuri Chornoivan <yurchor@ukr.net>, 2020.
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index 2e9d14c0d8..aee852699c 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -1,6 +1,6 @@
# Chinese (Simplified) translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# Haoyu Qiu <timothyqiu32@gmail.com>, 2020.
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index 9483576d0e..242c8cc086 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -1,6 +1,6 @@
# Chinese (Traditional) translation of the Godot Engine class reference.
-# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
-# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+# Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
# This file is distributed under the same license as the Godot source code.
#
# binotaliu <binota@protonmail.ch>, 2020.