From 8d5cdb0c7a8458972b7d8edb9c8998ce4af7ef48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 8 Jun 2022 13:39:15 +0200 Subject: [PATCH] classref: Sync with current master branch (c09d83010) --- classes/class_@gdscript.rst | 31 +- classes/class_@globalscope.rst | 56 +- classes/class_aabb.rst | 12 - classes/class_acceptdialog.rst | 50 +- classes/class_animatedsprite2d.rst | 8 +- classes/class_animationlibrary.rst | 112 ++ classes/class_animationnode.rst | 82 +- classes/class_animationnodeblendtree.rst | 4 +- classes/class_animationnodeoneshot.rst | 8 +- classes/class_animationnodestatemachine.rst | 40 - classes/class_animationplayer.rst | 58 +- classes/class_array.rst | 92 +- classes/class_aspectratiocontainer.rst | 5 + classes/class_astar2d.rst | 4 +- .../{class_astar.rst => class_astar3d.rst} | 206 +-- classes/class_audioeffectstereoenhance.rst | 7 + classes/class_basebutton.rst | 128 +- classes/class_basematerial3d.rst | 126 +- classes/class_basis.rst | 24 +- classes/class_bool.rst | 14 - classes/class_boxcontainer.rst | 5 + classes/class_boxshape3d.rst | 6 +- classes/class_button.rst | 8 +- classes/class_callable.rst | 12 - classes/class_camera2d.rst | 2 +- classes/class_camera3d.rst | 6 +- classes/class_canvasitem.rst | 56 +- classes/class_capsuleshape2d.rst | 6 +- classes/class_capsuleshape3d.rst | 6 +- classes/class_centercontainer.rst | 5 + classes/class_characterbody2d.rst | 2 +- classes/class_characterbody3d.rst | 2 +- classes/class_checkbox.rst | 24 +- classes/class_checkbutton.rst | 12 +- classes/class_circleshape2d.rst | 6 +- classes/class_classdb.rst | 10 - classes/class_codeedit.rst | 4 +- classes/class_collisionobject2d.rst | 2 + classes/class_collisionpolygon2d.rst | 6 +- classes/class_collisionpolygon3d.rst | 6 +- classes/class_collisionshape2d.rst | 2 + classes/class_color.rst | 433 +++-- classes/class_colorpicker.rst | 4 + classes/class_colorpickerbutton.rst | 6 +- classes/class_concavepolygonshape2d.rst | 8 +- classes/class_concavepolygonshape3d.rst | 6 +- classes/class_container.rst | 5 + classes/class_control.rst | 234 +-- classes/class_convexpolygonshape2d.rst | 8 +- classes/class_convexpolygonshape3d.rst | 8 +- classes/class_cpuparticles2d.rst | 14 +- classes/class_cpuparticles3d.rst | 14 +- classes/class_crypto.rst | 2 - classes/class_cryptokey.rst | 2 - classes/class_csgprimitive3d.rst | 26 +- classes/class_csgsphere3d.rst | 4 +- classes/class_curve.rst | 28 +- classes/class_curve2d.rst | 30 +- classes/class_curve3d.rst | 30 +- classes/class_cylindermesh.rst | 66 +- classes/class_cylindershape3d.rst | 6 +- classes/class_decal.rst | 2 + classes/class_dictionary.rst | 70 +- classes/class_directionallight3d.rst | 70 +- classes/class_directory.rst | 4 +- classes/class_displayserver.rst | 1086 ++++++++--- classes/class_editorexportplugin.rst | 4 +- classes/class_editorfiledialog.rst | 42 +- classes/class_editorfilesystem.rst | 58 +- ...itorfilesystemimportformatsupportquery.rst | 62 + classes/class_editorinspector.rst | 14 +- classes/class_editorinspectorplugin.rst | 4 +- classes/class_editorplugin.rst | 12 +- classes/class_editorsceneformatimporter.rst | 38 +- .../class_editorsceneformatimporterblend.rst | 34 + .../class_editorsceneformatimporterfbx.rst | 27 +- classes/class_editorscenepostimportplugin.rst | 8 +- classes/class_editorspinslider.rst | 38 +- classes/class_engine.rst | 24 + classes/class_engineprofiler.rst | 18 +- classes/class_environment.rst | 256 +-- classes/class_fastnoiselite.rst | 563 ++++++ classes/class_file.rst | 4 +- classes/class_filedialog.rst | 90 +- classes/class_float.rst | 26 +- classes/class_fogvolume.rst | 10 +- classes/class_font.rst | 10 + classes/class_fontdata.rst | 22 +- classes/class_geometry2d.rst | 4 +- classes/class_geometry3d.rst | 4 +- classes/class_geometryinstance3d.rst | 204 +-- classes/class_gltfdocument.rst | 4 +- classes/class_gltfdocumentextension.rst | 82 +- classes/class_gltfstate.rst | 16 + classes/class_gpuparticles2d.rst | 18 + classes/class_gpuparticles3d.rst | 2 + classes/class_gpuparticlesattractor3d.rst | 25 + classes/class_gpuparticlesattractorbox3d.rst | 9 + .../class_gpuparticlesattractorsphere3d.rst | 11 + ...ass_gpuparticlesattractorvectorfield3d.rst | 15 + classes/class_gpuparticlescollision3d.rst | 21 + classes/class_gpuparticlescollisionbox3d.rst | 11 + ...ass_gpuparticlescollisionheightfield3d.rst | 85 +- classes/class_gpuparticlescollisionsdf3d.rst | 37 +- .../class_gpuparticlescollisionsphere3d.rst | 11 + classes/class_graphedit.rst | 126 +- classes/class_graphnode.rst | 248 ++- classes/class_gridcontainer.rst | 20 +- classes/class_hashingcontext.rst | 2 - classes/class_hboxcontainer.rst | 5 + classes/class_heightmapshape3d.rst | 6 +- classes/class_hflowcontainer.rst | 18 +- classes/class_hmaccontext.rst | 2 - classes/class_hsplitcontainer.rst | 5 + classes/class_httprequest.rst | 6 +- classes/class_image.rst | 12 +- classes/class_input.rst | 104 +- classes/class_inputevent.rst | 10 +- classes/class_inputeventjoypadbutton.rst | 2 +- classes/class_inputeventmousemotion.rst | 2 +- classes/class_inputmap.rst | 4 +- classes/class_int.rst | 26 +- classes/class_ip.rst | 2 +- classes/class_itemlist.rst | 48 +- classes/class_label.rst | 4 +- classes/class_label3d.rst | 681 +++++++ classes/class_light3d.rst | 4 +- classes/class_lineedit.rst | 4 +- classes/class_linkbutton.rst | 32 +- classes/class_margincontainer.rst | 5 + classes/class_material.rst | 2 +- classes/class_menubutton.rst | 6 +- classes/class_mesh.rst | 22 +- classes/class_missingnode.rst | 60 + classes/class_missingresource.rst | 60 + classes/class_multiplayerapi.rst | 4 +- classes/class_multiplayerpeerextension.rst | 37 + classes/class_multiplayerspawner.rst | 72 +- classes/class_multiplayersynchronizer.rst | 40 +- classes/class_nativeextension.rst | 6 +- classes/class_navigationagent2d.rst | 38 + classes/class_navigationagent3d.rst | 78 +- classes/class_navigationmesh.rst | 24 +- classes/class_navigationmeshgenerator.rst | 15 + classes/class_navigationobstacle2d.rst | 18 + classes/class_navigationobstacle3d.rst | 18 + classes/class_navigationpolygon.rst | 10 + classes/class_navigationregion2d.rst | 16 + classes/class_navigationregion3d.rst | 20 +- classes/class_navigationserver2d.rst | 54 +- classes/class_navigationserver3d.rst | 54 +- classes/class_node.rst | 204 ++- classes/class_nodepath.rst | 46 +- classes/class_noise.rst | 108 ++ classes/class_noisetexture.rst | 152 +- classes/class_object.rst | 26 +- classes/class_omnilight3d.rst | 16 +- classes/class_opensimplexnoise.rst | 230 --- classes/class_openxractionmap.rst | 88 +- classes/class_openxractionset.rst | 24 +- classes/class_openxrinteractionprofile.rst | 26 + classes/class_openxripbinding.rst | 50 +- classes/class_optionbutton.rst | 58 +- classes/class_os.rst | 30 +- classes/class_packedbytearray.rst | 46 +- classes/class_packedcolorarray.rst | 46 +- classes/class_packedfloat32array.rst | 46 +- classes/class_packedfloat64array.rst | 46 +- classes/class_packedint32array.rst | 46 +- classes/class_packedint64array.rst | 46 +- classes/class_packedstringarray.rst | 54 +- classes/class_packedvector2array.rst | 46 +- classes/class_packedvector3array.rst | 46 +- classes/class_packetpeerudp.rst | 6 +- classes/class_panelcontainer.rst | 2 + classes/class_particlesmaterial.rst | 14 +- classes/class_performance.rst | 78 +- classes/class_physicalskymaterial.rst | 36 +- classes/class_physicsdirectbodystate3d.rst | 2 + ...lass_physicsdirectbodystate3dextension.rst | 379 ++++ classes/class_physicsdirectspacestate3d.rst | 2 + ...ass_physicsdirectspacestate3dextension.rst | 83 + classes/class_physicsserver3d.rst | 4 +- classes/class_physicsserver3dextension.rst | 1051 +++++++++++ ..._physicsserver3drenderingserverhandler.rst | 51 + .../class_physicstestmotionparameters2d.rst | 20 + .../class_physicstestmotionparameters3d.rst | 20 + classes/class_placeholdercubemap.rst | 21 + classes/class_placeholdercubemaparray.rst | 21 + classes/class_placeholdermaterial.rst | 21 + classes/class_placeholdermesh.rst | 43 + classes/class_placeholdertexture2d.rst | 43 + classes/class_placeholdertexture2darray.rst | 21 + classes/class_placeholdertexture3d.rst | 43 + classes/class_placeholdertexturelayered.rst | 61 + classes/class_plane.rst | 12 - classes/class_popupmenu.rst | 162 +- classes/class_portablecompressedtexture2d.rst | 181 ++ classes/class_position2d.rst | 24 + classes/class_primitivemesh.rst | 40 +- classes/class_prismmesh.rst | 4 +- classes/class_proceduralskymaterial.rst | 94 +- classes/class_progressbar.rst | 51 +- classes/class_projectsettings.rst | 838 ++++----- classes/class_quaternion.rst | 28 +- classes/class_range.rst | 178 +- classes/class_rect2.rst | 12 - classes/class_rect2i.rst | 12 - classes/class_rectangleshape2d.rst | 6 +- classes/class_refcounted.rst | 2 +- classes/class_reflectionprobe.rst | 2 +- classes/class_renderingserver.rst | 102 +- classes/class_resource.rst | 2 +- classes/class_richtextlabel.rst | 210 ++- classes/class_rid.rst | 12 - classes/class_scenereplicationconfig.rst | 8 + classes/class_scenetree.rst | 154 +- classes/class_scenetreetimer.rst | 2 +- classes/class_script.rst | 2 +- classes/class_scriptextension.rst | 267 +++ classes/class_scriptlanguage.rst | 23 + classes/class_scriptlanguageextension.rst | 606 ++++++ classes/class_scrollbar.rst | 10 +- classes/class_scrollcontainer.rst | 5 + classes/class_segmentshape2d.rst | 6 +- classes/class_separationrayshape2d.rst | 6 +- classes/class_separationrayshape3d.rst | 6 +- classes/class_shape2d.rst | 12 +- classes/class_signal.rst | 19 +- classes/class_skeleton3d.rst | 12 + classes/class_slider.rst | 22 +- classes/class_spheremesh.rst | 8 +- classes/class_sphereshape3d.rst | 10 +- classes/class_spinbox.rst | 2 + classes/class_splitcontainer.rst | 5 + classes/class_spritebase3d.rst | 136 +- classes/class_streampeerssl.rst | 10 + classes/class_streampeertcp.rst | 12 +- classes/class_string.rst | 419 ++--- classes/class_stringname.rst | 36 +- classes/class_stylebox.rst | 66 +- classes/class_styleboxflat.rst | 30 +- classes/class_tabbar.rst | 34 +- classes/class_tabcontainer.rst | 127 +- classes/class_textedit.rst | 144 +- classes/class_textmesh.rst | 304 +++ classes/class_textserver.rst | 172 +- classes/class_textserveradvanced.rst | 2 +- classes/class_textserverdummy.rst | 21 + classes/class_textserverextension.rst | 1622 +++++++++-------- classes/class_textserverfallback.rst | 2 +- classes/class_texture2d.rst | 6 +- classes/class_texture3d.rst | 2 +- classes/class_texturelayered.rst | 2 +- classes/class_textureprogressbar.rst | 68 +- classes/class_tilemap.rst | 4 +- classes/class_tileset.rst | 2 +- classes/class_time.rst | 100 +- classes/class_transform2d.rst | 22 +- classes/class_transform3d.rst | 22 +- classes/class_tree.rst | 58 +- classes/class_treeitem.rst | 30 +- classes/class_tubetrailmesh.rst | 4 +- classes/class_tween.rst | 120 +- classes/class_tweener.rst | 2 +- classes/class_vboxcontainer.rst | 2 + classes/class_vector2.rst | 18 +- classes/class_vector2i.rst | 12 - classes/class_vector3.rst | 20 +- classes/class_vector3i.rst | 16 +- classes/class_vehiclebody3d.rst | 2 +- classes/class_vehiclewheel3d.rst | 2 +- classes/class_vflowcontainer.rst | 18 +- classes/class_viewport.rst | 79 +- classes/class_viewporttexture.rst | 8 +- classes/class_visualinstance3d.rst | 20 +- classes/class_visualscript.rst | 4 +- classes/class_visualshader.rst | 10 +- classes/class_visualshadernode.rst | 12 +- classes/class_visualshadernodeclamp.rst | 6 +- classes/class_visualshadernodecolorfunc.rst | 12 +- classes/class_visualshadernodecompare.rst | 10 +- classes/class_visualshadernodeconstant.rst | 2 +- .../class_visualshadernodederivativefunc.rst | 6 +- classes/class_visualshadernodefloatfunc.rst | 4 +- classes/class_visualshadernodemix.rst | 10 +- classes/class_visualshadernodemultiplyadd.rst | 6 +- classes/class_visualshadernodesmoothstep.rst | 10 +- classes/class_visualshadernodestep.rst | 10 +- classes/class_visualshadernodeswitch.rst | 10 +- .../class_visualshadernodetextureuniform.rst | 2 +- classes/class_visualshadernodeuniform.rst | 2 +- .../class_visualshadernodevec4constant.rst | 50 + classes/class_visualshadernodevec4uniform.rst | 68 + classes/class_visualshadernodevectorbase.rst | 6 +- .../class_visualshadernodevectorcompose.rst | 4 +- .../class_visualshadernodevectordecompose.rst | 4 +- classes/class_visualshadernodevectorfunc.rst | 70 +- classes/class_vsplitcontainer.rst | 5 + classes/class_websocketserver.rst | 10 + classes/class_window.rst | 24 +- classes/class_worldboundaryshape2d.rst | 6 +- classes/class_worldboundaryshape3d.rst | 6 +- classes/class_x509certificate.rst | 2 - 304 files changed, 12946 insertions(+), 5236 deletions(-) create mode 100644 classes/class_animationlibrary.rst rename classes/{class_astar.rst => class_astar3d.rst} (63%) create mode 100644 classes/class_editorfilesystemimportformatsupportquery.rst create mode 100644 classes/class_editorsceneformatimporterblend.rst create mode 100644 classes/class_fastnoiselite.rst create mode 100644 classes/class_label3d.rst create mode 100644 classes/class_missingnode.rst create mode 100644 classes/class_missingresource.rst create mode 100644 classes/class_noise.rst delete mode 100644 classes/class_opensimplexnoise.rst create mode 100644 classes/class_physicsdirectbodystate3dextension.rst create mode 100644 classes/class_physicsdirectspacestate3dextension.rst create mode 100644 classes/class_physicsserver3dextension.rst create mode 100644 classes/class_physicsserver3drenderingserverhandler.rst create mode 100644 classes/class_placeholdercubemap.rst create mode 100644 classes/class_placeholdercubemaparray.rst create mode 100644 classes/class_placeholdermaterial.rst create mode 100644 classes/class_placeholdermesh.rst create mode 100644 classes/class_placeholdertexture2d.rst create mode 100644 classes/class_placeholdertexture2darray.rst create mode 100644 classes/class_placeholdertexture3d.rst create mode 100644 classes/class_placeholdertexturelayered.rst create mode 100644 classes/class_portablecompressedtexture2d.rst create mode 100644 classes/class_scriptextension.rst create mode 100644 classes/class_scriptlanguage.rst create mode 100644 classes/class_scriptlanguageextension.rst create mode 100644 classes/class_textmesh.rst create mode 100644 classes/class_textserverdummy.rst create mode 100644 classes/class_visualshadernodevec4constant.rst create mode 100644 classes/class_visualshadernodevec4uniform.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index b08de8e6c..1cdd10497 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -295,33 +295,34 @@ Output in the console would look something like this: - :ref:`Array` **range** **(** ... **)** |vararg| -Returns an array with the given range. Range can be 1 argument ``N`` (0 to ``N`` - 1), two arguments (``initial``, ``final - 1``) or three arguments (``initial``, ``final - 1``, ``increment``). Returns an empty array if the range isn't valid (e.g. ``range(2, 5, -1)`` or ``range(5, 5, 1)``). +Returns an array with the given range. :ref:`range` can be called in three ways: -Returns an array with the given range. ``range()`` can have 1 argument N (``0`` to ``N - 1``), two arguments (``initial``, ``final - 1``) or three arguments (``initial``, ``final - 1``, ``increment``). ``increment`` can be negative. If ``increment`` is negative, ``final - 1`` will become ``final + 1``. Also, the initial value must be greater than the final value for the loop to run. +\ ``range(n: int)``: Starts from 0, increases by steps of 1, and stops *before* ``n``. The argument ``n`` is **exclusive**. -\ ``range()(/code] converts all arguments to :ref:`int` before processing. -[codeblock] - print(range(4)) - print(range(2, 5)) - print(range(0, 6, 2)) +\ ``range(b: int, n: int)``: Starts from ``b``, increases by steps of 1, and stops *before* ``n``. The arguments ``b`` and ``n`` are **inclusive** and **exclusive**, respectively. -Output: +\ ``range(b: int, n: int, s: int)``: Starts from ``b``, increases/decreases by steps of ``s``, and stops *before* ``n``. The arguments ``b`` and ``n`` are **inclusive** and **exclusive**, respectively. The argument ``s`` **can** be negative, but not ``0``. If ``s`` is ``0``, an error message is printed. + +\ :ref:`range` converts all arguments to :ref:`int` before processing. + +\ **Note:** Returns an empty array if no value meets the value constraint (e.g. ``range(2, 5, -1)`` or ``range(5, 5, 1)``). + +Examples: :: - [0, 1, 2, 3] - [2, 3, 4] - [0, 2, 4] + print(range(4)) # Prints [0, 1, 2, 3] + print(range(2, 5)) # Prints [2, 3, 4] + print(range(0, 6, 2)) # Prints [0, 2, 4] + print(range(4, 1, -1)) # Prints [4, 3, 2] To iterate over an :ref:`Array` backwards, use: :: var array = [3, 6, 9] - var i := array.size() - 1 - while i >= 0: - print(array[i]) - i -= 1 + for i in range(array.size(), 0, -1): + print(array[i - 1]) Output: diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 7cdce8ad8..cd203d0d9 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -1458,7 +1458,7 @@ enum **KeyModifierMask**: - **KEY_CODE_MASK** = **33554431** --- Key Code mask. -- **KEY_MODIFIER_MASK** = **-16777216** --- Modifier key mask. +- **KEY_MODIFIER_MASK** = **2130706432** --- Modifier key mask. - **KEY_MASK_SHIFT** = **33554432** --- Shift key mask. @@ -1642,11 +1642,11 @@ enum **JoyButton**: - **JOY_BUTTON_MAX** = **128** --- The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms: -- Android: Up to 36 buttons. + - Android: Up to 36 buttons. -- Linux: Up to 80 buttons. + - Linux: Up to 80 buttons. -- Windows and macOS: Up to 128 buttons. + - Windows and macOS: Up to 128 buttons. ---- @@ -2085,7 +2085,9 @@ enum **PropertyHint**: Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "noslider" to hide the slider. -- **PROPERTY_HINT_ENUM** = **2** --- Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``. +- **PROPERTY_HINT_ENUM** = **2** --- Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string. + +The hint string is a comma separated list of names such as ``"Hello,Something,Else"``. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"Zero,One,Three:3,Four,Six:6"``. - **PROPERTY_HINT_ENUM_SUGGESTION** = **3** --- Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``. @@ -2268,11 +2270,11 @@ enum **PropertyUsageFlags**: - **PROPERTY_USAGE_INTERNATIONALIZED** = **64** --- The property is a translatable string. -- **PROPERTY_USAGE_GROUP** = **128** --- Used to group properties together in the editor. +- **PROPERTY_USAGE_GROUP** = **128** --- Used to group properties together in the editor. See :ref:`EditorInspector`. - **PROPERTY_USAGE_CATEGORY** = **256** --- Used to categorize properties together in the editor. -- **PROPERTY_USAGE_SUBGROUP** = **512** --- Used to group properties together in the editor in a subgroup (under a group). +- **PROPERTY_USAGE_SUBGROUP** = **512** --- Used to group properties together in the editor in a subgroup (under a group). See :ref:`EditorInspector`. - **PROPERTY_USAGE_NO_INSTANCE_STATE** = **2048** --- The property does not save its state in :ref:`PackedScene`. @@ -2336,6 +2338,8 @@ enum **PropertyUsageFlags**: .. _class_@GlobalScope_constant_METHOD_FLAG_FROM_SCRIPT: +.. _class_@GlobalScope_constant_METHOD_FLAG_VARARG: + .. _class_@GlobalScope_constant_METHOD_FLAG_STATIC: .. _class_@GlobalScope_constant_METHOD_FLAG_OBJECT_CORE: @@ -2358,6 +2362,8 @@ enum **MethodFlags**: - **METHOD_FLAG_FROM_SCRIPT** = **64** --- Deprecated method flag, unused. +- **METHOD_FLAG_VARARG** = **128** + - **METHOD_FLAG_STATIC** = **256** - **METHOD_FLAG_OBJECT_CORE** = **512** --- Used internally. Allows to not dump core virtuals such as ``_notification`` to the JSON API. @@ -2372,7 +2378,7 @@ enum **MethodFlags**: .. _class_@GlobalScope_constant_RPC_MODE_ANY_PEER: -.. _class_@GlobalScope_constant_RPC_MODE_AUTH: +.. _class_@GlobalScope_constant_RPC_MODE_AUTHORITY: enum **RPCMode**: @@ -2380,7 +2386,7 @@ enum **RPCMode**: - **RPC_MODE_ANY_PEER** = **1** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely by any peer. Analogous to the ``@rpc(any)`` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. -- **RPC_MODE_AUTH** = **2** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(auth)`` annotation. See :ref:`Node.set_multiplayer_authority`. +- **RPC_MODE_AUTHORITY** = **2** --- Used with :ref:`Node.rpc_config` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the ``@rpc(authority)`` annotation. See :ref:`Node.set_multiplayer_authority`. ---- @@ -2580,6 +2586,8 @@ enum **Variant.Type**: .. _class_@GlobalScope_constant_OP_MODULE: +.. _class_@GlobalScope_constant_OP_POWER: + .. _class_@GlobalScope_constant_OP_SHIFT_LEFT: .. _class_@GlobalScope_constant_OP_SHIFT_RIGHT: @@ -2632,29 +2640,31 @@ enum **Variant.Operator**: - **OP_MODULE** = **12** --- Remainder/modulo operator (``%``). -- **OP_SHIFT_LEFT** = **13** --- Left shift operator (``<<``). +- **OP_POWER** = **13** --- Power operator (``**``). -- **OP_SHIFT_RIGHT** = **14** --- Right shift operator (``>>``). +- **OP_SHIFT_LEFT** = **14** --- Left shift operator (``<<``). -- **OP_BIT_AND** = **15** --- Bitwise AND operator (``&``). +- **OP_SHIFT_RIGHT** = **15** --- Right shift operator (``>>``). -- **OP_BIT_OR** = **16** --- Bitwise OR operator (``|``). +- **OP_BIT_AND** = **16** --- Bitwise AND operator (``&``). -- **OP_BIT_XOR** = **17** --- Bitwise XOR operator (``^``). +- **OP_BIT_OR** = **17** --- Bitwise OR operator (``|``). -- **OP_BIT_NEGATE** = **18** --- Bitwise NOT operator (``~``). +- **OP_BIT_XOR** = **18** --- Bitwise XOR operator (``^``). -- **OP_AND** = **19** --- Logical AND operator (``and`` or ``&&``). +- **OP_BIT_NEGATE** = **19** --- Bitwise NOT operator (``~``). -- **OP_OR** = **20** --- Logical OR operator (``or`` or ``||``). +- **OP_AND** = **20** --- Logical AND operator (``and`` or ``&&``). -- **OP_XOR** = **21** --- Logical XOR operator (not implemented in GDScript). +- **OP_OR** = **21** --- Logical OR operator (``or`` or ``||``). -- **OP_NOT** = **22** --- Logical NOT operator (``not`` or ``!``). +- **OP_XOR** = **22** --- Logical XOR operator (not implemented in GDScript). -- **OP_IN** = **23** --- Logical IN operator (``in``). +- **OP_NOT** = **23** --- Logical NOT operator (``not`` or ``!``). -- **OP_MAX** = **24** --- Represents the size of the :ref:`Variant.Operator` enum. +- **OP_IN** = **24** --- Logical IN operator (``in``). + +- **OP_MAX** = **25** --- Represents the size of the :ref:`Variant.Operator` enum. Property Descriptions --------------------- @@ -3207,7 +3217,7 @@ Returns an "eased" value of ``x`` based on an easing function defined with ``cur \ `ease() curve values cheatsheet `__\ -See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. +See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value`. ---- @@ -3428,6 +3438,8 @@ Similar to :ref:`lerp`, but interpolates correct rotation = lerp_angle(min_angle, max_angle, elapsed) elapsed += delta +\ **Note:** This method lerps through the shortest path between ``from`` and ``to``. However, when these two angles are approximately ``PI + k * TAU`` apart for any integer ``k``, it's not obvious which way they lerp due to floating-point precision errors. For example, ``lerp_angle(0, PI, weight)`` lerps counter-clockwise, while ``lerp_angle(0, PI + 5 * TAU, weight)`` lerps clockwise. + ---- .. _class_@GlobalScope_method_linear2db: diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index d81614377..7f2a13bdf 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -109,15 +109,11 @@ Methods Operators --------- -+-------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`AABB` right **)** | +-------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | +-------------------------+---------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+---------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`AABB` right **)** | +-------------------------+---------------------------------------------------------------------------------------------------------+ @@ -400,10 +396,6 @@ Operator Descriptions .. _class_AABB_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`AABB` right **)** Returns ``true`` if the vectors are not equal. @@ -422,10 +414,6 @@ Inversely transforms (multiplies) the ``AABB`` by the given :ref:`Transform3D` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`AABB` right **)** Returns ``true`` if the AABBs are exactly equal. diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 69df7f3ff..5836f123e 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -23,23 +23,25 @@ This dialog is useful for small notifications to the user about an event. It can Properties ---------- -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`String` | :ref:`dialog_text` | ``""`` | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ -| :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | -+-----------------------------+-------------------------------------------------------------------------+-------------------------------------------------------------------------+ ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`dialog_close_on_escape` | ``true`` | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`String` | :ref:`dialog_text` | ``""`` | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ +| :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | ++-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ Methods ------- @@ -109,6 +111,20 @@ Sets autowrapping for the text in the dialog. ---- +.. _class_AcceptDialog_property_dialog_close_on_escape: + +- :ref:`bool` **dialog_close_on_escape** + ++-----------+----------------------------+ +| *Default* | ``true`` | ++-----------+----------------------------+ +| *Setter* | set_close_on_escape(value) | ++-----------+----------------------------+ +| *Getter* | get_close_on_escape() | ++-----------+----------------------------+ + +---- + .. _class_AcceptDialog_property_dialog_hide_on_ok: - :ref:`bool` **dialog_hide_on_ok** diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 97d9cc22b..43c4b251d 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -11,12 +11,12 @@ AnimatedSprite2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Sprite node that can use multiple textures for animation. +Sprite node that contains multiple textures as frames to play for animation. Description ----------- -Animations are created using a :ref:`SpriteFrames` resource, which can be configured in the editor via the SpriteFrames panel. +``AnimatedSprite2D`` is similar to the :ref:`Sprite2D` node, except it carries multiple textures as animation frames. Animations are created using a :ref:`SpriteFrames` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The :ref:`SpriteFrames` resource can be configured in the editor via the SpriteFrames bottom panel. \ **Note:** You can associate a set of normal or specular maps by creating additional :ref:`SpriteFrames` resources with a ``_normal`` or ``_specular`` suffix. For example, having 3 :ref:`SpriteFrames` resources ``run``, ``run_normal``, and ``run_specular`` will make it so the ``run`` animation uses normal and specular maps. @@ -91,7 +91,7 @@ Property Descriptions | *Getter* | get_animation() | +-----------+----------------------+ -The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset. +The current animation from the :ref:`frames` resource. If this value changes, the ``frame`` counter is reset. ---- @@ -169,7 +169,7 @@ The displayed animation frame's index. | *Getter* | get_sprite_frames() | +----------+--------------------------+ -The :ref:`SpriteFrames` resource containing the animation(s). +The :ref:`SpriteFrames` resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the :ref:`SpriteFrames` resource. ---- diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst new file mode 100644 index 000000000..0dd01c666 --- /dev/null +++ b/classes/class_animationlibrary.rst @@ -0,0 +1,112 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the AnimationLibrary.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_AnimationLibrary: + +AnimationLibrary +================ + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +Properties +---------- + ++-------------------------------------+-----------------------------------------------------+--------+ +| :ref:`Dictionary` | :ref:`_data` | ``{}`` | ++-------------------------------------+-----------------------------------------------------+--------+ + +Methods +------- + ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`add_animation` **(** :ref:`StringName` name, :ref:`Animation` animation **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`get_animation_list` **(** **)** |const| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_animation` **(** :ref:`StringName` name **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`rename_animation` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Signals +------- + +.. _class_AnimationLibrary_signal_animation_added: + +- **animation_added** **(** :ref:`Animation` name **)** + +---- + +.. _class_AnimationLibrary_signal_animation_removed: + +- **animation_removed** **(** :ref:`Animation` name **)** + +---- + +.. _class_AnimationLibrary_signal_animation_renamed: + +- **animation_renamed** **(** :ref:`Animation` name, :ref:`Animation` to_name **)** + +Property Descriptions +--------------------- + +.. _class_AnimationLibrary_property__data: + +- :ref:`Dictionary` **_data** + ++-----------+--------+ +| *Default* | ``{}`` | ++-----------+--------+ + +Method Descriptions +------------------- + +.. _class_AnimationLibrary_method_add_animation: + +- :ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** + +---- + +.. _class_AnimationLibrary_method_get_animation: + +- :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| + +---- + +.. _class_AnimationLibrary_method_get_animation_list: + +- :ref:`StringName[]` **get_animation_list** **(** **)** |const| + +---- + +.. _class_AnimationLibrary_method_has_animation: + +- :ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| + +---- + +.. _class_AnimationLibrary_method_remove_animation: + +- void **remove_animation** **(** :ref:`StringName` name **)** + +---- + +.. _class_AnimationLibrary_method_rename_animation: + +- void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 7c8e40d8f..4b78021d1 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -37,43 +37,43 @@ Properties Methods ------- -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek **)** |virtual| |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_input` **(** :ref:`String` name **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`float` blend, :ref:`int` pingponged=0 **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_input_count` **(** **)** |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_parameter` **(** :ref:`StringName` name **)** |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_path_filtered` **(** :ref:`NodePath` path **)** |const| | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_input` **(** :ref:`int` index **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_filter_path` **(** :ref:`NodePath` path, :ref:`bool` enable **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | -+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root **)** |virtual| |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_input` **(** :ref:`String` name **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` seek_root, :ref:`float` blend, :ref:`int` pingponged=0 **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_input_count` **(** **)** |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_parameter` **(** :ref:`StringName` name **)** |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_path_filtered` **(** :ref:`NodePath` path **)** |const| | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_input` **(** :ref:`int` index **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_filter_path` **(** :ref:`NodePath` path, :ref:`bool` enable **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | ++-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -183,7 +183,7 @@ Returns whether you want the blend tree editor to display filter editing on this .. _class_AnimationNode_method__process: -- :ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek **)** |virtual| |const| +- :ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root **)** |virtual| |const| User-defined callback called when a custom node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. @@ -203,7 +203,7 @@ Adds an input to the node. This is only useful for nodes created for use in an : .. _class_AnimationNode_method_blend_animation: -- void **blend_animation** **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`float` blend, :ref:`int` pingponged=0 **)** +- void **blend_animation** **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` seek_root, :ref:`float` blend, :ref:`int` pingponged=0 **)** Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seek`` happened. @@ -211,7 +211,7 @@ Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`A .. _class_AnimationNode_method_blend_input: -- :ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** +- :ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** Blend an input. This is only useful for nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). @@ -219,7 +219,7 @@ Blend an input. This is only useful for nodes created for an :ref:`AnimationNode .. _class_AnimationNode_method_blend_node: -- :ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** +- :ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` seek_root, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` optimize=true **)** Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, else editors will not display your node for addition. diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index 5b94cd1b1..bc13dad2d 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -16,7 +16,9 @@ AnimationNodeBlendTree Description ----------- -This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots. +This node may contain a sub-tree of any other blend type nodes, such as :ref:`AnimationNodeTransition`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, etc. This is one of the most commonly used roots. + +An :ref:`AnimationNodeOutput` node named ``output`` is created by default. Tutorials --------- diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 9faa05bb6..e10773af6 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -35,9 +35,9 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadein_time` | ``0.1`` | +| :ref:`float` | :ref:`fadein_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadeout_time` | ``0.1`` | +| :ref:`float` | :ref:`fadeout_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`MixMode` | :ref:`mix_mode` | ``0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ @@ -115,7 +115,7 @@ If :ref:`autorestart` is ``true - :ref:`float` **fadein_time** +-----------+------------------------+ -| *Default* | ``0.1`` | +| *Default* | ``0.0`` | +-----------+------------------------+ | *Setter* | set_fadein_time(value) | +-----------+------------------------+ @@ -129,7 +129,7 @@ If :ref:`autorestart` is ``true - :ref:`float` **fadeout_time** +-----------+-------------------------+ -| *Default* | ``0.1`` | +| *Default* | ``0.0`` | +-----------+-------------------------+ | *Setter* | set_fadeout_time(value) | +-----------+-------------------------+ diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index e792972df..d4dab0981 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -48,8 +48,6 @@ Methods +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_transition` **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_end_node` **(** **)** |const| | -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_graph_offset` **(** **)** |const| | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationNode` | :ref:`get_node` **(** :ref:`StringName` name **)** |const| | @@ -58,8 +56,6 @@ Methods +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_start_node` **(** **)** |const| | -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationNodeStateMachineTransition` | :ref:`get_transition` **(** :ref:`int` idx **)** |const| | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_transition_count` **(** **)** |const| | @@ -82,14 +78,10 @@ Methods +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`replace_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_end_node` **(** :ref:`StringName` name **)** | -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_graph_offset` **(** :ref:`Vector2` offset **)** | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_node_position` **(** :ref:`StringName` name, :ref:`Vector2` position **)** | +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_start_node` **(** :ref:`StringName` name **)** | -+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -110,14 +102,6 @@ Adds a transition between the given nodes. ---- -.. _class_AnimationNodeStateMachine_method_get_end_node: - -- :ref:`String` **get_end_node** **(** **)** |const| - -Returns the graph's end node. - ----- - .. _class_AnimationNodeStateMachine_method_get_graph_offset: - :ref:`Vector2` **get_graph_offset** **(** **)** |const| @@ -150,14 +134,6 @@ Returns the given node's coordinates. Used for display in the editor. ---- -.. _class_AnimationNodeStateMachine_method_get_start_node: - -- :ref:`String` **get_start_node** **(** **)** |const| - -Returns the graph's end node. - ----- - .. _class_AnimationNodeStateMachine_method_get_transition: - :ref:`AnimationNodeStateMachineTransition` **get_transition** **(** :ref:`int` idx **)** |const| @@ -244,14 +220,6 @@ Renames the given node. ---- -.. _class_AnimationNodeStateMachine_method_set_end_node: - -- void **set_end_node** **(** :ref:`StringName` name **)** - -Sets the given node as the graph end point. - ----- - .. _class_AnimationNodeStateMachine_method_set_graph_offset: - void **set_graph_offset** **(** :ref:`Vector2` offset **)** @@ -266,14 +234,6 @@ Sets the draw offset of the graph. Used for display in the editor. Sets the node's coordinates. Used for display in the editor. ----- - -.. _class_AnimationNodeStateMachine_method_set_start_node: - -- void **set_start_node** **(** :ref:`StringName` name **)** - -Sets the given node as the graph start point. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 03f4124b3..0ccf97ee9 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -64,7 +64,7 @@ Methods ------- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`add_animation` **(** :ref:`StringName` name, :ref:`Animation` animation **)** | +| :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`advance` **(** :ref:`float` delta **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -78,8 +78,14 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_blend_time` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| | @@ -90,6 +96,8 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`play` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | @@ -98,9 +106,9 @@ Methods +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`queue` **(** :ref:`StringName` name **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_animation` **(** :ref:`StringName` name **)** | +| void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rename_animation` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | +| void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`seek` **(** :ref:`float` seconds, :ref:`bool` update=false **)** | +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -365,11 +373,9 @@ The node from which node path references will travel. Method Descriptions ------------------- -.. _class_AnimationPlayer_method_add_animation: +.. _class_AnimationPlayer_method_add_animation_library: -- :ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** - -Adds ``animation`` to the player accessible with the key ``name``. +- :ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** ---- @@ -421,6 +427,12 @@ Returns the name of ``animation`` or an empty string if not found. ---- +.. _class_AnimationPlayer_method_find_animation_library: + +- :ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| + +---- + .. _class_AnimationPlayer_method_get_animation: - :ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| @@ -429,6 +441,18 @@ Returns the :ref:`Animation` with key ``name`` or ``null`` if n ---- +.. _class_AnimationPlayer_method_get_animation_library: + +- :ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| + +---- + +.. _class_AnimationPlayer_method_get_animation_library_list: + +- :ref:`StringName[]` **get_animation_library_list** **(** **)** |const| + +---- + .. _class_AnimationPlayer_method_get_animation_list: - :ref:`PackedStringArray` **get_animation_list** **(** **)** |const| @@ -469,6 +493,12 @@ Returns ``true`` if the ``AnimationPlayer`` stores an :ref:`Animation` **has_animation_library** **(** :ref:`StringName` name **)** |const| + +---- + .. _class_AnimationPlayer_method_is_playing: - :ref:`bool` **is_playing** **(** **)** |const| @@ -509,19 +539,15 @@ Queues an animation for playback once the current one is done. ---- -.. _class_AnimationPlayer_method_remove_animation: +.. _class_AnimationPlayer_method_remove_animation_library: -- void **remove_animation** **(** :ref:`StringName` name **)** - -Removes the animation with key ``name``. +- void **remove_animation_library** **(** :ref:`StringName` name **)** ---- -.. _class_AnimationPlayer_method_rename_animation: +.. _class_AnimationPlayer_method_rename_animation_library: -- void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** - -Renames an existing animation with key ``name`` to ``newname``. +- void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** ---- @@ -531,6 +557,8 @@ Renames an existing animation with key ``name`` to ``newname``. Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time. Events between the current frame and ``seconds`` are skipped. +\ **Note:** Seeking to the end of the animation doesn't emit :ref:`animation_finished`. If you want to skip animation and emit the signal, use :ref:`advance`. + ---- .. _class_AnimationPlayer_method_set_blend_time: diff --git a/classes/class_array.rst b/classes/class_array.rst index d1d3ae7f9..207a82ddb 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -97,6 +97,10 @@ Constructors Methods ------- ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`all` **(** :ref:`Callable` method **)** |const| | ++-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`any` **(** :ref:`Callable` method **)** |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`append` **(** :ref:`Variant` value **)** | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -174,8 +178,6 @@ Methods Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Array` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ @@ -185,8 +187,6 @@ Operators +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`Array` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Array` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`Array` right **)** | @@ -268,6 +268,58 @@ Constructs an array from a :ref:`PackedVector3Array`. Method Descriptions ------------------- +.. _class_Array_method_all: + +- :ref:`bool` **all** **(** :ref:`Callable` method **)** |const| + +Calls the provided :ref:`Callable` on each element in the array and returns ``true`` if the :ref:`Callable` returns ``true`` for *all* elements in the array. If the :ref:`Callable` returns ``false`` for one array element or more, this method returns ``false``. + +The callable's method should take one :ref:`Variant` parameter (the current array element) and return a boolean value. + +:: + + func _ready(): + print([6, 10, 6].all(greater_than_5)) # Prints True (3 elements evaluate to `true`). + print([4, 10, 4].all(greater_than_5)) # Prints False (1 elements evaluate to `true`). + print([4, 4, 4].all(greater_than_5)) # Prints False (0 elements evaluate to `true`). + + print([6, 10, 6].all(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function. + + func greater_than_5(number): + return number > 5 + +See also :ref:`any`, :ref:`filter`, :ref:`map` and :ref:`reduce`. + +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). + +---- + +.. _class_Array_method_any: + +- :ref:`bool` **any** **(** :ref:`Callable` method **)** |const| + +Calls the provided :ref:`Callable` on each element in the array and returns ``true`` if the :ref:`Callable` returns ``true`` for *one or more* elements in the array. If the :ref:`Callable` returns ``false`` for all elements in the array, this method returns ``false``. + +The callable's method should take one :ref:`Variant` parameter (the current array element) and return a boolean value. + +:: + + func _ready(): + print([6, 10, 6].any(greater_than_5)) # Prints True (3 elements evaluate to `true`). + print([4, 10, 4].any(greater_than_5)) # Prints True (1 elements evaluate to `true`). + print([4, 4, 4].any(greater_than_5)) # Prints False (0 elements evaluate to `true`). + + print([6, 10, 6].any(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function. + + func greater_than_5(number): + return number > 5 + +See also :ref:`all`, :ref:`filter`, :ref:`map` and :ref:`reduce`. + +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). + +---- + .. _class_Array_method_append: - void **append** **(** :ref:`Variant` value **)** @@ -351,7 +403,7 @@ If ``deep`` is ``true``, a deep copy is performed: all nested arrays and diction - void **erase** **(** :ref:`Variant` value **)** -Removes the first occurrence of a value from the array. To remove an element by index, use :ref:`remove_at` instead. +Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at` instead. \ **Note:** This method acts in-place and doesn't return a value. @@ -401,6 +453,8 @@ The callable's method should take one :ref:`Variant` parameter (t func remove_1(number): return number != 1 +See also :ref:`any`, :ref:`all`, :ref:`map` and :ref:`reduce`. + ---- .. _class_Array_method_find: @@ -529,6 +583,8 @@ The callable's method should take one :ref:`Variant` parameter (t func negate(number): return -number +See also :ref:`filter`, :ref:`reduce`, :ref:`any` and :ref:`all`. + ---- .. _class_Array_method_max: @@ -610,6 +666,8 @@ The callable's method takes two arguments: the current value of ``accum`` and th func sum(accum, number): return accum + number +See also :ref:`map`, :ref:`filter`, :ref:`any` and :ref:`all`. + ---- .. _class_Array_method_remove_at: @@ -751,58 +809,66 @@ Operator Descriptions .. _class_Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Array` right **)** +Compares the left operand ``Array`` against the ``right`` ``Array``. Returns ``true`` if the sizes or contents of the arrays are *not* equal, ``false`` otherwise. + ---- .. _class_Array_operator_sum_Array: - :ref:`Array` **operator +** **(** :ref:`Array` right **)** +Concatenates two ``Array``\ s together, with the ``right`` ``Array`` being added to the end of the ``Array`` specified in the left operand. For example, ``[1, 2] + [3, 4]`` results in ``[1, 2, 3, 4]``. + ---- .. _class_Array_operator_lt_bool: - :ref:`bool` **operator <** **(** :ref:`Array` right **)** +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``false`` if the left operand ``Array`` has less elements, otherwise it returns ``true``. + ---- .. _class_Array_operator_lte_bool: - :ref:`bool` **operator <=** **(** :ref:`Array` right **)** +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the left operand ``Array`` has less or the same number of elements, otherwise it returns ``false``. + ---- .. _class_Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Array` right **)** +Compares the left operand ``Array`` against the ``right`` ``Array``. Returns ``true`` if the sizes and contents of the arrays are equal, ``false`` otherwise. + ---- .. _class_Array_operator_gt_bool: - :ref:`bool` **operator >** **(** :ref:`Array` right **)** +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is greater, or ``false`` if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the ``right`` ``Array`` has more elements, otherwise it returns ``false``. + ---- .. _class_Array_operator_gte_bool: - :ref:`bool` **operator >=** **(** :ref:`Array` right **)** +Performs a comparison for each index between the left operand ``Array`` and the ``right`` ``Array``, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is greater, or ``false`` if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the ``right`` ``Array`` has more or the same number of elements, otherwise it returns ``false``. + ---- .. _class_Array_operator_idx_void: - void **operator []** **(** :ref:`int` index **)** +Returns a reference to the element of type :ref:`Variant` at the specified location. Arrays start at index 0. ``index`` can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index acf1f06cd..b294ee8de 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -18,6 +18,11 @@ 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. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index c468e5437..456490497 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -16,7 +16,7 @@ AStar class representation that uses 2D vectors as edges. Description ----------- -This is a wrapper for the :ref:`AStar` class which uses 2D vectors instead of 3D vectors. +This is a wrapper for the :ref:`AStar3D` class which uses 2D vectors instead of 3D vectors. Methods ------- @@ -100,7 +100,7 @@ Note that this function is hidden in the default ``AStar2D`` class. - void **add_point** **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** -Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 1 or larger. +Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. The ``weight_scale`` is multiplied by the result of :ref:`_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 ``weight_scale``\ s to form a path. diff --git a/classes/class_astar.rst b/classes/class_astar3d.rst similarity index 63% rename from classes/class_astar.rst rename to classes/class_astar3d.rst index 81e864818..cb3da301c 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar3d.rst @@ -1,13 +1,13 @@ :github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the AStar.xml source instead. +.. DO NOT EDIT THIS FILE, but the AStar3D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. -.. _class_AStar: +.. _class_AStar3D: -AStar -===== +AStar3D +======= **Inherits:** :ref:`RefCounted` **<** :ref:`Object` @@ -18,9 +18,9 @@ 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. -You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. +You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Then you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. -It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. +It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar3D`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. .. tabs:: @@ -28,7 +28,7 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha .. code-tab:: gdscript class MyAStar: - extends AStar + extends AStar3D func _compute_cost(u, v): return abs(u - v) @@ -38,7 +38,7 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha .. code-tab:: csharp - public class MyAStar : AStar + public class MyAStar : AStar3D { public override float _ComputeCost(int u, int v) { @@ -52,107 +52,107 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha -\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. +\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. -If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_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 the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. +If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_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 the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. Methods ------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_point_id` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_capacity` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_point_connections` **(** :ref:`int` id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_point_ids` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` id **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_point_id` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_capacity` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_point_connections` **(** :ref:`int` id **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_point_ids` **(** **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` id **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- -.. _class_AStar_method__compute_cost: +.. _class_AStar3D_method__compute_cost: - :ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| Called when computing the cost between two connected points. -Note that this function is hidden in the default ``AStar`` class. +Note that this function is hidden in the default ``AStar3D`` class. ---- -.. _class_AStar_method__estimate_cost: +.. _class_AStar3D_method__estimate_cost: - :ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| Called when estimating the cost between a point and the path's ending point. -Note that this function is hidden in the default ``AStar`` class. +Note that this function is hidden in the default ``AStar3D`` class. ---- -.. _class_AStar_method_add_point: +.. _class_AStar3D_method_add_point: - void **add_point** **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** -Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 1 or larger. +Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_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 ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_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 ``weight_scale``\ s to form a path. .. tabs:: .. code-tab:: gdscript - var astar = AStar.new() + var astar = AStar3D.new() astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 .. code-tab:: csharp - var astar = new AStar(); + var astar = new AStar3D(); astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1 @@ -161,7 +161,7 @@ If there already exists a point for the given ``id``, its position and weight sc ---- -.. _class_AStar_method_are_points_connected: +.. _class_AStar3D_method_are_points_connected: - :ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| @@ -169,7 +169,7 @@ Returns whether the two given points are directly connected by a segment. If ``b ---- -.. _class_AStar_method_clear: +.. _class_AStar3D_method_clear: - void **clear** **(** **)** @@ -177,7 +177,7 @@ Clears all the points and segments. ---- -.. _class_AStar_method_connect_points: +.. _class_AStar3D_method_connect_points: - void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** @@ -188,14 +188,14 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o .. code-tab:: gdscript - var astar = AStar.new() + var astar = AStar3D.new() astar.add_point(1, Vector3(1, 1, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2, false) .. code-tab:: csharp - var astar = new AStar(); + var astar = new AStar3D(); astar.AddPoint(1, new Vector3(1, 1, 0)); astar.AddPoint(2, new Vector3(0, 5, 0)); astar.ConnectPoints(1, 2, false); @@ -204,7 +204,7 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o ---- -.. _class_AStar_method_disconnect_points: +.. _class_AStar3D_method_disconnect_points: - void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** @@ -212,7 +212,7 @@ Deletes the segment between the given points. If ``bidirectional`` is ``false``, ---- -.. _class_AStar_method_get_available_point_id: +.. _class_AStar3D_method_get_available_point_id: - :ref:`int` **get_available_point_id** **(** **)** |const| @@ -220,7 +220,7 @@ Returns the next available point ID with no point associated to it. ---- -.. _class_AStar_method_get_closest_point: +.. _class_AStar3D_method_get_closest_point: - :ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| @@ -230,7 +230,7 @@ Returns the ID of the closest point to ``to_position``, optionally taking disabl ---- -.. _class_AStar_method_get_closest_position_in_segment: +.. _class_AStar3D_method_get_closest_position_in_segment: - :ref:`Vector3` **get_closest_position_in_segment** **(** :ref:`Vector3` to_position **)** |const| @@ -241,7 +241,7 @@ Returns the closest position to ``to_position`` that resides inside a segment be .. code-tab:: gdscript - var astar = AStar.new() + var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 5, 0)) astar.connect_points(1, 2) @@ -249,7 +249,7 @@ Returns the closest position to ``to_position`` that resides inside a segment be .. code-tab:: csharp - var astar = new AStar(); + var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 5, 0)); astar.ConnectPoints(1, 2); @@ -261,18 +261,18 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo ---- -.. _class_AStar_method_get_id_path: +.. _class_AStar3D_method_get_id_path: - :ref:`PackedInt32Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** -Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. +Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. .. tabs:: .. code-tab:: gdscript - var astar = AStar.new() + var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 astar.add_point(3, Vector3(1, 1, 0)) @@ -287,7 +287,7 @@ Returns an array with the IDs of the points that form the path found by AStar be .. code-tab:: csharp - var astar = new AStar(); + var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1 astar.AddPoint(3, new Vector3(1, 1, 0)); @@ -304,7 +304,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` ---- -.. _class_AStar_method_get_point_capacity: +.. _class_AStar3D_method_get_point_capacity: - :ref:`int` **get_point_capacity** **(** **)** |const| @@ -312,7 +312,7 @@ Returns the capacity of the structure backing the points, useful in conjunction ---- -.. _class_AStar_method_get_point_connections: +.. _class_AStar3D_method_get_point_connections: - :ref:`PackedInt32Array` **get_point_connections** **(** :ref:`int` id **)** @@ -323,7 +323,7 @@ Returns an array with the IDs of the points that form the connection with the gi .. code-tab:: gdscript - var astar = AStar.new() + var astar = AStar3D.new() astar.add_point(1, Vector3(0, 0, 0)) astar.add_point(2, Vector3(0, 1, 0)) astar.add_point(3, Vector3(1, 1, 0)) @@ -336,7 +336,7 @@ Returns an array with the IDs of the points that form the connection with the gi .. code-tab:: csharp - var astar = new AStar(); + var astar = new AStar3D(); astar.AddPoint(1, new Vector3(0, 0, 0)); astar.AddPoint(2, new Vector3(0, 1, 0)); astar.AddPoint(3, new Vector3(1, 1, 0)); @@ -350,7 +350,7 @@ Returns an array with the IDs of the points that form the connection with the gi ---- -.. _class_AStar_method_get_point_count: +.. _class_AStar3D_method_get_point_count: - :ref:`int` **get_point_count** **(** **)** |const| @@ -358,7 +358,7 @@ Returns the number of points currently in the points pool. ---- -.. _class_AStar_method_get_point_ids: +.. _class_AStar3D_method_get_point_ids: - :ref:`Array` **get_point_ids** **(** **)** @@ -366,17 +366,17 @@ Returns an array of all point IDs. ---- -.. _class_AStar_method_get_point_path: +.. _class_AStar3D_method_get_point_path: - :ref:`PackedVector3Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** -Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. +Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. \ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector3Array` and will print an error message. ---- -.. _class_AStar_method_get_point_position: +.. _class_AStar3D_method_get_point_position: - :ref:`Vector3` **get_point_position** **(** :ref:`int` id **)** |const| @@ -384,7 +384,7 @@ Returns the position of the point associated with the given ``id``. ---- -.. _class_AStar_method_get_point_weight_scale: +.. _class_AStar3D_method_get_point_weight_scale: - :ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| @@ -392,7 +392,7 @@ Returns the weight scale of the point associated with the given ``id``. ---- -.. _class_AStar_method_has_point: +.. _class_AStar3D_method_has_point: - :ref:`bool` **has_point** **(** :ref:`int` id **)** |const| @@ -400,7 +400,7 @@ Returns whether a point associated with the given ``id`` exists. ---- -.. _class_AStar_method_is_point_disabled: +.. _class_AStar3D_method_is_point_disabled: - :ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| @@ -408,7 +408,7 @@ Returns whether a point is disabled or not for pathfinding. By default, all poin ---- -.. _class_AStar_method_remove_point: +.. _class_AStar3D_method_remove_point: - void **remove_point** **(** :ref:`int` id **)** @@ -416,7 +416,7 @@ Removes the point associated with the given ``id`` from the points pool. ---- -.. _class_AStar_method_reserve_space: +.. _class_AStar3D_method_reserve_space: - void **reserve_space** **(** :ref:`int` num_nodes **)** @@ -424,7 +424,7 @@ Reserves space internally for ``num_nodes`` points, useful if you're adding a kn ---- -.. _class_AStar_method_set_point_disabled: +.. _class_AStar3D_method_set_point_disabled: - void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** @@ -432,7 +432,7 @@ Disables or enables the specified point for pathfinding. Useful for making a tem ---- -.. _class_AStar_method_set_point_position: +.. _class_AStar3D_method_set_point_position: - void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** @@ -440,11 +440,11 @@ Sets the ``position`` for the point with the given ``id``. ---- -.. _class_AStar_method_set_point_weight_scale: +.. _class_AStar3D_method_set_point_weight_scale: - void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index 1845acb84..4da95e6dd 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -11,7 +11,12 @@ AudioEffectStereoEnhance **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +An audio effect that can be used to adjust the intensity of stereo panning. +Description +----------- + +An audio effect that can be used to adjust the intensity of stereo panning. Properties ---------- @@ -39,6 +44,8 @@ Property Descriptions | *Getter* | get_pan_pullout() | +-----------+------------------------+ +Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. + ---- .. _class_AudioEffectStereoEnhance_property_surround: diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index e1c9371b9..118166734 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -23,29 +23,27 @@ BaseButton is the abstract base class for buttons, so it shouldn't be used direc Properties ---------- -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`ActionMode` | :ref:`action_mode` | ``1`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`ButtonGroup` | :ref:`button_group` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`MouseButton` | :ref:`button_mask` | ``1`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`button_pressed` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`disabled` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`keep_pressed_outside` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`Shortcut` | :ref:`shortcut` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`Node` | :ref:`shortcut_context` | | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_in_tooltip` | ``true`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`toggle_mode` | ``false`` | -+---------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`ActionMode` | :ref:`action_mode` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`ButtonGroup` | :ref:`button_group` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`MouseButton` | :ref:`button_mask` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`button_pressed` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`disabled` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`keep_pressed_outside` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Shortcut` | :ref:`shortcut` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`shortcut_context` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shortcut_in_tooltip` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`toggle_mode` | ++---------------------------------------------------+-----------------------------------------------------------------------------+ Methods ------- @@ -145,13 +143,11 @@ Property Descriptions - :ref:`ActionMode` **action_mode** -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_action_mode(value) | -+-----------+------------------------+ -| *Getter* | get_action_mode() | -+-----------+------------------------+ ++----------+------------------------+ +| *Setter* | set_action_mode(value) | ++----------+------------------------+ +| *Getter* | get_action_mode() | ++----------+------------------------+ Determines when the button is considered clicked, one of the :ref:`ActionMode` constants. @@ -175,13 +171,11 @@ The :ref:`ButtonGroup` associated with the button. Not to be - :ref:`MouseButton` **button_mask** -+-----------+------------------------+ -| *Default* | ``1`` | -+-----------+------------------------+ -| *Setter* | set_button_mask(value) | -+-----------+------------------------+ -| *Getter* | get_button_mask() | -+-----------+------------------------+ ++----------+------------------------+ +| *Setter* | set_button_mask(value) | ++----------+------------------------+ +| *Getter* | get_button_mask() | ++----------+------------------------+ Binary mask to choose which mouse buttons this button will respond to. @@ -193,13 +187,11 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B - :ref:`bool` **button_pressed** -+-----------+--------------------+ -| *Default* | ``false`` | -+-----------+--------------------+ -| *Setter* | set_pressed(value) | -+-----------+--------------------+ -| *Getter* | is_pressed() | -+-----------+--------------------+ ++----------+--------------------+ +| *Setter* | set_pressed(value) | ++----------+--------------------+ +| *Getter* | is_pressed() | ++----------+--------------------+ If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode` is active). Only works if :ref:`toggle_mode` is ``true``. @@ -211,13 +203,11 @@ If ``true``, the button's state is pressed. Means the button is pressed down or - :ref:`bool` **disabled** -+-----------+---------------------+ -| *Default* | ``false`` | -+-----------+---------------------+ -| *Setter* | set_disabled(value) | -+-----------+---------------------+ -| *Getter* | is_disabled() | -+-----------+---------------------+ ++----------+---------------------+ +| *Setter* | set_disabled(value) | ++----------+---------------------+ +| *Getter* | is_disabled() | ++----------+---------------------+ If ``true``, the button is in disabled state and can't be clicked or toggled. @@ -227,13 +217,11 @@ If ``true``, the button is in disabled state and can't be clicked or toggled. - :ref:`bool` **keep_pressed_outside** -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_keep_pressed_outside(value) | -+-----------+---------------------------------+ -| *Getter* | is_keep_pressed_outside() | -+-----------+---------------------------------+ ++----------+---------------------------------+ +| *Setter* | set_keep_pressed_outside(value) | ++----------+---------------------------------+ +| *Getter* | is_keep_pressed_outside() | ++----------+---------------------------------+ If ``true``, the button stays pressed when moving the cursor outside the button while pressing it. @@ -273,13 +261,11 @@ The :ref:`Node` which must be a parent of the focused GUI :ref:`Cont - :ref:`bool` **shortcut_in_tooltip** -+-----------+----------------------------------+ -| *Default* | ``true`` | -+-----------+----------------------------------+ -| *Setter* | set_shortcut_in_tooltip(value) | -+-----------+----------------------------------+ -| *Getter* | is_shortcut_in_tooltip_enabled() | -+-----------+----------------------------------+ ++----------+----------------------------------+ +| *Setter* | set_shortcut_in_tooltip(value) | ++----------+----------------------------------+ +| *Getter* | is_shortcut_in_tooltip_enabled() | ++----------+----------------------------------+ If ``true``, the button will add information about its shortcut in the tooltip. @@ -289,13 +275,11 @@ If ``true``, the button will add information about its shortcut in the tooltip. - :ref:`bool` **toggle_mode** -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_toggle_mode(value) | -+-----------+------------------------+ -| *Getter* | is_toggle_mode() | -+-----------+------------------------+ ++----------+------------------------+ +| *Setter* | set_toggle_mode(value) | ++----------+------------------------+ +| *Getter* | is_toggle_mode() | ++----------+------------------------+ If ``true``, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 27f7a4612..aa6fd2df2 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -31,10 +31,12 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Color` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`albedo_tex_force_srgb` | ``false`` | -+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Texture2D` | :ref:`albedo_texture` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`albedo_texture_force_srgb` | ``false`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`albedo_texture_msdf` | ``false`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`alpha_antialiasing_edge` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`AlphaAntiAliasing` | :ref:`alpha_antialiasing_mode` | | @@ -151,6 +153,10 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`TextureChannel` | :ref:`metallic_texture_channel` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`msdf_outline_size` | ``0.0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`msdf_pixel_range` | ``4.0`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`no_depth_test` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`normal_enabled` | ``false`` | @@ -632,6 +638,8 @@ enum **CullMode**: .. _class_BaseMaterial3D_constant_FLAG_PARTICLE_TRAILS_MODE: +.. _class_BaseMaterial3D_constant_FLAG_ALBEDO_TEXTURE_MSDF: + .. _class_BaseMaterial3D_constant_FLAG_MAX: enum **Flags**: @@ -640,7 +648,9 @@ enum **Flags**: - **FLAG_ALBEDO_FROM_VERTEX_COLOR** = **1** --- Set ``ALBEDO`` to the per-vertex color specified in the mesh. -- **FLAG_SRGB_VERTEX_COLOR** = **2** --- Vertex color is in sRGB space and needs to be converted to linear. Only applies in the Vulkan renderer. +- **FLAG_SRGB_VERTEX_COLOR** = **2** --- Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also :ref:`vertex_color_is_srgb`. + +\ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends. - **FLAG_USE_POINT_SIZE** = **3** --- Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use ``POINT_COORD`` instead of ``UV``. @@ -660,7 +670,7 @@ enum **Flags**: - **FLAG_EMISSION_ON_UV2** = **11** --- Use ``UV2`` coordinates to look up from the :ref:`emission_texture`. -- **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = **12** --- Forces the shader to convert albedo from sRGB space to linear space. +- **FLAG_ALBEDO_TEXTURE_FORCE_SRGB** = **12** --- Forces the shader to convert albedo from sRGB space to linear space. See also :ref:`albedo_texture_force_srgb`. - **FLAG_DONT_RECEIVE_SHADOWS** = **13** --- Disables receiving shadows from other objects. @@ -676,7 +686,9 @@ enum **Flags**: - **FLAG_PARTICLE_TRAILS_MODE** = **19** -- **FLAG_MAX** = **20** --- Represents the size of the :ref:`Flags` enum. +- **FLAG_ALBEDO_TEXTURE_MSDF** = **20** --- Enables multichannel signed distance field rendering shader. + +- **FLAG_MAX** = **21** --- Represents the size of the :ref:`Flags` enum. ---- @@ -766,7 +778,7 @@ enum **TextureChannel**: - **TEXTURE_CHANNEL_ALPHA** = **3** --- Used to read from the alpha channel of a texture. -- **TEXTURE_CHANNEL_GRAYSCALE** = **4** --- Currently unused. +- **TEXTURE_CHANNEL_GRAYSCALE** = **4** --- Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. ---- @@ -821,21 +833,7 @@ Property Descriptions The material's base color. ----- - -.. _class_BaseMaterial3D_property_albedo_tex_force_srgb: - -- :ref:`bool` **albedo_tex_force_srgb** - -+-----------+-----------------+ -| *Default* | ``false`` | -+-----------+-----------------+ -| *Setter* | set_flag(value) | -+-----------+-----------------+ -| *Getter* | get_flag() | -+-----------+-----------------+ - -Forces a conversion of the :ref:`albedo_texture` from sRGB space to linear space. +\ **Note:** If :ref:`detail_enabled` is ``true`` and a :ref:`detail_albedo` texture is specified, :ref:`albedo_color` will *not* modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent :ref:`detail_albedo` texture instead. ---- @@ -851,6 +849,42 @@ Forces a conversion of the :ref:`albedo_texture`. Used for basic texturing of objects. +If the texture appears unexpectedly too dark or too bright, check :ref:`albedo_texture_force_srgb`. + +---- + +.. _class_BaseMaterial3D_property_albedo_texture_force_srgb: + +- :ref:`bool` **albedo_texture_force_srgb** + ++-----------+-----------------+ +| *Default* | ``false`` | ++-----------+-----------------+ +| *Setter* | set_flag(value) | ++-----------+-----------------+ +| *Getter* | get_flag() | ++-----------+-----------------+ + +If ``true``, forces a conversion of the :ref:`albedo_texture` from sRGB color space to linear color space. See also :ref:`vertex_color_is_srgb`. + +This should only be enabled when needed (typically when using a :ref:`ViewportTexture` as :ref:`albedo_texture`). If :ref:`albedo_texture_force_srgb` is ``true`` when it shouldn't be, the texture will appear to be too dark. If :ref:`albedo_texture_force_srgb` is ``false`` when it shouldn't be, the texture will appear to be too bright. + +---- + +.. _class_BaseMaterial3D_property_albedo_texture_msdf: + +- :ref:`bool` **albedo_texture_msdf** + ++-----------+-----------------+ +| *Default* | ``false`` | ++-----------+-----------------+ +| *Setter* | set_flag(value) | ++-----------+-----------------+ +| *Getter* | get_flag() | ++-----------+-----------------+ + +Enables multichannel signed distance field rendering shader. Use :ref:`msdf_pixel_range` and :ref:`msdf_outline_size` to configure MSDF parameters. + ---- .. _class_BaseMaterial3D_property_alpha_antialiasing_edge: @@ -1243,7 +1277,9 @@ Determines when depth rendering takes place. See :ref:`DepthDrawMode`'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see :ref:`detail_mask`. + +\ **Note:** :ref:`detail_albedo` is *not* modulated by :ref:`albedo_color`. ---- @@ -1275,7 +1311,7 @@ Specifies how the :ref:`detail_albedo`. This can be used to add variation to objects, or to blend between two different albedo/normal textures. +If ``true``, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on :ref:`detail_mask` and :ref:`detail_albedo`'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. ---- @@ -1289,7 +1325,7 @@ If ``true``, enables the detail overlay. Detail is a second texture that gets mi | *Getter* | get_texture() | +----------+--------------------+ -Texture used to specify how the detail textures get blended with the base textures. +Texture used to specify how the detail textures get blended with the base textures. :ref:`detail_mask` can be used together with :ref:`detail_albedo`'s alpha channel (if any). ---- @@ -1303,7 +1339,7 @@ Texture used to specify how the detail textures get blended with the base textur | *Getter* | get_texture() | +----------+--------------------+ -Texture that specifies the per-pixel normal of the detail overlay. +Texture that specifies the per-pixel normal of the detail overlay. The :ref:`detail_normal` texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`detail_normal` is oriented around the surface normal provided by the :ref:`Mesh`. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. @@ -1755,6 +1791,38 @@ Specifies the channel of the :ref:`metallic_texture` **msdf_outline_size** + ++-----------+------------------------------+ +| *Default* | ``0.0`` | ++-----------+------------------------------+ +| *Setter* | set_msdf_outline_size(value) | ++-----------+------------------------------+ +| *Getter* | get_msdf_outline_size() | ++-----------+------------------------------+ + +The width of the shape outine. + +---- + +.. _class_BaseMaterial3D_property_msdf_pixel_range: + +- :ref:`float` **msdf_pixel_range** + ++-----------+-----------------------------+ +| *Default* | ``4.0`` | ++-----------+-----------------------------+ +| *Setter* | set_msdf_pixel_range(value) | ++-----------+-----------------------------+ +| *Getter* | get_msdf_pixel_range() | ++-----------+-----------------------------+ + +The width of the range around the shape between the minimum and maximum representable signed distance. + +---- + .. _class_BaseMaterial3D_property_no_depth_test: - :ref:`bool` **no_depth_test** @@ -1813,12 +1881,14 @@ The strength of the normal map's effect. | *Getter* | get_texture() | +----------+--------------------+ -Texture used to specify the normal at a given pixel. The ``normal_texture`` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from ``normal_texture`` is oriented around the surface normal provided by the :ref:`Mesh`. +Texture used to specify the normal at a given pixel. The :ref:`normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`normal_texture` is oriented around the surface normal provided by the :ref:`Mesh`. \ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool`, you can use :ref:`SurfaceTool.generate_normals` and :ref:`SurfaceTool.generate_tangents` to automatically generate normals and tangents respectively. \ **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. +\ **Note:** If :ref:`detail_enabled` is ``true``, the :ref:`detail_albedo` texture is drawn *below* the :ref:`normal_texture`. To display a normal map *above* the :ref:`detail_albedo` texture, use :ref:`detail_normal` instead. + ---- .. _class_BaseMaterial3D_property_orm_texture: @@ -2527,7 +2597,9 @@ If ``true``, triplanar mapping for ``UV2`` is calculated in world space rather t | *Getter* | get_flag() | +-----------+-----------------+ -If ``true``, the model's vertex colors are processed as sRGB mode. +If ``true``, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If ``false``, vertex colors are considered to be stored in linear color space and are rendered as-is. See also :ref:`albedo_texture_force_srgb`. + +\ **Note:** Only effective when using the Vulkan Clustered or Vulkan Mobile backends. ---- diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 6bb4ff213..f939474c9 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -58,7 +58,7 @@ Constructors +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`Basis` **(** :ref:`Basis` from **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`Basis` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | +| :ref:`Basis` | :ref:`Basis` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`Basis` **(** :ref:`Quaternion` from **)** | +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -91,7 +91,7 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`orthonormalized` **(** **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Basis` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** |const| | +| :ref:`Basis` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -109,8 +109,6 @@ Methods Operators --------- -+-------------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Basis` right **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------+ @@ -122,8 +120,6 @@ Operators +-------------------------------+-----------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`operator *` **(** :ref:`int` right **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------+-----------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Basis` right **)** | +-------------------------------+-----------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -228,9 +224,9 @@ Constructs a ``Basis`` as a copy of the given ``Basis``. ---- -- :ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` phi **)** +- :ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` angle **)** -Constructs a pure rotation basis matrix, rotated around the given ``axis`` by ``phi``, in radians. The axis must be a normalized vector. +Constructs a pure rotation basis matrix, rotated around the given ``axis`` by ``angle`` (in radians). The axis must be a normalized vector. ---- @@ -341,9 +337,9 @@ Returns the orthonormalized version of the matrix (useful to call from time to t .. _class_Basis_method_rotated: -- :ref:`Basis` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** |const| +- :ref:`Basis` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| -Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector. +Introduce an additional rotation around the given axis by ``angle`` (in radians). The axis must be a normalized vector. ---- @@ -398,10 +394,6 @@ Operator Descriptions .. _class_Basis_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Basis` right **)** Returns ``true`` if the ``Basis`` matrices are not equal. @@ -438,10 +430,6 @@ This operator multiplies all components of the ``Basis``, which scales it unifor .. _class_Basis_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Basis` right **)** Returns ``true`` if the ``Basis`` matrices are exactly equal. diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 59af847bc..0b9962f88 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -134,15 +134,11 @@ Constructors Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`bool` right **)** | +-------------------------+--------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`bool` right **)** | @@ -180,10 +176,6 @@ Operator Descriptions .. _class_bool_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`bool` right **)** Returns ``true`` if two bools are different, i.e. one is ``true`` and the other is ``false``. @@ -200,12 +192,6 @@ Returns ``true`` if the left operand is ``false`` and the right operand is ``tru .. _class_bool_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - -Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``false``. - ----- - - :ref:`bool` **operator ==** **(** :ref:`bool` right **)** Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``false``. diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 2fe88860c..c220c2e76 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -20,6 +20,11 @@ Description Arranges child :ref:`Control` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 8531e245a..711fe21ed 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -11,12 +11,14 @@ BoxShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Box shape resource. +Box shape resource for 3D collisions. Description ----------- -3D box shape that can be a child of a :ref:`PhysicsBody3D` or :ref:`Area3D`. +3D box shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. + +\ **Performance:** Being a primitive collision shape, ``BoxShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). Tutorials --------- diff --git a/classes/class_button.rst b/classes/class_button.rst index 60f788836..1818b26ca 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -130,7 +130,7 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``2`` | +| :ref:`int` | :ref:`h_separation` | ``2`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ @@ -228,7 +228,7 @@ Flat buttons don't display decoration. Button's icon, if text is present the icon will be placed before the text. -To edit margin and spacing of the icon, use :ref:`hseparation` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox`\ es. +To edit margin and spacing of the icon, use :ref:`h_separation` theme property and ``content_margin_*`` properties of the used :ref:`StyleBox`\ es. ---- @@ -478,9 +478,9 @@ Icon modulate :ref:`Color` used when the ``Button`` is being presse ---- -.. _class_Button_theme_constant_hseparation: +.. _class_Button_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``2`` | diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 70c7adf7d..c090f441e 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -96,13 +96,9 @@ Methods Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Callable` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Callable` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ @@ -247,10 +243,6 @@ Operator Descriptions .. _class_Callable_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Callable` right **)** Returns ``true`` if both ``Callable``\ s invoke different targets. @@ -259,10 +251,6 @@ Returns ``true`` if both ``Callable``\ s invoke different targets. .. _class_Callable_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Callable` right **)** Returns ``true`` if both ``Callable``\ s invoke the same custom target. diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 2e9c9e426..6275442ee 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -545,7 +545,7 @@ Speed in pixels per second of the camera's smoothing effect when :ref:`smoothing | *Getter* | get_zoom() | +-----------+-------------------+ -The camera's zoom relative to the viewport. Values larger than ``Vector2(1, 1)`` zoom out and smaller values zoom in. For an example, use ``Vector2(0.5, 0.5)`` for a 2× zoom-in, and ``Vector2(4, 4)`` for a 4× zoom-out. +The camera's zoom. A zoom of ``Vector(2, 2)`` doubles the size seen in the viewport. A zoom of ``Vector(0.5, 0.5)`` halves the size seen in the viewport. Method Descriptions ------------------- diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 60f563450..7d43d0aa6 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -363,7 +363,7 @@ The camera's projection mode. In :ref:`PROJECTION_PERSPECTIVE` locks on axis, ``size`` sets the other axis' size length. +The camera's size measured as 1/2 the width or height. Only applicable in orthogonal and frustum modes. Since :ref:`keep_aspect` locks on axis, ``size`` sets the other axis' size length. ---- @@ -478,7 +478,7 @@ Returns the 3D point in world space that maps to the given 2D coordinate in the - :ref:`Vector3` **project_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| -Returns a normal vector in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. +Returns a normal vector in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. ---- @@ -486,7 +486,7 @@ Returns a normal vector in world space, that is the result of projecting a point - :ref:`Vector3` **project_ray_origin** **(** :ref:`Vector2` screen_point **)** |const| -Returns a 3D position in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. +Returns a 3D position in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. ---- diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 566a879c2..8a098d28d 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -55,8 +55,6 @@ Properties +-----------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`show_behind_parent` | ``false`` | +-----------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`show_on_top` | | -+-----------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ | :ref:`TextureFilter` | :ref:`texture_filter` | ``0`` | +-----------------------------------------------------+---------------------------------------------------------------------------+-----------------------+ | :ref:`TextureRepeat` | :ref:`texture_repeat` | ``0`` | @@ -84,9 +82,11 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`float` dash=2.0 **)** | ++---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_end_animation` **(** **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0 **)** | +| void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -140,6 +140,8 @@ Methods +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_local_mouse_position` **(** **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | ++---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`get_transform` **(** **)** |const| | +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** |const| | @@ -276,6 +278,8 @@ Constants .. _class_CanvasItem_constant_NOTIFICATION_TRANSFORM_CHANGED: +.. _class_CanvasItem_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: + .. _class_CanvasItem_constant_NOTIFICATION_DRAW: .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -284,7 +288,9 @@ Constants .. _class_CanvasItem_constant_NOTIFICATION_EXIT_CANVAS: -- **NOTIFICATION_TRANSFORM_CHANGED** = **2000** --- The ``CanvasItem``'s transform has changed. This notification is only received if enabled by :ref:`set_notify_transform` or :ref:`set_notify_local_transform`. +- **NOTIFICATION_TRANSFORM_CHANGED** = **2000** --- The ``CanvasItem``'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. + +- **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = **35** --- The ``CanvasItem``'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. - **NOTIFICATION_DRAW** = **30** --- The ``CanvasItem`` is requested to draw. @@ -389,14 +395,6 @@ If ``true``, the object draws behind its parent. ---- -.. _class_CanvasItem_property_show_on_top: - -- :ref:`bool` **show_on_top** - -If ``true``, the object draws on top of its parent. - ----- - .. _class_CanvasItem_property_texture_filter: - :ref:`TextureFilter` **texture_filter** @@ -441,7 +439,7 @@ The texture repeating mode to use on this ``CanvasItem``. | *Getter* | is_set_as_top_level() | +-----------+-------------------------+ -If ``true``, the node will not inherit its transform from parent ``CanvasItem``\ s. +If ``true``, this ``CanvasItem`` will *not* inherit its transform from parent ``CanvasItem``\ s. Its draw order will also be changed to make it draw on top of other ``CanvasItem``\ s that do not have :ref:`top_level` set to ``true``. The ``CanvasItem`` will effectively act as if it was placed as a child of a bare :ref:`Node`. ---- @@ -516,7 +514,7 @@ Draws a string character using a custom font. Returns the advance, depending on - void **draw_circle** **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** -Draws a colored, unfilled circle. See also :ref:`draw_arc`, :ref:`draw_polyline` and :ref:`draw_polygon`. +Draws a colored, filled circle. See also :ref:`draw_arc`, :ref:`draw_polyline` and :ref:`draw_polygon`. ---- @@ -528,6 +526,14 @@ Draws a colored polygon of any amount of points, convex or concave. Unlike :ref: ---- +.. _class_CanvasItem_method_draw_dashed_line: + +- void **draw_dashed_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`float` dash=2.0 **)** + +Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_multiline` and :ref:`draw_polyline`. + +---- + .. _class_CanvasItem_method_draw_end_animation: - void **draw_end_animation** **(** **)** @@ -538,9 +544,9 @@ After submitting all animations slices via :ref:`draw_animation_slice` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0 **)** +- void **draw_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** -Draws a line from a 2D point to another, with a given color and width. See also :ref:`draw_multiline` and :ref:`draw_polyline`. +Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_multiline` and :ref:`draw_polyline`. ---- @@ -608,7 +614,7 @@ Draws a solid polygon of any amount of points, convex or concave. Unlike :ref:`d - void **draw_polyline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** -Draws interconnected line segments with a uniform ``color`` and ``width``. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline` instead. See also :ref:`draw_polygon`. ---- @@ -616,7 +622,7 @@ Draws interconnected line segments with a uniform ``color`` and ``width``. When - void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** -Draws interconnected line segments with a uniform ``width`` and segment-by-segment coloring. Colors assigned to line segments match by index between ``points`` and ``colors``. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline_colors` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``width`` and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between ``points`` and ``colors``. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline_colors` instead. See also :ref:`draw_polygon`. ---- @@ -785,6 +791,16 @@ Returns the mouse's position in this ``CanvasItem`` using the local coordinate s ---- +.. _class_CanvasItem_method_get_screen_transform: + +- :ref:`Transform2D` **get_screen_transform** **(** **)** |const| + +Returns the transform of this ``CanvasItem`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + +Equals to :ref:`get_global_transform` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). + +---- + .. _class_CanvasItem_method_get_transform: - :ref:`Transform2D` **get_transform** **(** **)** |const| @@ -869,7 +885,7 @@ Transformations issued by ``event``'s inputs are applied in local space instead - void **set_notify_local_transform** **(** :ref:`bool` enable **)** -If ``enable`` is ``true``, children will be updated with local transform data. +If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` when its local transform changes. ---- @@ -877,7 +893,7 @@ If ``enable`` is ``true``, children will be updated with local transform data. - void **set_notify_transform** **(** :ref:`bool` enable **)** -If ``enable`` is ``true``, children will be updated with global transform data. +If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_CHANGED` when its global transform changes. ---- diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 4c8529021..ded99ade3 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -11,12 +11,14 @@ CapsuleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Capsule shape for 2D collisions. +Capsule shape resource for 2D physics. Description ----------- -Capsule shape for 2D collisions. +2D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. In 2D, a capsule is a rectangle shape with half-circles at both ends. + +\ **Performance:** Being a primitive collision shape, ``CapsuleShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). Properties ---------- diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index 43e27320f..9c4b18d37 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -11,12 +11,14 @@ CapsuleShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Capsule shape for collisions. +Capsule shape resource for 3D collisions. Description ----------- -Capsule shape for collisions. +3D capsule shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. In 3D, a capsule is a cylinder shape with hemispheres at both ends. + +\ **Performance:** Being a primitive collision shape, ``CapsuleShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). ``CapsuleShape3D`` is cheaper to check collisions against compared to :ref:`CylinderShape3D`. Tutorials --------- diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index 0b0820c4a..568bc1bf8 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -18,6 +18,11 @@ Description CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index b9f9ffc67..1ac5baaad 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -359,7 +359,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` | *Getter* | get_up_direction() | +-----------+-------------------------+ -Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. Defaults to ``Vector2.UP``. If set to ``Vector2(0, 0)``, everything is considered a wall. This is useful for topdown games. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to ``Vector2.UP``. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. ---- diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index f5721e753..854193259 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -361,7 +361,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` | *Getter* | get_up_direction() | +-----------+-------------------------+ -Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. Defaults to ``Vector3.UP``. If set to ``Vector3(0, 0, 0)``, everything is considered a wall. This is useful for topdown games. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to ``Vector3.UP``. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. ---- diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index 61e02029f..5afc9f292 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -47,9 +47,9 @@ Theme Properties +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`check_vadjust` | ``0`` | +| :ref:`int` | :ref:`check_v_adjust` | ``0`` | +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | +| :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ @@ -173,9 +173,9 @@ The ``CheckBox`` text's font color when it's pressed. ---- -.. _class_CheckBox_theme_constant_check_vadjust: +.. _class_CheckBox_theme_constant_check_v_adjust: -- :ref:`int` **check_vadjust** +- :ref:`int` **check_v_adjust** +-----------+-------+ | *Default* | ``0`` | @@ -185,9 +185,9 @@ The vertical offset used when rendering the check icons (in pixels). ---- -.. _class_CheckBox_theme_constant_hseparation: +.. _class_CheckBox_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -237,7 +237,7 @@ The check icon to display when the ``CheckBox`` is checked. - :ref:`Texture2D` **checked_disabled** -The check icon to display when the ``CheckBox`` is checked and disabled. +The check icon to display when the ``CheckBox`` is checked and is disabled. ---- @@ -245,7 +245,7 @@ The check icon to display when the ``CheckBox`` is checked and disabled. - :ref:`Texture2D` **radio_checked** -If the ``CheckBox`` is configured as a radio button, the icon to display when the ``CheckBox`` is checked. +The check icon to display when the ``CheckBox`` is configured as a radio button and is checked. ---- @@ -253,13 +253,15 @@ If the ``CheckBox`` is configured as a radio button, the icon to display when th - :ref:`Texture2D` **radio_checked_disabled** +The check icon to display when the ``CheckBox`` is configured as a radio button, is disabled, and is unchecked. + ---- .. _class_CheckBox_theme_icon_radio_unchecked: - :ref:`Texture2D` **radio_unchecked** -If the ``CheckBox`` is configured as a radio button, the icon to display when the ``CheckBox`` is unchecked. +The check icon to display when the ``CheckBox`` is configured as a radio button and is unchecked. ---- @@ -267,6 +269,8 @@ If the ``CheckBox`` is configured as a radio button, the icon to display when th - :ref:`Texture2D` **radio_unchecked_disabled** +The check icon to display when the ``CheckBox`` is configured as a radio button, is disabled, and is unchecked. + ---- .. _class_CheckBox_theme_icon_unchecked: @@ -281,7 +285,7 @@ The check icon to display when the ``CheckBox`` is unchecked. - :ref:`Texture2D` **unchecked_disabled** -The check icon to display when the ``CheckBox`` is unchecked and disabled. +The check icon to display when the ``CheckBox`` is unchecked and is disabled. ---- diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index edf67c031..530966fb1 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -47,9 +47,9 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`check_vadjust` | ``0`` | +| :ref:`int` | :ref:`check_v_adjust` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | +| :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ @@ -173,9 +173,9 @@ The ``CheckButton`` text's font color when it's pressed. ---- -.. _class_CheckButton_theme_constant_check_vadjust: +.. _class_CheckButton_theme_constant_check_v_adjust: -- :ref:`int` **check_vadjust** +- :ref:`int` **check_v_adjust** +-----------+-------+ | *Default* | ``0`` | @@ -185,9 +185,9 @@ The vertical offset used when rendering the toggle icons (in pixels). ---- -.. _class_CheckButton_theme_constant_hseparation: +.. _class_CheckButton_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index e56aacad3..558454174 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -11,12 +11,14 @@ CircleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Circular shape for 2D collisions. +Circular shape resource for 2D physics. Description ----------- -Circular shape for 2D collisions. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. +2D circular shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling balls or small characters and its collision detection with everything else is very fast. + +\ **Performance:** Being a primitive collision shape, ``CircleShape2D`` is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. Properties ---------- diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 904c03a62..884ab31f3 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -26,8 +26,6 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`class_exists` **(** :ref:`StringName` class **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StringName` | :ref:`class_get_category` **(** :ref:`StringName` class **)** |const| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`class_get_enum_constants` **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`class_get_enum_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | @@ -90,14 +88,6 @@ Returns whether the specified ``class`` is available or not. ---- -.. _class_ClassDB_method_class_get_category: - -- :ref:`StringName` **class_get_category** **(** :ref:`StringName` class **)** |const| - -Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required. - ----- - .. _class_ClassDB_method_class_get_enum_constants: - :ref:`PackedStringArray` **class_get_enum_constants** **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 500b92004..069e6509c 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -52,7 +52,7 @@ Properties +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`indent_automatic` | ``false`` | +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`String[]` | :ref:`indent_automatic_prefixes` | ``["(", ":", "[", "{"]`` | +| :ref:`String[]` | :ref:`indent_automatic_prefixes` | ``[":", "{", "[", "("]`` | +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`indent_size` | ``4`` | +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -597,7 +597,7 @@ Sets whether automatic indent are enabled, this will add an extra indent if a pr - :ref:`String[]` **indent_automatic_prefixes** +-----------+---------------------------------+ -| *Default* | ``["(", ":", "[", "{"]`` | +| *Default* | ``[":", "{", "[", "("]`` | +-----------+---------------------------------+ | *Setter* | set_auto_indent_prefixes(value) | +-----------+---------------------------------+ diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index f7db29568..d1074523f 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -20,6 +20,8 @@ Description CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision :ref:`Shape2D`\ s. Each shape must be assigned to a *shape owner*. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the ``shape_owner_*`` methods. +\ **Note:** Only collisions between objects within the same canvas (:ref:`Viewport` canvas or :ref:`CanvasLayer`) are supported. The behavior of collisions between objects in different canvases is undefined. + Properties ---------- diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 9b20faa5a..aed38e588 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -16,7 +16,9 @@ Defines a 2D collision polygon. Description ----------- -Provides a 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. +Provides a concave or convex 2D collision polygon to a :ref:`CollisionObject2D` parent. Polygons can be drawn in the editor or specified by a list of vertices. See also :ref:`ConvexPolygonShape2D`. + +In the editor, a ``CollisionPolygon2D`` can be generated from a :ref:`Sprite2D`'s outline by selecting a :ref:`Sprite2D` node, going to the **Sprite2D** menu at the top of the 2D editor viewport then choosing **Create CollisionPolygon2D Sibling**. Properties ---------- @@ -97,6 +99,8 @@ If ``true``, no collisions will be detected. If ``true``, only edges that face up, relative to ``CollisionPolygon2D``'s rotation, will collide with other objects. +\ **Note:** This property has no effect if this ``CollisionPolygon2D`` is a child of an :ref:`Area2D` node. + ---- .. _class_CollisionPolygon2D_property_one_way_collision_margin: diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 566efa70b..817dc8c37 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -11,12 +11,14 @@ CollisionPolygon3D **Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -Editor-only class for defining a collision polygon in 3D space. +Editor-only node for defining a collision polygon in 3D space. Description ----------- -Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a :ref:`Shape3D` for gameplay. Properties modified during gameplay will have no effect. +Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several :ref:`ConvexPolygonShape3D`\ s at run-time to represent the original polygon using convex decomposition. + +\ **Note:** Since this is an editor-only helper, properties modified during gameplay will have no effect. Properties ---------- diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index c6d0f8417..65934f3f2 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -75,6 +75,8 @@ A disabled collision shape has no effect in the world. This property should be c Sets whether this collision shape should only detect collision on one side (top or bottom). +\ **Note:** This property has no effect if this ``CollisionShape2D`` is a child of an :ref:`Area2D` node. + ---- .. _class_CollisionShape2D_property_one_way_collision_margin: diff --git a/classes/class_color.rst b/classes/class_color.rst index 93b59ff2a..ec27789cd 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -82,65 +82,69 @@ Constructors Methods ------- -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`blend` **(** :ref:`Color` over **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`clamp` **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`darkened` **(** :ref:`float` amount **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find_named_color` **(** :ref:`String` name **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`from_hsv` **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`from_rgbe9995` **(** :ref:`int` rgbe **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`from_string` **(** :ref:`String` str, :ref:`Color` default **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_luminance` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_named_color` **(** :ref:`int` idx **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_named_color_count` **(** **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_named_color_name` **(** :ref:`int` idx **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`hex` **(** :ref:`int` hex **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`hex64` **(** :ref:`int` hex **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`html` **(** :ref:`String` rgba **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`html_is_valid` **(** :ref:`String` color **)** |static| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`inverted` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Color` to **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`lerp` **(** :ref:`Color` to, :ref:`float` weight **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`lightened` **(** :ref:`float` amount **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_abgr32` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_abgr64` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_argb32` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_argb64` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_html` **(** :ref:`bool` with_alpha=true **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_rgba32` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_rgba64` **(** **)** |const| | -+-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`blend` **(** :ref:`Color` over **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`clamp` **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`darkened` **(** :ref:`float` amount **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find_named_color` **(** :ref:`String` name **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`from_hsv` **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`from_ok_hsl` **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`from_rgbe9995` **(** :ref:`int` rgbe **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`from_string` **(** :ref:`String` str, :ref:`Color` default **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_luminance` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_named_color` **(** :ref:`int` idx **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_named_color_count` **(** **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_named_color_name` **(** :ref:`int` idx **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`hex` **(** :ref:`int` hex **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`hex64` **(** :ref:`int` hex **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`html` **(** :ref:`String` rgba **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`html_is_valid` **(** :ref:`String` color **)** |static| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`inverted` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Color` to **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`lerp` **(** :ref:`Color` to, :ref:`float` weight **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`lightened` **(** :ref:`float` amount **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`linear_to_srgb` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`srgb_to_linear` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_abgr32` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_abgr64` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_argb32` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_argb64` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_html` **(** :ref:`bool` with_alpha=true **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_rgba32` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_rgba64` **(** **)** |const| | ++-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Color` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ @@ -160,8 +164,6 @@ Operators +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`operator /` **(** :ref:`int` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Color` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -466,297 +468,297 @@ Constants .. _class_Color_constant_YELLOW_GREEN: -- **ALICE_BLUE** = **Color(0.94, 0.97, 1, 1)** --- Alice blue color. +- **ALICE_BLUE** = **Color(0.941176, 0.972549, 1, 1)** --- Alice blue color. -- **ANTIQUE_WHITE** = **Color(0.98, 0.92, 0.84, 1)** --- Antique white color. +- **ANTIQUE_WHITE** = **Color(0.980392, 0.921569, 0.843137, 1)** --- Antique white color. - **AQUA** = **Color(0, 1, 1, 1)** --- Aqua color. -- **AQUAMARINE** = **Color(0.5, 1, 0.83, 1)** --- Aquamarine color. +- **AQUAMARINE** = **Color(0.498039, 1, 0.831373, 1)** --- Aquamarine color. -- **AZURE** = **Color(0.94, 1, 1, 1)** --- Azure color. +- **AZURE** = **Color(0.941176, 1, 1, 1)** --- Azure color. -- **BEIGE** = **Color(0.96, 0.96, 0.86, 1)** --- Beige color. +- **BEIGE** = **Color(0.960784, 0.960784, 0.862745, 1)** --- Beige color. -- **BISQUE** = **Color(1, 0.89, 0.77, 1)** --- Bisque color. +- **BISQUE** = **Color(1, 0.894118, 0.768627, 1)** --- Bisque color. - **BLACK** = **Color(0, 0, 0, 1)** --- Black color. -- **BLANCHED_ALMOND** = **Color(1, 0.92, 0.8, 1)** --- Blanched almond color. +- **BLANCHED_ALMOND** = **Color(1, 0.921569, 0.803922, 1)** --- Blanched almond color. - **BLUE** = **Color(0, 0, 1, 1)** --- Blue color. -- **BLUE_VIOLET** = **Color(0.54, 0.17, 0.89, 1)** --- Blue violet color. +- **BLUE_VIOLET** = **Color(0.541176, 0.168627, 0.886275, 1)** --- Blue violet color. -- **BROWN** = **Color(0.65, 0.16, 0.16, 1)** --- Brown color. +- **BROWN** = **Color(0.647059, 0.164706, 0.164706, 1)** --- Brown color. -- **BURLYWOOD** = **Color(0.87, 0.72, 0.53, 1)** --- Burlywood color. +- **BURLYWOOD** = **Color(0.870588, 0.721569, 0.529412, 1)** --- Burlywood color. -- **CADET_BLUE** = **Color(0.37, 0.62, 0.63, 1)** --- Cadet blue color. +- **CADET_BLUE** = **Color(0.372549, 0.619608, 0.627451, 1)** --- Cadet blue color. -- **CHARTREUSE** = **Color(0.5, 1, 0, 1)** --- Chartreuse color. +- **CHARTREUSE** = **Color(0.498039, 1, 0, 1)** --- Chartreuse color. -- **CHOCOLATE** = **Color(0.82, 0.41, 0.12, 1)** --- Chocolate color. +- **CHOCOLATE** = **Color(0.823529, 0.411765, 0.117647, 1)** --- Chocolate color. -- **CORAL** = **Color(1, 0.5, 0.31, 1)** --- Coral color. +- **CORAL** = **Color(1, 0.498039, 0.313726, 1)** --- Coral color. -- **CORNFLOWER_BLUE** = **Color(0.39, 0.58, 0.93, 1)** --- Cornflower blue color. +- **CORNFLOWER_BLUE** = **Color(0.392157, 0.584314, 0.929412, 1)** --- Cornflower blue color. -- **CORNSILK** = **Color(1, 0.97, 0.86, 1)** --- Cornsilk color. +- **CORNSILK** = **Color(1, 0.972549, 0.862745, 1)** --- Cornsilk color. -- **CRIMSON** = **Color(0.86, 0.08, 0.24, 1)** --- Crimson color. +- **CRIMSON** = **Color(0.862745, 0.0784314, 0.235294, 1)** --- Crimson color. - **CYAN** = **Color(0, 1, 1, 1)** --- Cyan color. -- **DARK_BLUE** = **Color(0, 0, 0.55, 1)** --- Dark blue color. +- **DARK_BLUE** = **Color(0, 0, 0.545098, 1)** --- Dark blue color. -- **DARK_CYAN** = **Color(0, 0.55, 0.55, 1)** --- Dark cyan color. +- **DARK_CYAN** = **Color(0, 0.545098, 0.545098, 1)** --- Dark cyan color. -- **DARK_GOLDENROD** = **Color(0.72, 0.53, 0.04, 1)** --- Dark goldenrod color. +- **DARK_GOLDENROD** = **Color(0.721569, 0.52549, 0.0431373, 1)** --- Dark goldenrod color. -- **DARK_GRAY** = **Color(0.66, 0.66, 0.66, 1)** --- Dark gray color. +- **DARK_GRAY** = **Color(0.662745, 0.662745, 0.662745, 1)** --- Dark gray color. -- **DARK_GREEN** = **Color(0, 0.39, 0, 1)** --- Dark green color. +- **DARK_GREEN** = **Color(0, 0.392157, 0, 1)** --- Dark green color. -- **DARK_KHAKI** = **Color(0.74, 0.72, 0.42, 1)** --- Dark khaki color. +- **DARK_KHAKI** = **Color(0.741176, 0.717647, 0.419608, 1)** --- Dark khaki color. -- **DARK_MAGENTA** = **Color(0.55, 0, 0.55, 1)** --- Dark magenta color. +- **DARK_MAGENTA** = **Color(0.545098, 0, 0.545098, 1)** --- Dark magenta color. -- **DARK_OLIVE_GREEN** = **Color(0.33, 0.42, 0.18, 1)** --- Dark olive green color. +- **DARK_OLIVE_GREEN** = **Color(0.333333, 0.419608, 0.184314, 1)** --- Dark olive green color. -- **DARK_ORANGE** = **Color(1, 0.55, 0, 1)** --- Dark orange color. +- **DARK_ORANGE** = **Color(1, 0.54902, 0, 1)** --- Dark orange color. -- **DARK_ORCHID** = **Color(0.6, 0.2, 0.8, 1)** --- Dark orchid color. +- **DARK_ORCHID** = **Color(0.6, 0.196078, 0.8, 1)** --- Dark orchid color. -- **DARK_RED** = **Color(0.55, 0, 0, 1)** --- Dark red color. +- **DARK_RED** = **Color(0.545098, 0, 0, 1)** --- Dark red color. -- **DARK_SALMON** = **Color(0.91, 0.59, 0.48, 1)** --- Dark salmon color. +- **DARK_SALMON** = **Color(0.913725, 0.588235, 0.478431, 1)** --- Dark salmon color. -- **DARK_SEA_GREEN** = **Color(0.56, 0.74, 0.56, 1)** --- Dark sea green color. +- **DARK_SEA_GREEN** = **Color(0.560784, 0.737255, 0.560784, 1)** --- Dark sea green color. -- **DARK_SLATE_BLUE** = **Color(0.28, 0.24, 0.55, 1)** --- Dark slate blue color. +- **DARK_SLATE_BLUE** = **Color(0.282353, 0.239216, 0.545098, 1)** --- Dark slate blue color. -- **DARK_SLATE_GRAY** = **Color(0.18, 0.31, 0.31, 1)** --- Dark slate gray color. +- **DARK_SLATE_GRAY** = **Color(0.184314, 0.309804, 0.309804, 1)** --- Dark slate gray color. -- **DARK_TURQUOISE** = **Color(0, 0.81, 0.82, 1)** --- Dark turquoise color. +- **DARK_TURQUOISE** = **Color(0, 0.807843, 0.819608, 1)** --- Dark turquoise color. -- **DARK_VIOLET** = **Color(0.58, 0, 0.83, 1)** --- Dark violet color. +- **DARK_VIOLET** = **Color(0.580392, 0, 0.827451, 1)** --- Dark violet color. -- **DEEP_PINK** = **Color(1, 0.08, 0.58, 1)** --- Deep pink color. +- **DEEP_PINK** = **Color(1, 0.0784314, 0.576471, 1)** --- Deep pink color. -- **DEEP_SKY_BLUE** = **Color(0, 0.75, 1, 1)** --- Deep sky blue color. +- **DEEP_SKY_BLUE** = **Color(0, 0.74902, 1, 1)** --- Deep sky blue color. -- **DIM_GRAY** = **Color(0.41, 0.41, 0.41, 1)** --- Dim gray color. +- **DIM_GRAY** = **Color(0.411765, 0.411765, 0.411765, 1)** --- Dim gray color. -- **DODGER_BLUE** = **Color(0.12, 0.56, 1, 1)** --- Dodger blue color. +- **DODGER_BLUE** = **Color(0.117647, 0.564706, 1, 1)** --- Dodger blue color. -- **FIREBRICK** = **Color(0.7, 0.13, 0.13, 1)** --- Firebrick color. +- **FIREBRICK** = **Color(0.698039, 0.133333, 0.133333, 1)** --- Firebrick color. -- **FLORAL_WHITE** = **Color(1, 0.98, 0.94, 1)** --- Floral white color. +- **FLORAL_WHITE** = **Color(1, 0.980392, 0.941176, 1)** --- Floral white color. -- **FOREST_GREEN** = **Color(0.13, 0.55, 0.13, 1)** --- Forest green color. +- **FOREST_GREEN** = **Color(0.133333, 0.545098, 0.133333, 1)** --- Forest green color. - **FUCHSIA** = **Color(1, 0, 1, 1)** --- Fuchsia color. -- **GAINSBORO** = **Color(0.86, 0.86, 0.86, 1)** --- Gainsboro color. +- **GAINSBORO** = **Color(0.862745, 0.862745, 0.862745, 1)** --- Gainsboro color. -- **GHOST_WHITE** = **Color(0.97, 0.97, 1, 1)** --- Ghost white color. +- **GHOST_WHITE** = **Color(0.972549, 0.972549, 1, 1)** --- Ghost white color. -- **GOLD** = **Color(1, 0.84, 0, 1)** --- Gold color. +- **GOLD** = **Color(1, 0.843137, 0, 1)** --- Gold color. -- **GOLDENROD** = **Color(0.85, 0.65, 0.13, 1)** --- Goldenrod color. +- **GOLDENROD** = **Color(0.854902, 0.647059, 0.12549, 1)** --- Goldenrod color. -- **GRAY** = **Color(0.75, 0.75, 0.75, 1)** --- Gray color. +- **GRAY** = **Color(0.745098, 0.745098, 0.745098, 1)** --- Gray color. - **GREEN** = **Color(0, 1, 0, 1)** --- Green color. -- **GREEN_YELLOW** = **Color(0.68, 1, 0.18, 1)** --- Green yellow color. +- **GREEN_YELLOW** = **Color(0.678431, 1, 0.184314, 1)** --- Green yellow color. -- **HONEYDEW** = **Color(0.94, 1, 0.94, 1)** --- Honeydew color. +- **HONEYDEW** = **Color(0.941176, 1, 0.941176, 1)** --- Honeydew color. -- **HOT_PINK** = **Color(1, 0.41, 0.71, 1)** --- Hot pink color. +- **HOT_PINK** = **Color(1, 0.411765, 0.705882, 1)** --- Hot pink color. -- **INDIAN_RED** = **Color(0.8, 0.36, 0.36, 1)** --- Indian red color. +- **INDIAN_RED** = **Color(0.803922, 0.360784, 0.360784, 1)** --- Indian red color. -- **INDIGO** = **Color(0.29, 0, 0.51, 1)** --- Indigo color. +- **INDIGO** = **Color(0.294118, 0, 0.509804, 1)** --- Indigo color. -- **IVORY** = **Color(1, 1, 0.94, 1)** --- Ivory color. +- **IVORY** = **Color(1, 1, 0.941176, 1)** --- Ivory color. -- **KHAKI** = **Color(0.94, 0.9, 0.55, 1)** --- Khaki color. +- **KHAKI** = **Color(0.941176, 0.901961, 0.54902, 1)** --- Khaki color. -- **LAVENDER** = **Color(0.9, 0.9, 0.98, 1)** --- Lavender color. +- **LAVENDER** = **Color(0.901961, 0.901961, 0.980392, 1)** --- Lavender color. -- **LAVENDER_BLUSH** = **Color(1, 0.94, 0.96, 1)** --- Lavender blush color. +- **LAVENDER_BLUSH** = **Color(1, 0.941176, 0.960784, 1)** --- Lavender blush color. -- **LAWN_GREEN** = **Color(0.49, 0.99, 0, 1)** --- Lawn green color. +- **LAWN_GREEN** = **Color(0.486275, 0.988235, 0, 1)** --- Lawn green color. -- **LEMON_CHIFFON** = **Color(1, 0.98, 0.8, 1)** --- Lemon chiffon color. +- **LEMON_CHIFFON** = **Color(1, 0.980392, 0.803922, 1)** --- Lemon chiffon color. -- **LIGHT_BLUE** = **Color(0.68, 0.85, 0.9, 1)** --- Light blue color. +- **LIGHT_BLUE** = **Color(0.678431, 0.847059, 0.901961, 1)** --- Light blue color. -- **LIGHT_CORAL** = **Color(0.94, 0.5, 0.5, 1)** --- Light coral color. +- **LIGHT_CORAL** = **Color(0.941176, 0.501961, 0.501961, 1)** --- Light coral color. -- **LIGHT_CYAN** = **Color(0.88, 1, 1, 1)** --- Light cyan color. +- **LIGHT_CYAN** = **Color(0.878431, 1, 1, 1)** --- Light cyan color. -- **LIGHT_GOLDENROD** = **Color(0.98, 0.98, 0.82, 1)** --- Light goldenrod color. +- **LIGHT_GOLDENROD** = **Color(0.980392, 0.980392, 0.823529, 1)** --- Light goldenrod color. -- **LIGHT_GRAY** = **Color(0.83, 0.83, 0.83, 1)** --- Light gray color. +- **LIGHT_GRAY** = **Color(0.827451, 0.827451, 0.827451, 1)** --- Light gray color. -- **LIGHT_GREEN** = **Color(0.56, 0.93, 0.56, 1)** --- Light green color. +- **LIGHT_GREEN** = **Color(0.564706, 0.933333, 0.564706, 1)** --- Light green color. -- **LIGHT_PINK** = **Color(1, 0.71, 0.76, 1)** --- Light pink color. +- **LIGHT_PINK** = **Color(1, 0.713726, 0.756863, 1)** --- Light pink color. -- **LIGHT_SALMON** = **Color(1, 0.63, 0.48, 1)** --- Light salmon color. +- **LIGHT_SALMON** = **Color(1, 0.627451, 0.478431, 1)** --- Light salmon color. -- **LIGHT_SEA_GREEN** = **Color(0.13, 0.7, 0.67, 1)** --- Light sea green color. +- **LIGHT_SEA_GREEN** = **Color(0.12549, 0.698039, 0.666667, 1)** --- Light sea green color. -- **LIGHT_SKY_BLUE** = **Color(0.53, 0.81, 0.98, 1)** --- Light sky blue color. +- **LIGHT_SKY_BLUE** = **Color(0.529412, 0.807843, 0.980392, 1)** --- Light sky blue color. -- **LIGHT_SLATE_GRAY** = **Color(0.47, 0.53, 0.6, 1)** --- Light slate gray color. +- **LIGHT_SLATE_GRAY** = **Color(0.466667, 0.533333, 0.6, 1)** --- Light slate gray color. -- **LIGHT_STEEL_BLUE** = **Color(0.69, 0.77, 0.87, 1)** --- Light steel blue color. +- **LIGHT_STEEL_BLUE** = **Color(0.690196, 0.768627, 0.870588, 1)** --- Light steel blue color. -- **LIGHT_YELLOW** = **Color(1, 1, 0.88, 1)** --- Light yellow color. +- **LIGHT_YELLOW** = **Color(1, 1, 0.878431, 1)** --- Light yellow color. - **LIME** = **Color(0, 1, 0, 1)** --- Lime color. -- **LIME_GREEN** = **Color(0.2, 0.8, 0.2, 1)** --- Lime green color. +- **LIME_GREEN** = **Color(0.196078, 0.803922, 0.196078, 1)** --- Lime green color. -- **LINEN** = **Color(0.98, 0.94, 0.9, 1)** --- Linen color. +- **LINEN** = **Color(0.980392, 0.941176, 0.901961, 1)** --- Linen color. - **MAGENTA** = **Color(1, 0, 1, 1)** --- Magenta color. -- **MAROON** = **Color(0.69, 0.19, 0.38, 1)** --- Maroon color. +- **MAROON** = **Color(0.690196, 0.188235, 0.376471, 1)** --- Maroon color. -- **MEDIUM_AQUAMARINE** = **Color(0.4, 0.8, 0.67, 1)** --- Medium aquamarine color. +- **MEDIUM_AQUAMARINE** = **Color(0.4, 0.803922, 0.666667, 1)** --- Medium aquamarine color. -- **MEDIUM_BLUE** = **Color(0, 0, 0.8, 1)** --- Medium blue color. +- **MEDIUM_BLUE** = **Color(0, 0, 0.803922, 1)** --- Medium blue color. -- **MEDIUM_ORCHID** = **Color(0.73, 0.33, 0.83, 1)** --- Medium orchid color. +- **MEDIUM_ORCHID** = **Color(0.729412, 0.333333, 0.827451, 1)** --- Medium orchid color. -- **MEDIUM_PURPLE** = **Color(0.58, 0.44, 0.86, 1)** --- Medium purple color. +- **MEDIUM_PURPLE** = **Color(0.576471, 0.439216, 0.858824, 1)** --- Medium purple color. -- **MEDIUM_SEA_GREEN** = **Color(0.24, 0.7, 0.44, 1)** --- Medium sea green color. +- **MEDIUM_SEA_GREEN** = **Color(0.235294, 0.701961, 0.443137, 1)** --- Medium sea green color. -- **MEDIUM_SLATE_BLUE** = **Color(0.48, 0.41, 0.93, 1)** --- Medium slate blue color. +- **MEDIUM_SLATE_BLUE** = **Color(0.482353, 0.407843, 0.933333, 1)** --- Medium slate blue color. -- **MEDIUM_SPRING_GREEN** = **Color(0, 0.98, 0.6, 1)** --- Medium spring green color. +- **MEDIUM_SPRING_GREEN** = **Color(0, 0.980392, 0.603922, 1)** --- Medium spring green color. -- **MEDIUM_TURQUOISE** = **Color(0.28, 0.82, 0.8, 1)** --- Medium turquoise color. +- **MEDIUM_TURQUOISE** = **Color(0.282353, 0.819608, 0.8, 1)** --- Medium turquoise color. -- **MEDIUM_VIOLET_RED** = **Color(0.78, 0.08, 0.52, 1)** --- Medium violet red color. +- **MEDIUM_VIOLET_RED** = **Color(0.780392, 0.0823529, 0.521569, 1)** --- Medium violet red color. -- **MIDNIGHT_BLUE** = **Color(0.1, 0.1, 0.44, 1)** --- Midnight blue color. +- **MIDNIGHT_BLUE** = **Color(0.0980392, 0.0980392, 0.439216, 1)** --- Midnight blue color. -- **MINT_CREAM** = **Color(0.96, 1, 0.98, 1)** --- Mint cream color. +- **MINT_CREAM** = **Color(0.960784, 1, 0.980392, 1)** --- Mint cream color. -- **MISTY_ROSE** = **Color(1, 0.89, 0.88, 1)** --- Misty rose color. +- **MISTY_ROSE** = **Color(1, 0.894118, 0.882353, 1)** --- Misty rose color. -- **MOCCASIN** = **Color(1, 0.89, 0.71, 1)** --- Moccasin color. +- **MOCCASIN** = **Color(1, 0.894118, 0.709804, 1)** --- Moccasin color. -- **NAVAJO_WHITE** = **Color(1, 0.87, 0.68, 1)** --- Navajo white color. +- **NAVAJO_WHITE** = **Color(1, 0.870588, 0.678431, 1)** --- Navajo white color. -- **NAVY_BLUE** = **Color(0, 0, 0.5, 1)** --- Navy blue color. +- **NAVY_BLUE** = **Color(0, 0, 0.501961, 1)** --- Navy blue color. -- **OLD_LACE** = **Color(0.99, 0.96, 0.9, 1)** --- Old lace color. +- **OLD_LACE** = **Color(0.992157, 0.960784, 0.901961, 1)** --- Old lace color. -- **OLIVE** = **Color(0.5, 0.5, 0, 1)** --- Olive color. +- **OLIVE** = **Color(0.501961, 0.501961, 0, 1)** --- Olive color. -- **OLIVE_DRAB** = **Color(0.42, 0.56, 0.14, 1)** --- Olive drab color. +- **OLIVE_DRAB** = **Color(0.419608, 0.556863, 0.137255, 1)** --- Olive drab color. -- **ORANGE** = **Color(1, 0.65, 0, 1)** --- Orange color. +- **ORANGE** = **Color(1, 0.647059, 0, 1)** --- Orange color. -- **ORANGE_RED** = **Color(1, 0.27, 0, 1)** --- Orange red color. +- **ORANGE_RED** = **Color(1, 0.270588, 0, 1)** --- Orange red color. -- **ORCHID** = **Color(0.85, 0.44, 0.84, 1)** --- Orchid color. +- **ORCHID** = **Color(0.854902, 0.439216, 0.839216, 1)** --- Orchid color. -- **PALE_GOLDENROD** = **Color(0.93, 0.91, 0.67, 1)** --- Pale goldenrod color. +- **PALE_GOLDENROD** = **Color(0.933333, 0.909804, 0.666667, 1)** --- Pale goldenrod color. -- **PALE_GREEN** = **Color(0.6, 0.98, 0.6, 1)** --- Pale green color. +- **PALE_GREEN** = **Color(0.596078, 0.984314, 0.596078, 1)** --- Pale green color. -- **PALE_TURQUOISE** = **Color(0.69, 0.93, 0.93, 1)** --- Pale turquoise color. +- **PALE_TURQUOISE** = **Color(0.686275, 0.933333, 0.933333, 1)** --- Pale turquoise color. -- **PALE_VIOLET_RED** = **Color(0.86, 0.44, 0.58, 1)** --- Pale violet red color. +- **PALE_VIOLET_RED** = **Color(0.858824, 0.439216, 0.576471, 1)** --- Pale violet red color. -- **PAPAYA_WHIP** = **Color(1, 0.94, 0.84, 1)** --- Papaya whip color. +- **PAPAYA_WHIP** = **Color(1, 0.937255, 0.835294, 1)** --- Papaya whip color. -- **PEACH_PUFF** = **Color(1, 0.85, 0.73, 1)** --- Peach puff color. +- **PEACH_PUFF** = **Color(1, 0.854902, 0.72549, 1)** --- Peach puff color. -- **PERU** = **Color(0.8, 0.52, 0.25, 1)** --- Peru color. +- **PERU** = **Color(0.803922, 0.521569, 0.247059, 1)** --- Peru color. -- **PINK** = **Color(1, 0.75, 0.8, 1)** --- Pink color. +- **PINK** = **Color(1, 0.752941, 0.796078, 1)** --- Pink color. -- **PLUM** = **Color(0.87, 0.63, 0.87, 1)** --- Plum color. +- **PLUM** = **Color(0.866667, 0.627451, 0.866667, 1)** --- Plum color. -- **POWDER_BLUE** = **Color(0.69, 0.88, 0.9, 1)** --- Powder blue color. +- **POWDER_BLUE** = **Color(0.690196, 0.878431, 0.901961, 1)** --- Powder blue color. -- **PURPLE** = **Color(0.63, 0.13, 0.94, 1)** --- Purple color. +- **PURPLE** = **Color(0.627451, 0.12549, 0.941176, 1)** --- Purple color. - **REBECCA_PURPLE** = **Color(0.4, 0.2, 0.6, 1)** --- Rebecca purple color. - **RED** = **Color(1, 0, 0, 1)** --- Red color. -- **ROSY_BROWN** = **Color(0.74, 0.56, 0.56, 1)** --- Rosy brown color. +- **ROSY_BROWN** = **Color(0.737255, 0.560784, 0.560784, 1)** --- Rosy brown color. -- **ROYAL_BLUE** = **Color(0.25, 0.41, 0.88, 1)** --- Royal blue color. +- **ROYAL_BLUE** = **Color(0.254902, 0.411765, 0.882353, 1)** --- Royal blue color. -- **SADDLE_BROWN** = **Color(0.55, 0.27, 0.07, 1)** --- Saddle brown color. +- **SADDLE_BROWN** = **Color(0.545098, 0.270588, 0.0745098, 1)** --- Saddle brown color. -- **SALMON** = **Color(0.98, 0.5, 0.45, 1)** --- Salmon color. +- **SALMON** = **Color(0.980392, 0.501961, 0.447059, 1)** --- Salmon color. -- **SANDY_BROWN** = **Color(0.96, 0.64, 0.38, 1)** --- Sandy brown color. +- **SANDY_BROWN** = **Color(0.956863, 0.643137, 0.376471, 1)** --- Sandy brown color. -- **SEA_GREEN** = **Color(0.18, 0.55, 0.34, 1)** --- Sea green color. +- **SEA_GREEN** = **Color(0.180392, 0.545098, 0.341176, 1)** --- Sea green color. -- **SEASHELL** = **Color(1, 0.96, 0.93, 1)** --- Seashell color. +- **SEASHELL** = **Color(1, 0.960784, 0.933333, 1)** --- Seashell color. -- **SIENNA** = **Color(0.63, 0.32, 0.18, 1)** --- Sienna color. +- **SIENNA** = **Color(0.627451, 0.321569, 0.176471, 1)** --- Sienna color. -- **SILVER** = **Color(0.75, 0.75, 0.75, 1)** --- Silver color. +- **SILVER** = **Color(0.752941, 0.752941, 0.752941, 1)** --- Silver color. -- **SKY_BLUE** = **Color(0.53, 0.81, 0.92, 1)** --- Sky blue color. +- **SKY_BLUE** = **Color(0.529412, 0.807843, 0.921569, 1)** --- Sky blue color. -- **SLATE_BLUE** = **Color(0.42, 0.35, 0.8, 1)** --- Slate blue color. +- **SLATE_BLUE** = **Color(0.415686, 0.352941, 0.803922, 1)** --- Slate blue color. -- **SLATE_GRAY** = **Color(0.44, 0.5, 0.56, 1)** --- Slate gray color. +- **SLATE_GRAY** = **Color(0.439216, 0.501961, 0.564706, 1)** --- Slate gray color. -- **SNOW** = **Color(1, 0.98, 0.98, 1)** --- Snow color. +- **SNOW** = **Color(1, 0.980392, 0.980392, 1)** --- Snow color. -- **SPRING_GREEN** = **Color(0, 1, 0.5, 1)** --- Spring green color. +- **SPRING_GREEN** = **Color(0, 1, 0.498039, 1)** --- Spring green color. -- **STEEL_BLUE** = **Color(0.27, 0.51, 0.71, 1)** --- Steel blue color. +- **STEEL_BLUE** = **Color(0.27451, 0.509804, 0.705882, 1)** --- Steel blue color. -- **TAN** = **Color(0.82, 0.71, 0.55, 1)** --- Tan color. +- **TAN** = **Color(0.823529, 0.705882, 0.54902, 1)** --- Tan color. -- **TEAL** = **Color(0, 0.5, 0.5, 1)** --- Teal color. +- **TEAL** = **Color(0, 0.501961, 0.501961, 1)** --- Teal color. -- **THISTLE** = **Color(0.85, 0.75, 0.85, 1)** --- Thistle color. +- **THISTLE** = **Color(0.847059, 0.74902, 0.847059, 1)** --- Thistle color. -- **TOMATO** = **Color(1, 0.39, 0.28, 1)** --- Tomato color. +- **TOMATO** = **Color(1, 0.388235, 0.278431, 1)** --- Tomato color. - **TRANSPARENT** = **Color(1, 1, 1, 0)** --- Transparent color (white with zero alpha). -- **TURQUOISE** = **Color(0.25, 0.88, 0.82, 1)** --- Turquoise color. +- **TURQUOISE** = **Color(0.25098, 0.878431, 0.815686, 1)** --- Turquoise color. -- **VIOLET** = **Color(0.93, 0.51, 0.93, 1)** --- Violet color. +- **VIOLET** = **Color(0.933333, 0.509804, 0.933333, 1)** --- Violet color. -- **WEB_GRAY** = **Color(0.5, 0.5, 0.5, 1)** --- Web gray color. +- **WEB_GRAY** = **Color(0.501961, 0.501961, 0.501961, 1)** --- Web gray color. -- **WEB_GREEN** = **Color(0, 0.5, 0, 1)** --- Web green color. +- **WEB_GREEN** = **Color(0, 0.501961, 0, 1)** --- Web green color. -- **WEB_MAROON** = **Color(0.5, 0, 0, 1)** --- Web maroon color. +- **WEB_MAROON** = **Color(0.501961, 0, 0, 1)** --- Web maroon color. -- **WEB_PURPLE** = **Color(0.5, 0, 0.5, 1)** --- Web purple color. +- **WEB_PURPLE** = **Color(0.501961, 0, 0.501961, 1)** --- Web purple color. -- **WHEAT** = **Color(0.96, 0.87, 0.7, 1)** --- Wheat color. +- **WHEAT** = **Color(0.960784, 0.870588, 0.701961, 1)** --- Wheat color. - **WHITE** = **Color(1, 1, 1, 1)** --- White color. -- **WHITE_SMOKE** = **Color(0.96, 0.96, 0.96, 1)** --- White smoke color. +- **WHITE_SMOKE** = **Color(0.960784, 0.960784, 0.960784, 1)** --- White smoke color. - **YELLOW** = **Color(1, 1, 0, 1)** --- Yellow color. -- **YELLOW_GREEN** = **Color(0.6, 0.8, 0.2, 1)** --- Yellow green color. +- **YELLOW_GREEN** = **Color(0.603922, 0.803922, 0.196078, 1)** --- Yellow green color. Property Descriptions --------------------- @@ -1051,11 +1053,32 @@ Constructs a color from an `HSV profile ` **from_ok_hsl** **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| + +Constructs a color from an `OK HSL profile `__. ``h`` (hue), ``s`` (saturation), and ``v`` (value) are typically between 0 and 1. + + +.. tabs:: + + .. code-tab:: gdscript + + var color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8) + + .. code-tab:: csharp + + var color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f); @@ -1081,6 +1104,8 @@ Returns the luminance of the color in the ``[0.0, 1.0]`` range. This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. +\ **Note:** :ref:`get_luminance` relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear` to convert it to the linear color space first. + ---- .. _class_Color_method_get_named_color: @@ -1252,6 +1277,22 @@ Returns a new color resulting from making this color lighter by the specified pe +---- + +.. _class_Color_method_linear_to_srgb: + +- :ref:`Color` **linear_to_srgb** **(** **)** |const| + +Returns the color converted to the `sRGB `__ color space. This assumes the original color is in the linear color space. See also :ref:`srgb_to_linear` which performs the opposite operation. + +---- + +.. _class_Color_method_srgb_to_linear: + +- :ref:`Color` **srgb_to_linear** **(** **)** |const| + +Returns the color converted to the linear color space. This assumes the original color is in the sRGB color space. See also :ref:`linear_to_srgb` which performs the opposite operation. + ---- .. _class_Color_method_to_abgr32: @@ -1422,10 +1463,6 @@ Operator Descriptions .. _class_Color_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Color` right **)** Returns ``true`` if the colors are not equal. @@ -1492,10 +1529,6 @@ Divides each component of the ``Color`` by the given :ref:`int`. .. _class_Color_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Color` right **)** Returns ``true`` if the colors are exactly equal. diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 2b97ce419..48965833e 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -122,6 +122,8 @@ Enumerations .. _class_ColorPicker_constant_SHAPE_VHS_CIRCLE: +.. _class_ColorPicker_constant_SHAPE_OKHSL_CIRCLE: + enum **PickerShapeType**: - **SHAPE_HSV_RECTANGLE** = **0** --- HSV Color Model rectangle color space. @@ -130,6 +132,8 @@ enum **PickerShapeType**: - **SHAPE_VHS_CIRCLE** = **2** --- HSV Color Model circle color space. Use Saturation as a radius. +- **SHAPE_OKHSL_CIRCLE** = **3** --- HSL OK Color Model circle color space. + Property Descriptions --------------------- diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index c73b57718..89aff1ca9 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -65,7 +65,7 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(0.8, 0.8, 0.8, 1)`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``2`` | +| :ref:`int` | :ref:`h_separation` | ``2`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ @@ -240,9 +240,9 @@ Text :ref:`Color` used when the ``ColorPickerButton`` is being pres ---- -.. _class_ColorPickerButton_theme_constant_hseparation: +.. _class_ColorPickerButton_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``2`` | diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index 2f8532467..fa595b472 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -11,14 +11,16 @@ ConcavePolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Concave polygon 2D shape resource for physics. +Concave polygon shape resource for 2D physics. Description ----------- -Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidDynamicBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. +2D concave polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for :ref:`RigidDynamicBody2D` nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. -The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. +The main difference between a :ref:`ConvexPolygonShape2D` and a ``ConcavePolygonShape2D`` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. + +\ **Performance:** Due to its complexity, ``ConcavePolygonShape2D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape2D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape2D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D` first. Properties ---------- diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 762b682bc..71539ee64 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -11,15 +11,17 @@ ConcavePolygonShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Concave polygon shape. +Concave polygon shape resource (also called "trimesh") for 3D physics. Description ----------- -Concave polygon shape resource, which can be set into a :ref:`PhysicsBody3D` or area. This shape is created by feeding a list of triangles. +3D concave polygon shape resource (also called "trimesh") to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is created by feeding a list of triangles. Despite its name, ``ConcavePolygonShape3D`` can also store convex polygon shapes. However, unlike :ref:`ConvexPolygonShape3D`, ``ConcavePolygonShape3D`` is *not* limited to storing convex shapes exclusively. \ **Note:** When used for collision, ``ConcavePolygonShape3D`` is intended to work with static :ref:`PhysicsBody3D` nodes like :ref:`StaticBody3D` and will not work with :ref:`CharacterBody3D` or :ref:`RigidDynamicBody3D` with a mode other than Static. +\ **Performance:** Due to its complexity, ``ConcavePolygonShape3D`` is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using :ref:`ConvexPolygonShape3D` will perform better. For dynamic physics bodies that need concave collision, several :ref:`ConvexPolygonShape3D`\ s can be used to represent its collision by using convex decomposition; see :ref:`ConvexPolygonShape3D`'s documentation for instructions. However, consider using primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D` first. + Tutorials --------- diff --git a/classes/class_container.rst b/classes/class_container.rst index d0b3b920a..00e6559ee 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -22,6 +22,11 @@ Base node for containers. A ``Container`` contains other controls and automatica A Control can inherit this to create custom container classes. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_control.rst b/classes/class_control.rst index 13ac74abe..cbea593dd 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -52,77 +52,79 @@ Tutorials Properties ---------- -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`anchor_left` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`anchor_right` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`anchor_top` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`auto_translate` | ``true`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`clip_contents` | ``false`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`global_position` | | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`String` | :ref:`hint_tooltip` | ``""`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`minimum_size` | ``Vector2(0, 0)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`offset_bottom` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`offset_left` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`offset_right` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`offset_top` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`rotation` | ``0.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`size_flags_horizontal` | ``1`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`size_flags_vertical` | ``1`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`Theme` | :ref:`theme` | | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ -| :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | -+------------------------------------------------------+--------------------------------------------------------------------------------------+-------------------+ ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`anchor_left` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`anchor_right` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`anchor_top` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`auto_translate` | ``true`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`clip_contents` | ``false`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`global_position` | | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`String` | :ref:`hint_tooltip` | ``""`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`minimum_size` | ``Vector2(0, 0)`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`offset_bottom` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`offset_left` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`offset_right` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`offset_top` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`rotation` | ``0.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`int` | :ref:`size_flags_horizontal` | ``1`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`int` | :ref:`size_flags_vertical` | ``1`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`Theme` | :ref:`theme` | | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ +| :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | ++------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ Methods ------- @@ -192,6 +194,8 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_screen_position` **(** **)** |const| | ++----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | @@ -292,7 +296,7 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_minimum_size` **(** **)** | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_position **)** | +| void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -445,9 +449,9 @@ enum **CursorShape**: - **CURSOR_CROSS** = **3** --- Show the system's cross mouse cursor when the user hovers the node. -- **CURSOR_WAIT** = **4** --- Show the system's wait mouse cursor, often an hourglass, when the user hovers the node. +- **CURSOR_WAIT** = **4** --- Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. -- **CURSOR_BUSY** = **5** --- Show the system's busy mouse cursor when the user hovers the node. Often an hourglass. +- **CURSOR_BUSY** = **5** --- Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. - **CURSOR_DRAG** = **6** --- Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. @@ -609,7 +613,7 @@ enum **MouseFilter**: - **MOUSE_FILTER_STOP** = **0** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. -- **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. +- **MOUSE_FILTER_PASS** = **1** --- The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing. - **MOUSE_FILTER_IGNORE** = **2** --- The control will not receive mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. @@ -689,42 +693,6 @@ enum **TextDirection**: - **TEXT_DIRECTION_RTL** = **2** --- Right-to-left text writing direction. ----- - -.. _enum_Control_StructuredTextParser: - -.. _class_Control_constant_STRUCTURED_TEXT_DEFAULT: - -.. _class_Control_constant_STRUCTURED_TEXT_URI: - -.. _class_Control_constant_STRUCTURED_TEXT_FILE: - -.. _class_Control_constant_STRUCTURED_TEXT_EMAIL: - -.. _class_Control_constant_STRUCTURED_TEXT_LIST: - -.. _class_Control_constant_STRUCTURED_TEXT_NONE: - -.. _class_Control_constant_STRUCTURED_TEXT_CUSTOM: - -enum **StructuredTextParser**: - -- **STRUCTURED_TEXT_DEFAULT** = **0** --- Use default behavior. Same as ``STRUCTURED_TEXT_NONE`` unless specified otherwise in the control description. - -- **STRUCTURED_TEXT_URI** = **1** --- BiDi override for URI. - -- **STRUCTURED_TEXT_FILE** = **2** --- BiDi override for file path. - -- **STRUCTURED_TEXT_EMAIL** = **3** --- BiDi override for email. - -- **STRUCTURED_TEXT_LIST** = **4** --- BiDi override for lists. - -Structured text options: list separator ``String``. - -- **STRUCTURED_TEXT_NONE** = **5** --- Use default Unicode BiDi algorithm. - -- **STRUCTURED_TEXT_CUSTOM** = **6** --- User defined structured text BiDi override function. - Constants --------- @@ -1122,6 +1090,24 @@ Controls whether the control will be able to receive mouse button input events t ---- +.. _class_Control_property_mouse_force_pass_scroll_events: + +- :ref:`bool` **mouse_force_pass_scroll_events** + ++-----------+-------------------------------------+ +| *Default* | ``true`` | ++-----------+-------------------------------------+ +| *Setter* | set_force_pass_scroll_events(value) | ++-----------+-------------------------------------+ +| *Getter* | is_force_pass_scroll_events() | ++-----------+-------------------------------------+ + +When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. As it defaults to true, this allows nested scrollable containers to work out of the box. + +You should disable it on the root of your UI if you do not want scroll events to go to the ``_unhandled_input`` processing. + +---- + .. _class_Control_property_offset_bottom: - :ref:`float` **offset_bottom** @@ -1860,6 +1846,24 @@ Returns the position and size of the control relative to the top-left corner of ---- +.. _class_Control_method_get_screen_position: + +- :ref:`Vector2` **get_screen_position** **(** **)** |const| + +Returns the position of this ``Control`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + +Equals to :ref:`global_position` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). + +Example usage for showing a popup: + +:: + + popup_menu.position = get_screen_position() + get_local_mouse_position() + popup_menu.reset_size() + popup_menu.popup() + +---- + .. _class_Control_method_get_theme_color: - :ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| @@ -2146,7 +2150,9 @@ See :ref:`add_theme_stylebox_override` **is_drag_successful** **(** **)** |const| -Returns ``true`` if drag operation is successful. +Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful`. + +Best used with :ref:`Node.NOTIFICATION_DRAG_END`. ---- @@ -2458,9 +2464,9 @@ Invalidates the size cache in this node and in parent nodes up to top level. Int .. _class_Control_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2` to_position **)** +- void **warp_mouse** **(** :ref:`Vector2` position **)** -Moves the mouse cursor to ``to_position``, relative to :ref:`position` of this ``Control``. +Moves the mouse cursor to ``position``, relative to :ref:`position` of this ``Control``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index b5213f49c..d500eda19 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -11,14 +11,16 @@ ConvexPolygonShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Convex polygon shape for 2D physics. +Convex polygon shape resource for 2D physics. Description ----------- -Convex polygon shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). +2D convex polygon shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also :ref:`CollisionPolygon2D`. -The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. +The main difference between a ``ConvexPolygonShape2D`` and a :ref:`ConcavePolygonShape2D` is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection. + +\ **Performance:** ``ConvexPolygonShape2D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` or :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. Properties ---------- diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index ef52ab138..5f1146ddb 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -11,12 +11,16 @@ ConvexPolygonShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Convex polygon shape for 3D physics. +Convex polygon shape resource for 3D physics. Description ----------- -Convex polygon shape resource, which can be added to a :ref:`PhysicsBody3D` or area. +3D convex polygon shape resource to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. Unlike :ref:`ConcavePolygonShape3D`, ``ConvexPolygonShape3D`` cannot store concave polygon shapes. :ref:`ConvexPolygonShape2D`\ s can be manually drawn in the editor using the :ref:`CollisionPolygon3D` node. + +\ **Convex decomposition:** Concave objects' collisions can be represented accurately using *several* ``ConvexPolygonShape3D``\ s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the :ref:`MeshInstance3D`, going to the **Mesh** menu and choosing **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. + +\ **Performance:** ``ConvexPolygonShape3D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape. Tutorials --------- diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 32c9ee3d7..465558723 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -288,6 +288,8 @@ enum **ParticleFlags**: .. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE: +.. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE_SURFACE: + .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE: .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS: @@ -300,15 +302,17 @@ enum **EmissionShape**: - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point. -- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted on the surface of a sphere flattened to two dimensions. +- **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere flattened to two dimensions. -- **EMISSION_SHAPE_RECTANGLE** = **2** --- Particles will be emitted in the area of a rectangle. +- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere flattened to two dimensions. -- **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. +- **EMISSION_SHAPE_RECTANGLE** = **3** --- Particles will be emitted in the area of a rectangle. -- **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. +- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. -- **EMISSION_SHAPE_MAX** = **5** --- Represents the size of the :ref:`EmissionShape` enum. +- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. + +- **EMISSION_SHAPE_MAX** = **6** --- Represents the size of the :ref:`EmissionShape` enum. Property Descriptions --------------------- diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 8fa79c028..6918693af 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -303,6 +303,8 @@ enum **ParticleFlags**: .. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE: +.. _class_CPUParticles3D_constant_EMISSION_SHAPE_SPHERE_SURFACE: + .. _class_CPUParticles3D_constant_EMISSION_SHAPE_BOX: .. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINTS: @@ -319,15 +321,17 @@ enum **EmissionShape**: - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. -- **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box. +- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. -- **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. +- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. -- **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. +- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle color will be modulated by :ref:`emission_colors`. -- **EMISSION_SHAPE_RING** = **5** --- Particles will be emitted in a ring or cylinder. +- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points`. Particle velocity and rotation will be set based on :ref:`emission_normals`. Particle color will be modulated by :ref:`emission_colors`. -- **EMISSION_SHAPE_MAX** = **6** --- Represents the size of the :ref:`EmissionShape` enum. +- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. + +- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. Property Descriptions --------------------- diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index 6200eb530..3c9e554b8 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -87,8 +87,6 @@ For now, this includes generating cryptographically secure random bytes, RSA key -\ **Note:** Not available in HTML5 exports. - Methods ------- diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index b0be99530..7a5467fdb 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -20,8 +20,6 @@ The CryptoKey class represents a cryptographic key. Keys can be loaded and saved They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerSSL.accept_stream` along with the appropriate certificate. -\ **Note:** Not available in HTML5 exports. - Methods ------- diff --git a/classes/class_csgprimitive3d.rst b/classes/class_csgprimitive3d.rst index 801f927e5..fe5e89d83 100644 --- a/classes/class_csgprimitive3d.rst +++ b/classes/class_csgprimitive3d.rst @@ -30,26 +30,26 @@ Tutorials Properties ---------- -+-------------------------+-----------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`invert_faces` | ``false`` | -+-------------------------+-----------------------------------------------------------------+-----------+ ++-------------------------+-------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`flip_faces` | ``false`` | ++-------------------------+-------------------------------------------------------------+-----------+ Property Descriptions --------------------- -.. _class_CSGPrimitive3D_property_invert_faces: +.. _class_CSGPrimitive3D_property_flip_faces: -- :ref:`bool` **invert_faces** +- :ref:`bool` **flip_faces** -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_invert_faces(value) | -+-----------+-------------------------+ -| *Getter* | is_inverting_faces() | -+-----------+-------------------------+ ++-----------+-----------------------+ +| *Default* | ``false`` | ++-----------+-----------------------+ +| *Setter* | set_flip_faces(value) | ++-----------+-----------------------+ +| *Getter* | get_flip_faces() | ++-----------+-----------------------+ -Invert the faces of the mesh. +If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_csgsphere3d.rst b/classes/class_csgsphere3d.rst index edd675acb..fcaed278b 100644 --- a/classes/class_csgsphere3d.rst +++ b/classes/class_csgsphere3d.rst @@ -33,7 +33,7 @@ Properties +---------------------------------+--------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`radial_segments` | ``12`` | +---------------------------------+--------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | +| :ref:`float` | :ref:`radius` | ``0.5`` | +---------------------------------+--------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`rings` | ``6`` | +---------------------------------+--------------------------------------------------------------------+----------+ @@ -78,7 +78,7 @@ Number of vertical slices for the sphere. - :ref:`float` **radius** +-----------+-------------------+ -| *Default* | ``1.0`` | +| *Default* | ``0.5`` | +-----------+-------------------+ | *Setter* | set_radius(value) | +-----------+-------------------+ diff --git a/classes/class_curve.rst b/classes/class_curve.rst index cb321a83c..53183d891 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -28,6 +28,8 @@ Properties +---------------------------+--------------------------------------------------------------+---------+ | :ref:`float` | :ref:`min_value` | ``0.0`` | +---------------------------+--------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`point_count` | ``0`` | ++---------------------------+--------------------------------------------------------------+---------+ Methods ------- @@ -41,8 +43,6 @@ Methods +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_points` **(** **)** | +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TangentMode` | :ref:`get_point_left_mode` **(** :ref:`int` index **)** |const| | +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_point_left_tangent` **(** :ref:`int` index **)** |const| | @@ -149,6 +149,22 @@ The maximum value the curve can reach. The minimum value the curve can reach. +---- + +.. _class_Curve_property_point_count: + +- :ref:`int` **point_count** + ++-----------+------------------------+ +| *Default* | ``0`` | ++-----------+------------------------+ +| *Setter* | set_point_count(value) | ++-----------+------------------------+ +| *Getter* | get_point_count() | ++-----------+------------------------+ + +The number of points describing the curve. + Method Descriptions ------------------- @@ -184,14 +200,6 @@ Removes all points from the curve. ---- -.. _class_Curve_method_get_point_count: - -- :ref:`int` **get_point_count** **(** **)** |const| - -Returns the number of points describing the curve. - ----- - .. _class_Curve_method_get_point_left_mode: - :ref:`TangentMode` **get_point_left_mode** **(** :ref:`int` index **)** |const| diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 299aaf4fd..a7a611f35 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -26,6 +26,8 @@ Properties +---------------------------+------------------------------------------------------------+---------+ | :ref:`float` | :ref:`bake_interval` | ``5.0`` | +---------------------------+------------------------------------------------------------+---------+ +| :ref:`int` | :ref:`point_count` | ``0`` | ++---------------------------+------------------------------------------------------------+---------+ Methods ------- @@ -43,8 +45,6 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` to_point **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | @@ -85,6 +85,22 @@ Property Descriptions The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. +---- + +.. _class_Curve2D_property_point_count: + +- :ref:`int` **point_count** + ++-----------+------------------------+ +| *Default* | ``0`` | ++-----------+------------------------+ +| *Setter* | set_point_count(value) | ++-----------+------------------------+ +| *Getter* | get_point_count() | ++-----------+------------------------+ + +The number of points describing the curve. + Method Descriptions ------------------- @@ -92,7 +108,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` at_position=-1 **)** -Adds a point to a curve at ``position``, with control points ``in`` and ``out``. +Adds a point to a curve at ``position`` relative to the ``Curve2D``'s position, with control points ``in`` and ``out``. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. @@ -142,14 +158,6 @@ Returns the closest baked point (in curve's local space) to ``to_point``. ---- -.. _class_Curve2D_method_get_point_count: - -- :ref:`int` **get_point_count** **(** **)** |const| - -Returns the number of points describing the curve. - ----- - .. _class_Curve2D_method_get_point_in: - :ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** |const| diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 67acfaef6..8e9eac205 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -26,6 +26,8 @@ Properties +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`bake_interval` | ``0.2`` | +---------------------------+--------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`point_count` | ``0`` | ++---------------------------+--------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`up_vector_enabled` | ``true`` | +---------------------------+--------------------------------------------------------------------+----------+ @@ -49,8 +51,6 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_closest_point` **(** :ref:`Vector3` to_point **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** |const| | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | @@ -99,6 +99,22 @@ The distance in meters between two adjacent cached points. Changing it forces th ---- +.. _class_Curve3D_property_point_count: + +- :ref:`int` **point_count** + ++-----------+------------------------+ +| *Default* | ``0`` | ++-----------+------------------------+ +| *Setter* | set_point_count(value) | ++-----------+------------------------+ +| *Getter* | get_point_count() | ++-----------+------------------------+ + +The number of points describing the curve. + +---- + .. _class_Curve3D_property_up_vector_enabled: - :ref:`bool` **up_vector_enabled** @@ -120,7 +136,7 @@ Method Descriptions - void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` at_position=-1 **)** -Adds a point to a curve at ``position``, with control points ``in`` and ``out``. +Adds a point to a curve at ``position`` relative to the ``Curve3D``'s position, with control points ``in`` and ``out``. If ``at_position`` is given, the point is inserted before the point number ``at_position``, moving that point (and every point after) after the inserted point. If ``at_position`` is not given, or is an illegal value (``at_position <0`` or ``at_position >= [method get_point_count]``), the point will be appended at the end of the point list. @@ -188,14 +204,6 @@ Returns the closest baked point (in curve's local space) to ``to_point``. ---- -.. _class_Curve3D_method_get_point_count: - -- :ref:`int` **get_point_count** **(** **)** |const| - -Returns the number of points describing the curve. - ----- - .. _class_Curve3D_method_get_point_in: - :ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** |const| diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 57b776225..5b412d64d 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -21,17 +21,21 @@ Class representing a cylindrical :ref:`PrimitiveMesh`. This Properties ---------- -+---------------------------+---------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`bottom_radius` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`height` | ``2.0`` | -+---------------------------+---------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`radial_segments` | ``64`` | -+---------------------------+---------------------------------------------------------------------+---------+ -| :ref:`int` | :ref:`rings` | ``4`` | -+---------------------------+---------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`top_radius` | ``0.5`` | -+---------------------------+---------------------------------------------------------------------+---------+ ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`bottom_radius` | ``0.5`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`cap_bottom` | ``true`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`cap_top` | ``true`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`height` | ``2.0`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`radial_segments` | ``64`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`rings` | ``4`` | ++---------------------------+---------------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`top_radius` | ``0.5`` | ++---------------------------+---------------------------------------------------------------------+----------+ Property Descriptions --------------------- @@ -48,7 +52,43 @@ Property Descriptions | *Getter* | get_bottom_radius() | +-----------+--------------------------+ -Bottom radius of the cylinder. If set to ``0.0``, the bottom faces will not be generated, resulting in a conic shape. +Bottom radius of the cylinder. If set to ``0.0``, the bottom faces will not be generated, resulting in a conic shape. See also :ref:`cap_bottom`. + +---- + +.. _class_CylinderMesh_property_cap_bottom: + +- :ref:`bool` **cap_bottom** + ++-----------+-----------------------+ +| *Default* | ``true`` | ++-----------+-----------------------+ +| *Setter* | set_cap_bottom(value) | ++-----------+-----------------------+ +| *Getter* | is_cap_bottom() | ++-----------+-----------------------+ + +If ``true``, generates a cap at the bottom of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`bottom_radius`. + +\ **Note:** If :ref:`bottom_radius` is ``0.0``, cap generation is always skipped even if :ref:`cap_bottom` is ``true``. + +---- + +.. _class_CylinderMesh_property_cap_top: + +- :ref:`bool` **cap_top** + ++-----------+--------------------+ +| *Default* | ``true`` | ++-----------+--------------------+ +| *Setter* | set_cap_top(value) | ++-----------+--------------------+ +| *Getter* | is_cap_top() | ++-----------+--------------------+ + +If ``true``, generates a cap at the top of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`top_radius`. + +\ **Note:** If :ref:`top_radius` is ``0.0``, cap generation is always skipped even if :ref:`cap_top` is ``true``. ---- @@ -112,7 +152,7 @@ Number of edge rings along the height of the cylinder. Changing :ref:`rings`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index bb49179c5..a3e17feaa 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -11,12 +11,14 @@ CylinderShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Cylinder shape for collisions. +Cylinder shape for 3D collisions. Description ----------- -Cylinder shape for collisions. +Cylinder shape for collisions. Like :ref:`CapsuleShape3D`, but without hemispheres at the cylinder's ends. + +\ **Performance:** Being a primitive collision shape, ``CylinderShape3D`` is fast to check collisions against (though not as fast as :ref:`SphereShape3D`). ``CylinderShape3D`` is also more demanding compared to :ref:`CapsuleShape3D`. Tutorials --------- diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 47edc8890..5a5a674d7 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -22,6 +22,8 @@ They are made of an :ref:`AABB` and a group of :ref:`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. +\ **Note:** Decals cannot affect an underlying material's transparency, regardless of its transparency mode (alpha blend, alpha scissor, alpha hash, opaque pre-pass). This means translucent or transparent areas of a material will remain translucent or transparent even if an opaque decal is applied on them. + Properties ---------- diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 7bbb292ba..2a7babc53 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -67,7 +67,7 @@ You can access a dictionary's values by referencing the appropriate key. In the .. code-tab:: gdscript - export(string, "White", "Yellow", "Orange") var my_color + export(String, "White", "Yellow", "Orange") var my_color var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} func _ready(): # We can't use dot syntax here as `my_color` is a variable. @@ -254,40 +254,38 @@ Constructors Methods ------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`duplicate` **(** :ref:`bool` deep=false **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`erase` **(** :ref:`Variant` key **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get` **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has` **(** :ref:`Variant` key **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_all` **(** :ref:`Array` keys **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`keys` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`size` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`values` **(** **)** |const| | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`duplicate` **(** :ref:`bool` deep=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`erase` **(** :ref:`Variant` key **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get` **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** :ref:`Variant` key **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_all` **(** :ref:`Array` keys **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`keys` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`merge` **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`size` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`values` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Dictionary` right **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Dictionary` right **)** | +-------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`operator []` **(** :ref:`Variant` key **)** | @@ -432,6 +430,14 @@ Returns the list of keys in the ``Dictionary``. ---- +.. _class_Dictionary_method_merge: + +- void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** + +Adds elements from ``dictionary`` to this ``Dictionary``. By default, duplicate keys will not be copied over, unless ``overwrite`` is ``true``. + +---- + .. _class_Dictionary_method_size: - :ref:`int` **size** **(** **)** |const| @@ -451,20 +457,12 @@ Operator Descriptions .. _class_Dictionary_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Dictionary` right **)** ---- .. _class_Dictionary_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Dictionary` right **)** ---- diff --git a/classes/class_directionallight3d.rst b/classes/class_directionallight3d.rst index aa97573b7..c53cacd53 100644 --- a/classes/class_directionallight3d.rst +++ b/classes/class_directionallight3d.rst @@ -26,27 +26,25 @@ Tutorials Properties ---------- -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`directional_shadow_blend_splits` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_fade_start` | ``0.8`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_max_distance` | ``100.0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`ShadowMode` | :ref:`directional_shadow_mode` | ``2`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_pancake_size` | ``20.0`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_split_1` | ``0.1`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_split_2` | ``0.2`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | :ref:`directional_shadow_split_3` | ``0.5`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`float` | shadow_bias | ``0.1`` (overrides :ref:`Light3D`) | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`use_in_sky_only` | ``false`` | -+-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------+ ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`directional_shadow_blend_splits` | ``false`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_fade_start` | ``0.8`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_max_distance` | ``100.0`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`ShadowMode` | :ref:`directional_shadow_mode` | ``2`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_pancake_size` | ``20.0`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_split_1` | ``0.1`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_split_2` | ``0.2`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`directional_shadow_split_3` | ``0.5`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`SkyMode` | :ref:`sky_mode` | ``0`` | ++-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+-----------+ Enumerations ------------ @@ -67,6 +65,24 @@ enum **ShadowMode**: - **SHADOW_PARALLEL_4_SPLITS** = **2** --- Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. +---- + +.. _enum_DirectionalLight3D_SkyMode: + +.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_AND_SKY: + +.. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_ONLY: + +.. _class_DirectionalLight3D_constant_SKY_MODE_SKY_ONLY: + +enum **SkyMode**: + +- **SKY_MODE_LIGHT_AND_SKY** = **0** --- Makes the light visible in both scene lighting and sky rendering. + +- **SKY_MODE_LIGHT_ONLY** = **1** --- Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. + +- **SKY_MODE_SKY_ONLY** = **2** --- Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). + Property Descriptions --------------------- @@ -198,19 +214,19 @@ The distance from shadow split 2 to split 3. Relative to :ref:`directional_shado ---- -.. _class_DirectionalLight3D_property_use_in_sky_only: +.. _class_DirectionalLight3D_property_sky_mode: -- :ref:`bool` **use_in_sky_only** +- :ref:`SkyMode` **sky_mode** +-----------+---------------------+ -| *Default* | ``false`` | +| *Default* | ``0`` | +-----------+---------------------+ -| *Setter* | set_sky_only(value) | +| *Setter* | set_sky_mode(value) | +-----------+---------------------+ -| *Getter* | is_sky_only() | +| *Getter* | get_sky_mode() | +-----------+---------------------+ -If ``true``, 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. +Set whether this ``DirectionalLight3D`` is visible in the sky, in the scene, or both in the sky and in the scene. See :ref:`SkyMode` for options. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_directory.rst b/classes/class_directory.rst index b7253fb58..aaaf6179f 100644 --- a/classes/class_directory.rst +++ b/classes/class_directory.rst @@ -356,7 +356,9 @@ Returns one of the :ref:`Error` code constants (``OK`` - :ref:`Error` **remove** **(** :ref:`String` path **)** -Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. +Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. + +If you don't want to delete the file/directory permanently, use :ref:`OS.move_to_trash` instead. Returns one of the :ref:`Error` code constants (``OK`` on success). diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 246d55db4..5bdceb48e 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -16,227 +16,291 @@ DisplayServer Methods ------- -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`clipboard_get` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`clipboard_get_primary` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`clipboard_has` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clipboard_set` **(** :ref:`String` clipboard **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clipboard_set_primary` **(** :ref:`String` clipboard_primary **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`create_sub_window` **(** :ref:`WindowMode` mode, :ref:`VSyncMode` vsync_mode, :ref:`int` flags, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | :ref:`cursor_get_shape` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_custom_image` **(** :ref:`Resource` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`cursor_set_shape` **(** :ref:`CursorShape` shape **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`delete_sub_window` **(** :ref:`int` window_id **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dialog_input_text` **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`dialog_show` **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`enable_for_stealing_focus` **(** :ref:`int` process_id **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`force_process_and_drop_events` **(** **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_name` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_screen_count` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`get_swap_cancel_ok` **(** **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_window_at_screen_position` **(** :ref:`Vector2i` position **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`get_window_list` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_separator` **(** :ref:`String` menu_root **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_add_submenu_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_clear` **(** :ref:`String` menu_root **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Callable` | :ref:`global_menu_get_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`global_menu_get_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`global_menu_get_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`global_menu_get_item_text` **(** :ref:`String` menu_root, :ref:`int` idx **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`global_menu_is_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`global_menu_is_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_remove_item` **(** :ref:`String` menu_root, :ref:`int` idx **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`global_menu_set_item_text` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`ime_get_selection` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`ime_get_text` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`keyboard_get_current_layout` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Key` | :ref:`keyboard_get_keycode_from_physical` **(** :ref:`Key` keycode **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`keyboard_get_layout_count` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`keyboard_get_layout_language` **(** :ref:`int` index **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`keyboard_get_layout_name` **(** :ref:`int` index **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`keyboard_set_current_layout` **(** :ref:`int` index **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MouseButton` | :ref:`mouse_get_button_state` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MouseMode` | :ref:`mouse_get_mode` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`mouse_get_position` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mouse_set_mode` **(** :ref:`MouseMode` mouse_mode **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`mouse_warp_to_position` **(** :ref:`Vector2i` position **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`process_events` **(** **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`screen_get_dpi` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`screen_get_position` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`screen_get_refresh_rate` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`screen_get_scale` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`screen_get_size` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`screen_get_usable_rect` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`screen_is_kept_on` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`screen_is_touchscreen` **(** :ref:`int` screen=-1 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`screen_set_keep_on` **(** :ref:`bool` enable **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`screen_set_orientation` **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_icon` **(** :ref:`Image` image **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_native_icon` **(** :ref:`String` filename **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tablet_get_current_driver` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`tablet_get_driver_count` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`tablet_get_driver_name` **(** :ref:`int` idx **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`tablet_set_current_driver` **(** :ref:`String` name **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`virtual_keyboard_get_height` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`virtual_keyboard_hide` **(** **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`virtual_keyboard_show` **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`bool` multiline=false, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_attach_instance_id` **(** :ref:`int` instance_id, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`window_can_draw` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`window_get_active_popup` **(** **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`window_get_attached_instance_id` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`window_get_current_screen` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`window_get_flag` **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`window_get_max_size` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`window_get_min_size` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`WindowMode` | :ref:`window_get_mode` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`window_get_native_handle` **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2i` | :ref:`window_get_popup_safe_rect` **(** :ref:`int` window **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`window_get_position` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`window_get_real_size` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`window_get_size` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :ref:`int` window_id=0 **)** |const| | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_move_to_foreground` **(** :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_request_attention` **(** :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_current_screen` **(** :ref:`int` screen, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_drop_files_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_exclusive` **(** :ref:`int` window_id, :ref:`bool` exclusive **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_flag` **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_ime_active` **(** :ref:`bool` active, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_ime_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_input_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_input_text_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_max_size` **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_min_size` **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_mode` **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_mouse_passthrough` **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_popup_safe_rect` **(** :ref:`int` window, :ref:`Rect2i` rect **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_rect_changed_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_size` **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_title` **(** :ref:`String` title, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_transient` **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_vsync_mode` **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`window_set_window_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | -+----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`clipboard_get` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`clipboard_get_primary` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`clipboard_has` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clipboard_set` **(** :ref:`String` clipboard **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clipboard_set_primary` **(** :ref:`String` clipboard_primary **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`create_sub_window` **(** :ref:`WindowMode` mode, :ref:`VSyncMode` vsync_mode, :ref:`int` flags, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CursorShape` | :ref:`cursor_get_shape` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_custom_image` **(** :ref:`Resource` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`cursor_set_shape` **(** :ref:`CursorShape` shape **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`delete_sub_window` **(** :ref:`int` window_id **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`dialog_input_text` **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`dialog_show` **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`enable_for_stealing_focus` **(** :ref:`int` process_id **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`force_process_and_drop_events` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_display_cutouts` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2i` | :ref:`get_display_safe_area` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_screen_count` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_swap_cancel_ok` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_window_at_screen_position` **(** :ref:`Vector2i` position **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`get_window_list` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_icon_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_icon_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_icon_radio_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_multistate_item` **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_radio_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_separator` **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_add_submenu_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_clear` **(** :ref:`String` menu_root **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Key` | :ref:`global_menu_get_item_accelerator` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Callable` | :ref:`global_menu_get_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`global_menu_get_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`global_menu_get_item_index_from_tag` **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`global_menu_get_item_index_from_text` **(** :ref:`String` menu_root, :ref:`String` text **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`global_menu_get_item_max_states` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`global_menu_get_item_state` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`global_menu_get_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`global_menu_get_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`global_menu_get_item_text` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`global_menu_get_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`global_menu_is_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`global_menu_is_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`global_menu_is_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`global_menu_is_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_remove_item` **(** :ref:`String` menu_root, :ref:`int` idx **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_accelerator` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_max_states` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_state` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_text` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`global_menu_set_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`ime_get_selection` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`ime_get_text` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`keyboard_get_current_layout` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Key` | :ref:`keyboard_get_keycode_from_physical` **(** :ref:`Key` keycode **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`keyboard_get_layout_count` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`keyboard_get_layout_language` **(** :ref:`int` index **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`keyboard_get_layout_name` **(** :ref:`int` index **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`keyboard_set_current_layout` **(** :ref:`int` index **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MouseButton` | :ref:`mouse_get_button_state` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MouseMode` | :ref:`mouse_get_mode` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`mouse_get_position` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`mouse_set_mode` **(** :ref:`MouseMode` mouse_mode **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`process_events` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`screen_get_dpi` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`screen_get_position` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`screen_get_refresh_rate` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`screen_get_scale` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`screen_get_size` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2i` | :ref:`screen_get_usable_rect` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`screen_is_kept_on` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`screen_is_touchscreen` **(** :ref:`int` screen=-1 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`screen_set_keep_on` **(** :ref:`bool` enable **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`screen_set_orientation` **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_icon` **(** :ref:`Image` image **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_native_icon` **(** :ref:`String` filename **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tablet_get_current_driver` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`tablet_get_driver_count` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tablet_get_driver_name` **(** :ref:`int` idx **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tablet_set_current_driver` **(** :ref:`String` name **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`tts_get_voices` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language` **(** :ref:`String` language **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`tts_is_paused` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`tts_is_speaking` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tts_pause` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tts_resume` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tts_set_utterance_callback` **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tts_speak` **(** :ref:`String` text, :ref:`String` voice, :ref:`int` volume=50, :ref:`float` pitch=1.0, :ref:`float` rate=1.0, :ref:`int` utterance_id=0, :ref:`bool` interrupt=false **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`tts_stop` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`virtual_keyboard_get_height` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`virtual_keyboard_hide` **(** **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`virtual_keyboard_show` **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`bool` multiline=false, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`warp_mouse` **(** :ref:`Vector2i` position **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_attach_instance_id` **(** :ref:`int` instance_id, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`window_can_draw` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`window_get_active_popup` **(** **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`window_get_attached_instance_id` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`window_get_current_screen` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`window_get_flag` **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_max_size` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_min_size` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`WindowMode` | :ref:`window_get_mode` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`window_get_native_handle` **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2i` | :ref:`window_get_popup_safe_rect` **(** :ref:`int` window **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_position` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_real_size` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`window_get_size` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :ref:`int` window_id=0 **)** |const| | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_move_to_foreground` **(** :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_request_attention` **(** :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_current_screen` **(** :ref:`int` screen, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_drop_files_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_exclusive` **(** :ref:`int` window_id, :ref:`bool` exclusive **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_flag` **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_ime_active` **(** :ref:`bool` active, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_ime_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_input_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_input_text_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_max_size` **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_min_size` **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_mode` **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_mouse_passthrough` **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_popup_safe_rect` **(** :ref:`int` window, :ref:`Rect2i` rect **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_rect_changed_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_size` **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_title` **(** :ref:`String` title, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_transient` **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_vsync_mode` **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`window_set_window_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | ++----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -279,6 +343,8 @@ Enumerations .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY: +.. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH: + enum **Feature**: - **FEATURE_GLOBAL_MENU** = **0** @@ -317,6 +383,8 @@ enum **Feature**: - **FEATURE_CLIPBOARD_PRIMARY** = **18** +- **FEATURE_TEXT_TO_SPEECH** = **19** --- Display server supports text-to-speech. See ``tts_*`` methods. + ---- .. _enum_DisplayServer_MouseMode: @@ -519,7 +587,7 @@ enum **WindowFlags**: - **WINDOW_FLAG_NO_FOCUS** = **4** --- Window can't be focused. No-focus window will ignore all input, except mouse clicks. -- **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when window is visible. An active popup window will exclusivly receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have :ref:`WINDOW_FLAG_TRANSPARENT` set. +- **WINDOW_FLAG_POPUP** = **5** --- Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have :ref:`WINDOW_FLAG_TRANSPARENT` set. - **WINDOW_FLAG_MAX** = **6** @@ -595,25 +663,47 @@ enum **HandleType**: - **DISPLAY_HANDLE** = **0** --- Display handle: -- Linux: ``X11::Display*`` for the display. + - Linux: ``X11::Display*`` for the display. - **WINDOW_HANDLE** = **1** --- Window handle: -- Windows: ``HWND`` for the window. + - Windows: ``HWND`` for the window. -- Linux: ``X11::Window*`` for the window. + - Linux: ``X11::Window*`` for the window. -- MacOS: ``NSWindow*`` for the window. + - MacOS: ``NSWindow*`` for the window. -- iOS: ``UIViewController*`` for the view controller. + - iOS: ``UIViewController*`` for the view controller. -- Android: ``jObject`` for the activity. + - Android: ``jObject`` for the activity. - **WINDOW_VIEW** = **2** --- Window view: -- MacOS: ``NSView*`` for the window main view. + - MacOS: ``NSView*`` for the window main view. -- iOS: ``UIView*`` for the window main view. + - iOS: ``UIView*`` for the window main view. + +---- + +.. _enum_DisplayServer_TTSUtteranceEvent: + +.. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: + +.. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED: + +.. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED: + +.. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY: + +enum **TTSUtteranceEvent**: + +- **TTS_UTTERANCE_STARTED** = **0** --- Utterance has begun to be spoken. + +- **TTS_UTTERANCE_ENDED** = **1** --- Utterance was successfully finished. + +- **TTS_UTTERANCE_CANCELED** = **2** --- Utterance was canceled, or TTS service was unable to process it. + +- **TTS_UTTERANCE_BOUNDARY** = **3** --- Utterance reached a word or sentence boundary. Constants --------- @@ -731,6 +821,24 @@ Sets the user's primary clipboard content to the given string. ---- +.. _class_DisplayServer_method_get_display_cutouts: + +- :ref:`Array` **get_display_cutouts** **(** **)** |const| + +Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area`. + +\ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. + +---- + +.. _class_DisplayServer_method_get_display_safe_area: + +- :ref:`Rect2i` **get_display_safe_area** **(** **)** |const| + +Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts`. + +---- + .. _class_DisplayServer_method_get_name: - :ref:`String` **get_name** **(** **)** |const| @@ -763,25 +871,160 @@ Sets the user's primary clipboard content to the given string. .. _class_DisplayServer_method_global_menu_add_check_item: -- void **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null **)** +- void **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_add_icon_check_item: + +- void **global_menu_add_icon_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_add_icon_item: + +- void **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_add_icon_radio_check_item: + +- void **global_menu_add_icon_radio_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. + +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_item: -- void **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null **)** +- void **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new item with text ``label`` to the global menu with ID ``menu_root``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_add_multistate_item: + +- void **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` labe, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new item with text ``label`` to the global menu with ID ``menu_root``. + +Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_add_radio_check_item: + +- void **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback, :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** + +Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``. + +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_separator: -- void **global_menu_add_separator** **(** :ref:`String` menu_root **)** +- void **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** + +Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). ---- .. _class_DisplayServer_method_global_menu_add_submenu_item: -- void **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu **)** +- void **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** + +Adds an item that will act as a submenu of the global menu ``menu_root``. The ``submenu`` argument is the ID of the global menu root that will be shown when the item is clicked. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). ---- @@ -789,29 +1032,126 @@ Sets the user's primary clipboard content to the given string. - void **global_menu_clear** **(** :ref:`String` menu_root **)** +Removes all items from the global menu with ID ``menu_root``. + +\ **Note:** This method is implemented on macOS. + +\ **Supported system menu IDs:**\ + +:: + + "" - Main menu (macOS). + "_dock" - Dock popup menu (macOS). + +---- + +.. _class_DisplayServer_method_global_menu_get_item_accelerator: + +- :ref:`Key` **global_menu_get_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_get_item_callback: -- :ref:`Callable` **global_menu_get_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** +- :ref:`Callable` **global_menu_get_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the callback of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_icon: + +- :ref:`Texture2D` **global_menu_get_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the icon of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_index_from_tag: + +- :ref:`int` **global_menu_get_item_index_from_tag** **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| + +Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_index_from_text: + +- :ref:`int` **global_menu_get_item_index_from_text** **(** :ref:`String` menu_root, :ref:`String` text **)** |const| + +Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_max_states: + +- :ref:`int` **global_menu_get_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns number of states of an multistate item. See :ref:`global_menu_add_multistate_item` for details. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_state: + +- :ref:`int` **global_menu_get_item_state** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. + +\ **Note:** This method is implemented on macOS. ---- .. _class_DisplayServer_method_global_menu_get_item_submenu: -- :ref:`String` **global_menu_get_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx **)** +- :ref:`String` **global_menu_get_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item` for more info on how to add a submenu. + +\ **Note:** This method is implemented on macOS. ---- .. _class_DisplayServer_method_global_menu_get_item_tag: -- :ref:`Variant` **global_menu_get_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx **)** +- :ref:`Variant` **global_menu_get_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag`, which provides a simple way of assigning context data to items. + +\ **Note:** This method is implemented on macOS. ---- .. _class_DisplayServer_method_global_menu_get_item_text: -- :ref:`String` **global_menu_get_item_text** **(** :ref:`String` menu_root, :ref:`int` idx **)** +- :ref:`String` **global_menu_get_item_text** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the text of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_get_item_tooltip: + +- :ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns the tooltip associated with the specified index index ``idx``. + +\ **Note:** This method is implemented on macOS. ---- @@ -819,54 +1159,190 @@ Sets the user's primary clipboard content to the given string. - :ref:`bool` **global_menu_is_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_is_item_checked: - :ref:`bool` **global_menu_is_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +Returns ``true`` if the item at index ``idx`` is checked. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_is_item_disabled: + +- :ref:`bool` **global_menu_is_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. + +See :ref:`global_menu_set_item_disabled` for more info on how to disable an item. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_is_item_radio_checkable: + +- :ref:`bool` **global_menu_is_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +Returns ``true`` if the item at index ``idx`` has radio button-style checkability. + +\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_remove_item: - void **global_menu_remove_item** **(** :ref:`String` menu_root, :ref:`int` idx **)** +Removes the item at index ``idx`` from the global menu ``menu_root``. + +\ **Note:** The indices of items after the removed item will be shifted by one. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_accelerator: + +- void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** + +Sets the accelerator of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_callback: - void **global_menu_set_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** +Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed or its accelerator is activated. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_checkable: - void **global_menu_set_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** +Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_checked: - void **global_menu_set_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** +Sets the checkstate status of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_disabled: + +- void **global_menu_set_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** + +Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_icon: + +- void **global_menu_set_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** + +Replaces the :ref:`Texture2D` icon of the specified ``idx``. + +\ **Note:** This method is implemented on macOS. + +\ **Note:** This method is not supported by macOS "_dock" menu items. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_max_states: + +- void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** + +Sets number of state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_radio_checkable: + +- void **global_menu_set_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** + +Sets the type of the item at the specified index ``idx`` to radio button. If ``false``, sets the type of the item to plain text + +\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_state: + +- void **global_menu_set_item_state** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** + +Sets the state of an multistate item. See :ref:`global_menu_add_multistate_item` for details. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_submenu: - void **global_menu_set_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** +Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_tag: - void **global_menu_set_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag`, which provides a simple way of assigning context data to items. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_global_menu_set_item_text: - void **global_menu_set_item_text** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** +Sets the text of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS. + +---- + +.. _class_DisplayServer_method_global_menu_set_item_tooltip: + +- void **global_menu_set_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** + +Sets the :ref:`String` tooltip of the item at the specified index ``idx``. + +\ **Note:** This method is implemented on macOS. + ---- .. _class_DisplayServer_method_has_feature: @@ -973,14 +1449,6 @@ Returns the mouse cursor's current position. ---- -.. _class_DisplayServer_method_mouse_warp_to_position: - -- void **mouse_warp_to_position** **(** :ref:`Vector2i` position **)** - -Sets the mouse cursor position to the given ``position``. - ----- - .. _class_DisplayServer_method_process_events: - void **process_events** **(** **)** @@ -1152,6 +1620,124 @@ Set active tablet driver name. ---- +.. _class_DisplayServer_method_tts_get_voices: + +- :ref:`Array` **tts_get_voices** **(** **)** |const| + +Returns an :ref:`Array` of voice information dictionaries. + +Each :ref:`Dictionary` contains two :ref:`String` entries: + +- ``name`` is voice name. + +- ``id`` is voice identifier. + +- ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_get_voices_for_language: + +- :ref:`PackedStringArray` **tts_get_voices_for_language** **(** :ref:`String` language **)** |const| + +Returns an :ref:`PackedStringArray` of voice identifiers for the ``language``. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_is_paused: + +- :ref:`bool` **tts_is_paused** **(** **)** |const| + +Returns ``true`` if the synthesizer is in a paused state. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_is_speaking: + +- :ref:`bool` **tts_is_speaking** **(** **)** |const| + +Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_pause: + +- void **tts_pause** **(** **)** + +Puts the synthesizer into a paused state. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_resume: + +- void **tts_resume** **(** **)** + +Resumes the synthesizer if it was paused. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_set_utterance_callback: + +- void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** + +Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. + +- ``TTS_UTTERANCE_STARTED``, ``TTS_UTTERANCE_ENDED``, and ``TTS_UTTERANCE_CANCELED`` callable's method should take one :ref:`int` parameter, the utterance id. + +- ``TTS_UTTERANCE_BOUNDARY`` callable's method should take two :ref:`int` parameters, the index of the character and the utterance id. + +\ **Note:** The granularity of the boundary callbacks is engine dependent. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_speak: + +- void **tts_speak** **(** :ref:`String` text, :ref:`String` voice, :ref:`int` volume=50, :ref:`float` pitch=1.0, :ref:`float` rate=1.0, :ref:`int` utterance_id=0, :ref:`bool` interrupt=false **)** + +Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first. + +- ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices` or one of the values returned by :ref:`tts_get_voices_for_language`. + +- ``volume`` ranges from ``0`` (lowest) to ``100`` (highest). + +- ``pitch`` ranges from ``0.0`` (lowest) to ``2.0`` (highest), ``1.0`` is default pitch for the current voice. + +- ``rate`` ranges from ``0.1`` (lowest) to ``10.0`` (highest), ``1.0`` is a normal speaking rate. Other values act as a percentage relative. + +- ``utterance_id`` is passed as a parameter to the callback functions. + +\ **Note:** On Windows and Linux, utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak`. + +\ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + +.. _class_DisplayServer_method_tts_stop: + +- void **tts_stop** **(** **)** + +Stops synthesis in progress and removes all utterances from the queue. + +\ **Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS, and Windows. + +---- + .. _class_DisplayServer_method_virtual_keyboard_get_height: - :ref:`int` **virtual_keyboard_get_height** **(** **)** |const| @@ -1190,6 +1776,14 @@ Shows the virtual keyboard if the platform has one. ---- +.. _class_DisplayServer_method_warp_mouse: + +- void **warp_mouse** **(** :ref:`Vector2i` position **)** + +Sets the mouse cursor position to the given ``position`` relative to an origin at the upper left corner of the currently focused game Window Manager window. + +---- + .. _class_DisplayServer_method_window_attach_instance_id: - void **window_attach_instance_id** **(** :ref:`int` instance_id, :ref:`int` window_id=0 **)** diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 7e92bf187..9a6915d20 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -48,7 +48,7 @@ Methods +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_osx_plugin_file` **(** :ref:`String` path **)** | +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags **)** | +| void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`skip` **(** **)** | +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -162,7 +162,7 @@ Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app b .. _class_EditorExportPlugin_method_add_shared_object: -- void **add_shared_object** **(** :ref:`String` path, :ref:`PackedStringArray` tags **)** +- void **add_shared_object** **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** Adds a shared object or a directory containing only shared objects with the given ``tags`` and destination ``path``. diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 8c3b3d113..6d46a1b7a 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -19,11 +19,11 @@ Properties +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`Access` | :ref:`access` | ``0`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_dir` | ``"res://"`` | +| :ref:`String` | :ref:`current_dir` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_file` | ``""`` | +| :ref:`String` | :ref:`current_file` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_path` | ``"res://"`` | +| :ref:`String` | :ref:`current_path` | | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ @@ -158,13 +158,11 @@ The location from which the user may select a file, including ``res://``, ``user - :ref:`String` **current_dir** -+-----------+------------------------+ -| *Default* | ``"res://"`` | -+-----------+------------------------+ -| *Setter* | set_current_dir(value) | -+-----------+------------------------+ -| *Getter* | get_current_dir() | -+-----------+------------------------+ ++----------+------------------------+ +| *Setter* | set_current_dir(value) | ++----------+------------------------+ +| *Getter* | get_current_dir() | ++----------+------------------------+ The currently occupied directory. @@ -174,13 +172,11 @@ The currently occupied directory. - :ref:`String` **current_file** -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_current_file(value) | -+-----------+-------------------------+ -| *Getter* | get_current_file() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_current_file(value) | ++----------+-------------------------+ +| *Getter* | get_current_file() | ++----------+-------------------------+ The currently selected file. @@ -190,13 +186,11 @@ The currently selected file. - :ref:`String` **current_path** -+-----------+-------------------------+ -| *Default* | ``"res://"`` | -+-----------+-------------------------+ -| *Setter* | set_current_path(value) | -+-----------+-------------------------+ -| *Getter* | get_current_path() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_current_path(value) | ++----------+-------------------------+ +| *Getter* | get_current_path() | ++----------+-------------------------+ The file system path in the address bar. diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 06a7d49e1..285575d46 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -23,25 +23,27 @@ This object holds information of all resources in the filesystem, their types, e Methods ------- -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file_type` **(** :ref:`String` path **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem_path` **(** :ref:`String` path **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_scanning_progress` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_scanning` **(** **)** |const| | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scan` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`scan_sources` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_file` **(** :ref:`String` path **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`update_script_classes` **(** **)** | -+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_file_type` **(** :ref:`String` path **)** |const| | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem` **(** **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`EditorFileSystemDirectory` | :ref:`get_filesystem_path` **(** :ref:`String` path **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_scanning_progress` **(** **)** |const| | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_scanning` **(** **)** |const| | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reimport_files` **(** :ref:`PackedStringArray` files **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scan` **(** **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`scan_sources` **(** **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_file` **(** :ref:`String` path **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`update_script_classes` **(** **)** | ++-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -115,7 +117,19 @@ Returns the scan progress for 0 to 1 if the FS is being scanned. - :ref:`bool` **is_scanning** **(** **)** |const| -Returns ``true`` of the filesystem is being scanned. +Returns ``true`` if the filesystem is being scanned. + +---- + +.. _class_EditorFileSystem_method_reimport_files: + +- void **reimport_files** **(** :ref:`PackedStringArray` files **)** + +Reimports a set of files. Call this if these files or their ``.import`` files were directly edited by script or an external program. + +If the file type changed or the file was newly created, use :ref:`update_file` or :ref:`scan`. + +\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files` or :ref:`scan` while an import is in progress. ---- @@ -139,7 +153,9 @@ Check if the source of any imported resource changed. - void **update_file** **(** :ref:`String` path **)** -Update a file information. Call this if an external program (not Godot) modified the file. +Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. + +This will not import the file. To reimport, call :ref:`reimport_files` or :ref:`scan` methods. ---- diff --git a/classes/class_editorfilesystemimportformatsupportquery.rst b/classes/class_editorfilesystemimportformatsupportquery.rst new file mode 100644 index 000000000..957d80165 --- /dev/null +++ b/classes/class_editorfilesystemimportformatsupportquery.rst @@ -0,0 +1,62 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the EditorFileSystemImportFormatSupportQuery.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_EditorFileSystemImportFormatSupportQuery: + +EditorFileSystemImportFormatSupportQuery +======================================== + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Used to query and configure import format support. + +Description +----------- + +This class is used to query and configure a certain import format. It is used in conjunction with asset format import plugins. + +Methods +------- + ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_file_extensions` **(** **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_active` **(** **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_query` **(** **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_EditorFileSystemImportFormatSupportQuery_method__get_file_extensions: + +- :ref:`PackedStringArray` **_get_file_extensions** **(** **)** |virtual| |const| + +Return the file extensions supported. + +---- + +.. _class_EditorFileSystemImportFormatSupportQuery_method__is_active: + +- :ref:`bool` **_is_active** **(** **)** |virtual| |const| + +Return whether this importer is active. + +---- + +.. _class_EditorFileSystemImportFormatSupportQuery_method__query: + +- :ref:`bool` **_query** **(** **)** |virtual| |const| + +Query support. Return false if import must not continue. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index 38d894dd8..9af778759 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -11,14 +11,22 @@ EditorInspector **Inherits:** :ref:`ScrollContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A tab used to edit properties of the selected node. +A control used to edit properties of an object. Description ----------- -The editor inspector is by default located on the right-hand side of the editor. It's used to edit the properties of the selected node. For example, you can select a node such as the Sprite2D then edit its transform through the inspector tool. The editor inspector is an essential tool in the game development workflow. +This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the ``EditorInspector`` used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector`. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_inspector`. +\ ``EditorInspector`` will show properties in the same order as the array returned by :ref:`Object.get_property_list`. + +If a property's name is path-like (i.e. if it contains forward slashes), ``EditorInspector`` will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. + +If a property has :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. ``EditorInspector`` will create a top-level section for each group. For example, if a property with group usage is named ``Collide With`` and its hint string is ``collide_with_``, a subsequent ``collide_with_area`` property will be shown as "Area" inside the "Collide With" section. + +If a property has :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. + +\ **Note:** Unlike sections created from path-like property names, ``EditorInspector`` won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. Properties ---------- diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 5f9b49e92..5d5641370 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -53,7 +53,7 @@ Methods +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_custom_control` **(** :ref:`Control` control **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor **)** | +| void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_property_editor_for_multiple_properties` **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -119,7 +119,7 @@ Adds a custom control, which is not necessarily a property editor. .. _class_EditorInspectorPlugin_method_add_property_editor: -- void **add_property_editor** **(** :ref:`String` property, :ref:`Control` editor **)** +- void **add_property_editor** **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** Adds a property editor for an individual property. The ``editor`` control must extend :ref:`EditorProperty`. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 9d077ab7e..f82b3c416 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -107,6 +107,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInterface` | :ref:`get_editor_interface` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_export_as_menu` **(** **)** | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScriptCreateDialog` | :ref:`get_script_create_dialog` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`UndoRedo` | :ref:`get_undo_redo` **(** **)** | @@ -855,11 +857,19 @@ Returns the :ref:`EditorInterface` object that gives you ---- +.. _class_EditorPlugin_method_get_export_as_menu: + +- :ref:`PopupMenu` **get_export_as_menu** **(** **)** + +Returns the :ref:`PopupMenu` under **Scene > Export As...**. + +---- + .. _class_EditorPlugin_method_get_script_create_dialog: - :ref:`ScriptCreateDialog` **get_script_create_dialog** **(** **)** -Gets the Editor's dialogue used for making scripts. +Gets the Editor's dialog used for making scripts. \ **Note:** Users can configure it before use. diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index e4c883923..6fedf20e0 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -11,7 +11,7 @@ EditorSceneFormatImporter **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorSceneFormatImporterFBX`, :ref:`EditorSceneFormatImporterGLTF` +**Inherited By:** :ref:`EditorSceneFormatImporterBlend`, :ref:`EditorSceneFormatImporterFBX`, :ref:`EditorSceneFormatImporterGLTF` Imports scenes from third-parties' 3D files. @@ -25,19 +25,17 @@ To use ``EditorSceneFormatImporter``, register it using the :ref:`EditorPlugin.a Methods ------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`String` option **)** |virtual| |const| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Animation` | :ref:`_import_animation` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| | ++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Constants --------- @@ -52,6 +50,8 @@ Constants .. _class_EditorSceneFormatImporter_constant_IMPORT_USE_NAMED_SKIN_BINDS: +.. _class_EditorSceneFormatImporter_constant_IMPORT_DISCARD_MESHES_AND_MATERIALS: + - **IMPORT_SCENE** = **1** - **IMPORT_ANIMATION** = **2** @@ -62,6 +62,8 @@ Constants - **IMPORT_USE_NAMED_SKIN_BINDS** = **16** +- **IMPORT_DISCARD_MESHES_AND_MATERIALS** = **32** + Method Descriptions ------------------- @@ -85,13 +87,7 @@ Method Descriptions .. _class_EditorSceneFormatImporter_method__get_option_visibility: -- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`String` option **)** |virtual| |const| - ----- - -.. _class_EditorSceneFormatImporter_method__import_animation: - -- :ref:`Animation` **_import_animation** **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options, :ref:`int` bake_fps **)** |virtual| +- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| ---- diff --git a/classes/class_editorsceneformatimporterblend.rst b/classes/class_editorsceneformatimporterblend.rst new file mode 100644 index 000000000..424f2add7 --- /dev/null +++ b/classes/class_editorsceneformatimporterblend.rst @@ -0,0 +1,34 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the EditorSceneFormatImporterBlend.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_EditorSceneFormatImporterBlend: + +EditorSceneFormatImporterBlend +============================== + +**Inherits:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` + +Importer for Blender's ``.blend`` scene file format. + +Description +----------- + +Imports Blender scenes in the ``.blend`` file format through the glTF 2.0 3D import pipeline. This importer requires Blender to be installed by the user, so that it can be used to export the scene as glTF 2.0. + +The location of the Blender binary is set via the ``filesystem/import/blender/blender3_path`` editor setting. + +This importer is only used if :ref:`ProjectSettings.filesystem/import/blender/enabled` is enabled, otherwise ``.blend`` files present in the project folder are not imported. + +Blend import requires Blender 3.0. + +Internally, the EditorSceneFormatImporterBlend uses the Blender glTF "Use Original" mode to reference external textures. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_editorsceneformatimporterfbx.rst b/classes/class_editorsceneformatimporterfbx.rst index 4baf2d9a6..83fd39ec3 100644 --- a/classes/class_editorsceneformatimporterfbx.rst +++ b/classes/class_editorsceneformatimporterfbx.rst @@ -11,35 +11,16 @@ EditorSceneFormatImporterFBX **Inherits:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -FBX 3D asset importer. +Importer for the ``.fbx`` scene file format. Description ----------- -This is an FBX 3D asset importer with full support for most FBX features. +Imports Autodesk FBX 3D scenes by way of converting them to glTF 2.0 using the FBX2glTF command line tool. -If exporting a FBX scene from Autodesk Maya, use these FBX export settings: +The location of the FBX2glTF binary is set via the ``filesystem/import/fbx/fbx2gltf_path`` editor setting. -:: - - - 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 +This importer is only used if :ref:`ProjectSettings.filesystem/import/fbx/enabled` is enabled, otherwise ``.fbx`` files present in the project folder are not imported. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index 62bffd5e9..e33e9b219 100644 --- a/classes/class_editorscenepostimportplugin.rst +++ b/classes/class_editorscenepostimportplugin.rst @@ -28,9 +28,9 @@ Methods +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_internal_option_update_view_required` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | +| :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`String` option **)** |virtual| |const| | +| :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_internal_process` **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -109,7 +109,7 @@ Return true whether updating the 3D view of the import dialog needs to be update .. _class_EditorScenePostImportPlugin_method__get_internal_option_visibility: -- :ref:`Variant` **_get_internal_option_visibility** **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| +- :ref:`Variant` **_get_internal_option_visibility** **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| Return true or false whether a given option should be visible. Return null to ignore. @@ -117,7 +117,7 @@ Return true or false whether a given option should be visible. Return null to ig .. _class_EditorScenePostImportPlugin_method__get_option_visibility: -- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`String` option **)** |virtual| |const| +- :ref:`Variant` **_get_option_visibility** **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| Return true or false whether a given option should be visible. Return null to ignore. diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 4fd72806c..c367f0bc3 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -21,17 +21,17 @@ This :ref:`Control` node is used in the editor's Inspector dock t Properties ---------- -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`flat` | ``false`` | -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`String` | :ref:`label` | ``""`` | -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`bool` | :ref:`read_only` | ``false`` | -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ -| :ref:`String` | :ref:`suffix` | ``""`` | -+------------------------------------------+-------------------------------------------------------------+---------------------------------------------------------------------+ ++-----------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`flat` | ``false`` | ++-----------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`hide_slider` | ``false`` | ++-----------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`label` | ``""`` | ++-----------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`read_only` | ``false`` | ++-----------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`suffix` | ``""`` | ++-----------------------------+-----------------------------------------------------------------+-----------+ Property Descriptions --------------------- @@ -50,6 +50,22 @@ Property Descriptions ---- +.. _class_EditorSpinSlider_property_hide_slider: + +- :ref:`bool` **hide_slider** + ++-----------+------------------------+ +| *Default* | ``false`` | ++-----------+------------------------+ +| *Setter* | set_hide_slider(value) | ++-----------+------------------------+ +| *Getter* | is_hiding_slider() | ++-----------+------------------------+ + +If ``true``, the slider is hidden. + +---- + .. _class_EditorSpinSlider_property_label: - :ref:`String` **label** diff --git a/classes/class_engine.rst b/classes/class_engine.rst index bf5a42ee8..a67461551 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -59,6 +59,10 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_process_frames` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScriptLanguage` | :ref:`get_script_language` **(** :ref:`int` index **)** |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_script_language_count` **(** **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_singleton` **(** :ref:`StringName` name **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_singleton_list` **(** **)** |const| | @@ -71,6 +75,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_in_physics_frame` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`register_script_language` **(** :ref:`ScriptLanguage` language **)** | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`register_singleton` **(** :ref:`StringName` name, :ref:`Object` instance **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`unregister_singleton` **(** :ref:`StringName` name **)** | @@ -286,6 +292,18 @@ Returns the total number of frames passed since engine initialization which is a ---- +.. _class_Engine_method_get_script_language: + +- :ref:`ScriptLanguage` **get_script_language** **(** :ref:`int` index **)** |const| + +---- + +.. _class_Engine_method_get_script_language_count: + +- :ref:`int` **get_script_language_count** **(** **)** + +---- + .. _class_Engine_method_get_singleton: - :ref:`Object` **get_singleton** **(** :ref:`StringName` name **)** |const| @@ -386,6 +404,12 @@ Returns ``true`` if the game is inside the fixed process and physics phase of th ---- +.. _class_Engine_method_register_script_language: + +- void **register_script_language** **(** :ref:`ScriptLanguage` language **)** + +---- + .. _class_Engine_method_register_singleton: - void **register_singleton** **(** :ref:`StringName` name, :ref:`Object` instance **)** diff --git a/classes/class_engineprofiler.rst b/classes/class_engineprofiler.rst index 9a77de842..57e7d7a7b 100644 --- a/classes/class_engineprofiler.rst +++ b/classes/class_engineprofiler.rst @@ -23,13 +23,13 @@ See :ref:`EngineDebugger` and :ref:`EditorDebuggerPlugin` **(** :ref:`Array` data **)** |virtual| | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` idle_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | -+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_frame` **(** :ref:`Array` data **)** |virtual| | ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | ++------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- @@ -44,9 +44,9 @@ Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_fr .. _class_EngineProfiler_method__tick: -- void **_tick** **(** :ref:`float` frame_time, :ref:`float` idle_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| +- void **_tick** **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| -Called once every engine iteration when the profiler is active with information about the current frame. +Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. ---- diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 015b9874e..31cd5f110 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -167,16 +167,6 @@ Properties +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Vector3` | :ref:`sky_rotation` | ``Vector3(0, 0, 0)`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ss_reflections_depth_tolerance` | ``0.2`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`bool` | :ref:`ss_reflections_enabled` | ``false`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ss_reflections_fade_in` | ``0.15`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`float` | :ref:`ss_reflections_fade_out` | ``2.0`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`ss_reflections_max_steps` | ``64`` | -+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`float` | :ref:`ssao_ao_channel_affect` | ``0.0`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`float` | :ref:`ssao_detail` | ``0.5`` | @@ -205,6 +195,16 @@ Properties +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`float` | :ref:`ssil_sharpness` | ``0.98`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`float` | :ref:`ssr_depth_tolerance` | ``0.2`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`bool` | :ref:`ssr_enabled` | ``false`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`float` | :ref:`ssr_fade_in` | ``0.15`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`float` | :ref:`ssr_fade_out` | ``2.0`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`int` | :ref:`ssr_max_steps` | ``64`` | ++------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`float` | :ref:`tonemap_exposure` | ``1.0`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`ToneMapper` | :ref:`tonemap_mode` | ``0`` | @@ -296,9 +296,9 @@ enum **AmbientSource**: - **AMBIENT_SOURCE_BG** = **0** --- Gather ambient light from whichever source is specified as the background. -- **AMBIENT_SOURCE_DISABLED** = **1** --- Disable ambient light. +- **AMBIENT_SOURCE_DISABLED** = **1** --- Disable ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. -- **AMBIENT_SOURCE_COLOR** = **2** --- Specify a specific :ref:`Color` for ambient light. +- **AMBIENT_SOURCE_COLOR** = **2** --- Specify a specific :ref:`Color` for ambient light. This provides a slight performance boost over :ref:`AMBIENT_SOURCE_SKY`. - **AMBIENT_SOURCE_SKY** = **3** --- Gather ambient light from the :ref:`Sky` regardless of what the background is. @@ -316,7 +316,7 @@ enum **ReflectionSource**: - **REFLECTION_SOURCE_BG** = **0** --- Use the background for reflections. -- **REFLECTION_SOURCE_DISABLED** = **1** --- Disable reflections. +- **REFLECTION_SOURCE_DISABLED** = **1** --- Disable reflections. This provides a slight performance boost over other options. - **REFLECTION_SOURCE_SKY** = **2** --- Use the :ref:`Sky` for reflections regardless of what the background is. @@ -334,13 +334,15 @@ enum **ReflectionSource**: enum **ToneMapper**: -- **TONE_MAPPER_LINEAR** = **0** --- Linear tonemapper operator. Reads the linear data and passes it on unmodified. +- **TONE_MAPPER_LINEAR** = **0** --- Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. -- **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. +- **TONE_MAPPER_REINHARDT** = **1** --- Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. -- **TONE_MAPPER_FILMIC** = **2** --- Filmic tonemapper operator. +- **TONE_MAPPER_FILMIC** = **2** --- Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`TONE_MAPPER_REINHARDT`. -- **TONE_MAPPER_ACES** = **3** --- Academy Color Encoding System tonemapper operator. +- **TONE_MAPPER_ACES** = **3** --- Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`TONE_MAPPER_REINHARDT` and :ref:`TONE_MAPPER_FILMIC`. + +\ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. ---- @@ -380,11 +382,11 @@ enum **GlowBlendMode**: enum **SDFGIYScale**: -- **SDFGI_Y_SCALE_50_PERCENT** = **0** +- **SDFGI_Y_SCALE_50_PERCENT** = **0** --- Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. -- **SDFGI_Y_SCALE_75_PERCENT** = **1** +- **SDFGI_Y_SCALE_75_PERCENT** = **1** --- Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. -- **SDFGI_Y_SCALE_100_PERCENT** = **2** +- **SDFGI_Y_SCALE_100_PERCENT** = **2** --- Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. Property Descriptions --------------------- @@ -479,7 +481,7 @@ The global color saturation value of the rendered scene (default value is 1). Ef | *Getter* | get_ambient_light_color() | +-----------+--------------------------------+ -The ambient light's :ref:`Color`. +The ambient light's :ref:`Color`. Only effective if :ref:`ambient_light_sky_contribution` is lower than ``1.0`` (exclusive). ---- @@ -495,7 +497,7 @@ The ambient light's :ref:`Color`. | *Getter* | get_ambient_light_energy() | +-----------+---------------------------------+ -The ambient light's energy. The higher the value, the stronger the light. +The ambient light's energy. The higher the value, the stronger the light. Only effective if :ref:`ambient_light_sky_contribution` is lower than ``1.0`` (exclusive). ---- @@ -529,6 +531,8 @@ Defines the amount of light that the sky brings on the scene. A value of ``0.0`` | *Getter* | get_ambient_source() | +-----------+---------------------------+ +The ambient light source to use for rendering materials and global illumination. + ---- .. _class_Environment_property_auto_exposure_enabled: @@ -721,6 +725,8 @@ This is useful to simulate `aerial perspective ` | *Getter* | get_glow_mix() | +-----------+---------------------+ +When using the :ref:`GLOW_BLEND_MODE_MIX` :ref:`glow_blend_mode`, this controls how much the source image is blended with the glow layer. A value of ``0.0`` makes the glow rendering invisible, while a value of ``1.0`` is equivalent to :ref:`GLOW_BLEND_MODE_REPLACE`. + ---- .. _class_Environment_property_glow_normalized: @@ -1127,6 +1141,8 @@ The strength of the glow effect. This applies as the glow is blurred across the | *Getter* | get_reflection_source() | +-----------+------------------------------+ +The reflected (specular) light source. + ---- .. _class_Environment_property_sdfgi_bounce_feedback: @@ -1141,6 +1157,12 @@ The strength of the glow effect. This applies as the glow is blurred across the | *Getter* | get_sdfgi_bounce_feedback() | +-----------+----------------------------------+ +The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than ``0.0`` will simulate multiple bounces, resulting in a more realistic appearance. Increasing :ref:`sdfgi_bounce_feedback` generally has no performance impact. See also :ref:`sdfgi_energy`. + +\ **Note:** Values greater than ``0.5`` can cause infinite feedback loops and should be avoided in scenes with bright materials. + +\ **Note:** If :ref:`sdfgi_bounce_feedback` is ``0.0``, indirect lighting will not be represented in reflections as light will only bounce one time. + ---- .. _class_Environment_property_sdfgi_cascade0_distance: @@ -1155,6 +1177,8 @@ The strength of the glow effect. This applies as the glow is blurred across the | *Getter* | get_sdfgi_cascade0_distance() | +-----------+------------------------------------+ +**Note:** This property is linked to :ref:`sdfgi_min_cell_size` and :ref:`sdfgi_max_distance`. Changing its value will automatically change those properties as well. + ---- .. _class_Environment_property_sdfgi_cascades: @@ -1205,6 +1229,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_energy() | +-----------+-------------------------+ +The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also :ref:`sdfgi_bounce_feedback`. + ---- .. _class_Environment_property_sdfgi_max_distance: @@ -1219,6 +1245,10 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_max_distance() | +-----------+-------------------------------+ +The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as :ref:`ReflectionProbe` will be used as a fallback. + +\ **Note:** This property is linked to :ref:`sdfgi_min_cell_size` and :ref:`sdfgi_cascade0_distance`. Changing its value will automatically change those properties as well. + ---- .. _class_Environment_property_sdfgi_min_cell_size: @@ -1233,6 +1263,10 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_min_cell_size() | +-----------+--------------------------------+ +The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. + +\ **Note:** This property is linked to :ref:`sdfgi_max_distance` and :ref:`sdfgi_cascade0_distance`. Changing its value will automatically change those properties as well. + ---- .. _class_Environment_property_sdfgi_normal_bias: @@ -1247,6 +1281,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_normal_bias() | +-----------+------------------------------+ +The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. + ---- .. _class_Environment_property_sdfgi_probe_bias: @@ -1261,6 +1297,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_probe_bias() | +-----------+-----------------------------+ +The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. + ---- .. _class_Environment_property_sdfgi_read_sky_light: @@ -1275,6 +1313,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | is_sdfgi_reading_sky_light() | +-----------+---------------------------------+ +If ``true``, SDFGI takes the environment lighting into account. This should be set to ``false`` for interior scenes. + ---- .. _class_Environment_property_sdfgi_use_occlusion: @@ -1289,6 +1329,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | is_sdfgi_using_occlusion() | +-----------+--------------------------------+ +If ``true``, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. :ref:`sdfgi_use_occlusion` has a performance impact and should only be enabled when needed. + ---- .. _class_Environment_property_sdfgi_y_scale: @@ -1303,6 +1345,8 @@ If ``true``, enables signed distance field global illumination for meshes that h | *Getter* | get_sdfgi_y_scale() | +-----------+--------------------------+ +The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. :ref:`sdfgi_y_scale` should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). + ---- .. _class_Environment_property_sky: @@ -1331,6 +1375,8 @@ The :ref:`Sky` resource used for this ``Environment``. | *Getter* | get_sky_custom_fov() | +-----------+---------------------------+ +If set to a value greater than ``0.0``, overrides the field of view to use for sky rendering. If set to ``0.0``, the same FOV as the current :ref:`Camera3D` is used for sky rendering. + ---- .. _class_Environment_property_sky_rotation: @@ -1345,85 +1391,7 @@ The :ref:`Sky` resource used for this ``Environment``. | *Getter* | get_sky_rotation() | +-----------+-------------------------+ ----- - -.. _class_Environment_property_ss_reflections_depth_tolerance: - -- :ref:`float` **ss_reflections_depth_tolerance** - -+-----------+--------------------------------+ -| *Default* | ``0.2`` | -+-----------+--------------------------------+ -| *Setter* | set_ssr_depth_tolerance(value) | -+-----------+--------------------------------+ -| *Getter* | get_ssr_depth_tolerance() | -+-----------+--------------------------------+ - -The depth tolerance for screen-space reflections. - ----- - -.. _class_Environment_property_ss_reflections_enabled: - -- :ref:`bool` **ss_reflections_enabled** - -+-----------+------------------------+ -| *Default* | ``false`` | -+-----------+------------------------+ -| *Setter* | set_ssr_enabled(value) | -+-----------+------------------------+ -| *Getter* | is_ssr_enabled() | -+-----------+------------------------+ - -If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`VoxelGI`\ s or :ref:`ReflectionProbe`\ s, but are slower and can't reflect surfaces occluded by others. - ----- - -.. _class_Environment_property_ss_reflections_fade_in: - -- :ref:`float` **ss_reflections_fade_in** - -+-----------+------------------------+ -| *Default* | ``0.15`` | -+-----------+------------------------+ -| *Setter* | set_ssr_fade_in(value) | -+-----------+------------------------+ -| *Getter* | get_ssr_fade_in() | -+-----------+------------------------+ - -The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to ``0.0``). - ----- - -.. _class_Environment_property_ss_reflections_fade_out: - -- :ref:`float` **ss_reflections_fade_out** - -+-----------+-------------------------+ -| *Default* | ``2.0`` | -+-----------+-------------------------+ -| *Setter* | set_ssr_fade_out(value) | -+-----------+-------------------------+ -| *Getter* | get_ssr_fade_out() | -+-----------+-------------------------+ - -The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to ``0.0``). - ----- - -.. _class_Environment_property_ss_reflections_max_steps: - -- :ref:`int` **ss_reflections_max_steps** - -+-----------+--------------------------+ -| *Default* | ``64`` | -+-----------+--------------------------+ -| *Setter* | set_ssr_max_steps(value) | -+-----------+--------------------------+ -| *Getter* | get_ssr_max_steps() | -+-----------+--------------------------+ - -The maximum number of steps for screen-space reflections. Higher values are slower. +The rotation to use for sky rendering. ---- @@ -1651,6 +1619,86 @@ The amount that the screen-space indirect lighting effect is allowed to blur ove ---- +.. _class_Environment_property_ssr_depth_tolerance: + +- :ref:`float` **ssr_depth_tolerance** + ++-----------+--------------------------------+ +| *Default* | ``0.2`` | ++-----------+--------------------------------+ +| *Setter* | set_ssr_depth_tolerance(value) | ++-----------+--------------------------------+ +| *Getter* | get_ssr_depth_tolerance() | ++-----------+--------------------------------+ + +The depth tolerance for screen-space reflections. + +---- + +.. _class_Environment_property_ssr_enabled: + +- :ref:`bool` **ssr_enabled** + ++-----------+------------------------+ +| *Default* | ``false`` | ++-----------+------------------------+ +| *Setter* | set_ssr_enabled(value) | ++-----------+------------------------+ +| *Getter* | is_ssr_enabled() | ++-----------+------------------------+ + +If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`VoxelGI`\ s or :ref:`ReflectionProbe`\ s, but are slower and can't reflect surfaces occluded by others. + +---- + +.. _class_Environment_property_ssr_fade_in: + +- :ref:`float` **ssr_fade_in** + ++-----------+------------------------+ +| *Default* | ``0.15`` | ++-----------+------------------------+ +| *Setter* | set_ssr_fade_in(value) | ++-----------+------------------------+ +| *Getter* | get_ssr_fade_in() | ++-----------+------------------------+ + +The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to ``0.0``). + +---- + +.. _class_Environment_property_ssr_fade_out: + +- :ref:`float` **ssr_fade_out** + ++-----------+-------------------------+ +| *Default* | ``2.0`` | ++-----------+-------------------------+ +| *Setter* | set_ssr_fade_out(value) | ++-----------+-------------------------+ +| *Getter* | get_ssr_fade_out() | ++-----------+-------------------------+ + +The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to ``0.0``). + +---- + +.. _class_Environment_property_ssr_max_steps: + +- :ref:`int` **ssr_max_steps** + ++-----------+--------------------------+ +| *Default* | ``64`` | ++-----------+--------------------------+ +| *Setter* | set_ssr_max_steps(value) | ++-----------+--------------------------+ +| *Getter* | get_ssr_max_steps() | ++-----------+--------------------------+ + +The maximum number of steps for screen-space reflections. Higher values are slower. + +---- + .. _class_Environment_property_tonemap_exposure: - :ref:`float` **tonemap_exposure** @@ -1663,7 +1711,7 @@ The amount that the screen-space indirect lighting effect is allowed to blur ove | *Getter* | get_tonemap_exposure() | +-----------+-----------------------------+ -The default exposure used for tonemapping. +The default exposure used for tonemapping. Higher values result in a brighter image. See also :ref:`tonemap_white`. ---- @@ -1695,7 +1743,7 @@ The tonemapping mode to use. Tonemapping is the process that "converts" HDR valu | *Getter* | get_tonemap_white() | +-----------+--------------------------+ -The white reference value for tonemapping. Only effective if the :ref:`tonemap_mode` isn't set to :ref:`TONE_MAPPER_LINEAR`. +The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the :ref:`tonemap_mode` isn't set to :ref:`TONE_MAPPER_LINEAR`. See also :ref:`tonemap_exposure`. ---- diff --git a/classes/class_fastnoiselite.rst b/classes/class_fastnoiselite.rst new file mode 100644 index 000000000..f87847cef --- /dev/null +++ b/classes/class_fastnoiselite.rst @@ -0,0 +1,563 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the FastNoiseLite.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_FastNoiseLite: + +FastNoiseLite +============= + +**Inherits:** :ref:`Noise` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Generates noise using the FastNoiseLite library. + +Description +----------- + +This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more. + +Most generated noise values are in the range of ``[-1,1]``, however not always. Some of the cellular noise algorithms return results above ``1``. + +Properties +---------- + ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`CellularDistanceFunction` | :ref:`cellular_distance_function` | ``0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`cellular_jitter` | ``0.45`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`CellularReturnType` | :ref:`cellular_return_type` | ``1`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`domain_warp_amplitude` | ``30.0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`domain_warp_enabled` | ``false`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`domain_warp_fractal_gain` | ``0.5`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`domain_warp_fractal_lacunarity` | ``6.0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`domain_warp_fractal_octaves` | ``5`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`DomainWarpFractalType` | :ref:`domain_warp_fractal_type` | ``1`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`domain_warp_frequency` | ``0.05`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`DomainWarpType` | :ref:`domain_warp_type` | ``0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`fractal_gain` | ``0.5`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`fractal_lacunarity` | ``2.0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`fractal_octaves` | ``5`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`fractal_ping_pong_strength` | ``2.0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`FractalType` | :ref:`fractal_type` | ``1`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`fractal_weighted_strength` | ``0.0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`float` | :ref:`frequency` | ``0.01`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`NoiseType` | :ref:`noise_type` | ``1`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`offset` | ``Vector3(0, 0, 0)`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`int` | :ref:`seed` | ``0`` | ++------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + +Enumerations +------------ + +.. _enum_FastNoiseLite_NoiseType: + +.. _class_FastNoiseLite_constant_TYPE_VALUE: + +.. _class_FastNoiseLite_constant_TYPE_VALUE_CUBIC: + +.. _class_FastNoiseLite_constant_TYPE_PERLIN: + +.. _class_FastNoiseLite_constant_TYPE_CELLULAR: + +.. _class_FastNoiseLite_constant_TYPE_SIMPLEX: + +.. _class_FastNoiseLite_constant_TYPE_SIMPLEX_SMOOTH: + +enum **NoiseType**: + +- **TYPE_VALUE** = **5** --- A lattice of points are assigned random values then interpolated based on neighboring values. + +- **TYPE_VALUE_CUBIC** = **4** --- Similar to Value noise, but slower. Has more variance in peaks and valleys. + +Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap. + +- **TYPE_PERLIN** = **3** --- A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. + +- **TYPE_CELLULAR** = **2** --- Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. + +- **TYPE_SIMPLEX** = **0** --- As opposed to :ref:`TYPE_PERLIN`, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. + +- **TYPE_SIMPLEX_SMOOTH** = **1** --- Modified, higher quality version of :ref:`TYPE_SIMPLEX`, but slower. + +---- + +.. _enum_FastNoiseLite_FractalType: + +.. _class_FastNoiseLite_constant_FRACTAL_NONE: + +.. _class_FastNoiseLite_constant_FRACTAL_FBM: + +.. _class_FastNoiseLite_constant_FRACTAL_RIDGED: + +.. _class_FastNoiseLite_constant_FRACTAL_PING_PONG: + +enum **FractalType**: + +- **FRACTAL_NONE** = **0** --- No fractal noise. + +- **FRACTAL_FBM** = **1** --- Method using Fractional Brownian Motion to combine octaves into a fractal. + +- **FRACTAL_RIDGED** = **2** --- Method of combining octaves into a fractal resulting in a "ridged" look. + +- **FRACTAL_PING_PONG** = **3** --- Method of combining octaves into a fractal with a ping pong effect. + +---- + +.. _enum_FastNoiseLite_CellularDistanceFunction: + +.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN: + +.. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN_SQUARED: + +.. _class_FastNoiseLite_constant_DISTANCE_MANHATTAN: + +.. _class_FastNoiseLite_constant_DISTANCE_HYBRID: + +enum **CellularDistanceFunction**: + +- **DISTANCE_EUCLIDEAN** = **0** --- Euclidean distance to the nearest point. + +- **DISTANCE_EUCLIDEAN_SQUARED** = **1** --- Squared Euclidean distance to the nearest point. + +- **DISTANCE_MANHATTAN** = **2** --- Manhattan distance (taxicab metric) to the nearest point. + +- **DISTANCE_HYBRID** = **3** --- Blend of :ref:`DISTANCE_EUCLIDEAN` and :ref:`DISTANCE_MANHATTAN` to give curved cell boundaries + +---- + +.. _enum_FastNoiseLite_CellularReturnType: + +.. _class_FastNoiseLite_constant_RETURN_CELL_VALUE: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_ADD: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_SUB: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_MUL: + +.. _class_FastNoiseLite_constant_RETURN_DISTANCE2_DIV: + +enum **CellularReturnType**: + +- **RETURN_CELL_VALUE** = **0** --- The cellular distance function will return the same value for all points within a cell. + +- **RETURN_DISTANCE** = **1** --- The cellular distance function will return a value determined by the distance to the nearest point. + +- **RETURN_DISTANCE2** = **2** --- The cellular distance function returns the distance to the second-nearest point. + +- **RETURN_DISTANCE2_ADD** = **3** --- The distance to the nearest point is added to the distance to the second-nearest point. + +- **RETURN_DISTANCE2_SUB** = **4** --- The distance to the nearest point is subtracted from the distance to the second-nearest point. + +- **RETURN_DISTANCE2_MUL** = **5** --- The distance to the nearest point is multiplied with the distance to the second-nearest point. + +- **RETURN_DISTANCE2_DIV** = **6** --- The distance to the nearest point is divided by the distance to the second-nearest point. + +---- + +.. _enum_FastNoiseLite_DomainWarpType: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX_REDUCED: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_BASIC_GRID: + +enum **DomainWarpType**: + +- **DOMAIN_WARP_SIMPLEX** = **0** --- The domain is warped using the simplex noise algorithm. + +- **DOMAIN_WARP_SIMPLEX_REDUCED** = **1** --- The domain is warped using a simplified version of the simplex noise algorithm. + +- **DOMAIN_WARP_BASIC_GRID** = **2** --- The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). + +---- + +.. _enum_FastNoiseLite_DomainWarpFractalType: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_PROGRESSIVE: + +.. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_INDEPENDENT: + +enum **DomainWarpFractalType**: + +- **DOMAIN_WARP_FRACTAL_NONE** = **0** --- No fractal noise for warping the space. + +- **DOMAIN_WARP_FRACTAL_PROGRESSIVE** = **1** --- Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. + +- **DOMAIN_WARP_FRACTAL_INDEPENDENT** = **2** --- Warping the space independently for each octave, resulting in a more chaotic distortion. + +Property Descriptions +--------------------- + +.. _class_FastNoiseLite_property_cellular_distance_function: + +- :ref:`CellularDistanceFunction` **cellular_distance_function** + ++-----------+---------------------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------------------+ +| *Setter* | set_cellular_distance_function(value) | ++-----------+---------------------------------------+ +| *Getter* | get_cellular_distance_function() | ++-----------+---------------------------------------+ + +Determines how the distance to the nearest/second-nearest point is computed. See :ref:`CellularDistanceFunction` for options. + +---- + +.. _class_FastNoiseLite_property_cellular_jitter: + +- :ref:`float` **cellular_jitter** + ++-----------+----------------------------+ +| *Default* | ``0.45`` | ++-----------+----------------------------+ +| *Setter* | set_cellular_jitter(value) | ++-----------+----------------------------+ +| *Getter* | get_cellular_jitter() | ++-----------+----------------------------+ + +Maximum distance a point can move off of its grid position. Set to ``0`` for an even grid. + +---- + +.. _class_FastNoiseLite_property_cellular_return_type: + +- :ref:`CellularReturnType` **cellular_return_type** + ++-----------+---------------------------------+ +| *Default* | ``1`` | ++-----------+---------------------------------+ +| *Setter* | set_cellular_return_type(value) | ++-----------+---------------------------------+ +| *Getter* | get_cellular_return_type() | ++-----------+---------------------------------+ + +Return type from cellular noise calculations. See :ref:`CellularReturnType`. + +---- + +.. _class_FastNoiseLite_property_domain_warp_amplitude: + +- :ref:`float` **domain_warp_amplitude** + ++-----------+----------------------------------+ +| *Default* | ``30.0`` | ++-----------+----------------------------------+ +| *Setter* | set_domain_warp_amplitude(value) | ++-----------+----------------------------------+ +| *Getter* | get_domain_warp_amplitude() | ++-----------+----------------------------------+ + +Sets the maximum warp distance from the origin. + +---- + +.. _class_FastNoiseLite_property_domain_warp_enabled: + +- :ref:`bool` **domain_warp_enabled** + ++-----------+--------------------------------+ +| *Default* | ``false`` | ++-----------+--------------------------------+ +| *Setter* | set_domain_warp_enabled(value) | ++-----------+--------------------------------+ +| *Getter* | is_domain_warp_enabled() | ++-----------+--------------------------------+ + +If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. + +---- + +.. _class_FastNoiseLite_property_domain_warp_fractal_gain: + +- :ref:`float` **domain_warp_fractal_gain** + ++-----------+-------------------------------------+ +| *Default* | ``0.5`` | ++-----------+-------------------------------------+ +| *Setter* | set_domain_warp_fractal_gain(value) | ++-----------+-------------------------------------+ +| *Getter* | get_domain_warp_fractal_gain() | ++-----------+-------------------------------------+ + +Determines the strength of each subsequent layer of the noise which is used to warp the space. + +A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + +---- + +.. _class_FastNoiseLite_property_domain_warp_fractal_lacunarity: + +- :ref:`float` **domain_warp_fractal_lacunarity** + ++-----------+-------------------------------------------+ +| *Default* | ``6.0`` | ++-----------+-------------------------------------------+ +| *Setter* | set_domain_warp_fractal_lacunarity(value) | ++-----------+-------------------------------------------+ +| *Getter* | get_domain_warp_fractal_lacunarity() | ++-----------+-------------------------------------------+ + +Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. + +---- + +.. _class_FastNoiseLite_property_domain_warp_fractal_octaves: + +- :ref:`int` **domain_warp_fractal_octaves** + ++-----------+----------------------------------------+ +| *Default* | ``5`` | ++-----------+----------------------------------------+ +| *Setter* | set_domain_warp_fractal_octaves(value) | ++-----------+----------------------------------------+ +| *Getter* | get_domain_warp_fractal_octaves() | ++-----------+----------------------------------------+ + +The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. + +---- + +.. _class_FastNoiseLite_property_domain_warp_fractal_type: + +- :ref:`DomainWarpFractalType` **domain_warp_fractal_type** + ++-----------+-------------------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------------------+ +| *Setter* | set_domain_warp_fractal_type(value) | ++-----------+-------------------------------------+ +| *Getter* | get_domain_warp_fractal_type() | ++-----------+-------------------------------------+ + +The method for combining octaves into a fractal which is used to warp the space. See :ref:`DomainWarpFractalType`. + +---- + +.. _class_FastNoiseLite_property_domain_warp_frequency: + +- :ref:`float` **domain_warp_frequency** + ++-----------+----------------------------------+ +| *Default* | ``0.05`` | ++-----------+----------------------------------+ +| *Setter* | set_domain_warp_frequency(value) | ++-----------+----------------------------------+ +| *Getter* | get_domain_warp_frequency() | ++-----------+----------------------------------+ + +Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. + +---- + +.. _class_FastNoiseLite_property_domain_warp_type: + +- :ref:`DomainWarpType` **domain_warp_type** + ++-----------+-----------------------------+ +| *Default* | ``0`` | ++-----------+-----------------------------+ +| *Setter* | set_domain_warp_type(value) | ++-----------+-----------------------------+ +| *Getter* | get_domain_warp_type() | ++-----------+-----------------------------+ + +Sets the warp algorithm. See :ref:`DomainWarpType`. + +---- + +.. _class_FastNoiseLite_property_fractal_gain: + +- :ref:`float` **fractal_gain** + ++-----------+-------------------------+ +| *Default* | ``0.5`` | ++-----------+-------------------------+ +| *Setter* | set_fractal_gain(value) | ++-----------+-------------------------+ +| *Getter* | get_fractal_gain() | ++-----------+-------------------------+ + +Determines the strength of each subsequent layer of noise in fractal noise. + +A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + +---- + +.. _class_FastNoiseLite_property_fractal_lacunarity: + +- :ref:`float` **fractal_lacunarity** + ++-----------+-------------------------------+ +| *Default* | ``2.0`` | ++-----------+-------------------------------+ +| *Setter* | set_fractal_lacunarity(value) | ++-----------+-------------------------------+ +| *Getter* | get_fractal_lacunarity() | ++-----------+-------------------------------+ + +Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. + +---- + +.. _class_FastNoiseLite_property_fractal_octaves: + +- :ref:`int` **fractal_octaves** + ++-----------+----------------------------+ +| *Default* | ``5`` | ++-----------+----------------------------+ +| *Setter* | set_fractal_octaves(value) | ++-----------+----------------------------+ +| *Getter* | get_fractal_octaves() | ++-----------+----------------------------+ + +The number of noise layers that are sampled to get the final value for fractal noise types. + +---- + +.. _class_FastNoiseLite_property_fractal_ping_pong_strength: + +- :ref:`float` **fractal_ping_pong_strength** + ++-----------+---------------------------------------+ +| *Default* | ``2.0`` | ++-----------+---------------------------------------+ +| *Setter* | set_fractal_ping_pong_strength(value) | ++-----------+---------------------------------------+ +| *Getter* | get_fractal_ping_pong_strength() | ++-----------+---------------------------------------+ + +Sets the strength of the fractal ping pong type. + +---- + +.. _class_FastNoiseLite_property_fractal_type: + +- :ref:`FractalType` **fractal_type** + ++-----------+-------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------+ +| *Setter* | set_fractal_type(value) | ++-----------+-------------------------+ +| *Getter* | get_fractal_type() | ++-----------+-------------------------+ + +The method for combining octaves into a fractal. See :ref:`FractalType`. + +---- + +.. _class_FastNoiseLite_property_fractal_weighted_strength: + +- :ref:`float` **fractal_weighted_strength** + ++-----------+--------------------------------------+ +| *Default* | ``0.0`` | ++-----------+--------------------------------------+ +| *Setter* | set_fractal_weighted_strength(value) | ++-----------+--------------------------------------+ +| *Getter* | get_fractal_weighted_strength() | ++-----------+--------------------------------------+ + +Higher weighting means higher octaves have less impact if lower octaves have a large impact. + +---- + +.. _class_FastNoiseLite_property_frequency: + +- :ref:`float` **frequency** + ++-----------+----------------------+ +| *Default* | ``0.01`` | ++-----------+----------------------+ +| *Setter* | set_frequency(value) | ++-----------+----------------------+ +| *Getter* | get_frequency() | ++-----------+----------------------+ + +The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. + +---- + +.. _class_FastNoiseLite_property_noise_type: + +- :ref:`NoiseType` **noise_type** + ++-----------+-----------------------+ +| *Default* | ``1`` | ++-----------+-----------------------+ +| *Setter* | set_noise_type(value) | ++-----------+-----------------------+ +| *Getter* | get_noise_type() | ++-----------+-----------------------+ + +The noise algorithm used. See :ref:`NoiseType`. + +---- + +.. _class_FastNoiseLite_property_offset: + +- :ref:`Vector3` **offset** + ++-----------+----------------------+ +| *Default* | ``Vector3(0, 0, 0)`` | ++-----------+----------------------+ +| *Setter* | set_offset(value) | ++-----------+----------------------+ +| *Getter* | get_offset() | ++-----------+----------------------+ + +Translate the noise input coordinates by the given :ref:`Vector3`. + +---- + +.. _class_FastNoiseLite_property_seed: + +- :ref:`int` **seed** + ++-----------+-----------------+ +| *Default* | ``0`` | ++-----------+-----------------+ +| *Setter* | set_seed(value) | ++-----------+-----------------+ +| *Getter* | get_seed() | ++-----------+-----------------+ + +The random number seed for all noise types. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_file.rst b/classes/class_file.rst index 0e23b8178..ac2ea6cd3 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -87,7 +87,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`eof_reached` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |const| | +| :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** |static| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`flush` **(** **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -280,7 +280,7 @@ Returns ``true`` if the file cursor has already read past the end of the file. .. _class_File_method_file_exists: -- :ref:`bool` **file_exists** **(** :ref:`String` path **)** |const| +- :ref:`bool` **file_exists** **(** :ref:`String` path **)** |static| Returns ``true`` if the file exists in the given path. diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 750b3ba30..6b289f9a8 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -24,11 +24,11 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`Access` | :ref:`access` | ``0`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_dir` | ``"res://"`` | +| :ref:`String` | :ref:`current_dir` | | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_file` | ``""`` | +| :ref:`String` | :ref:`current_file` | | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`current_path` | ``"res://"`` | +| :ref:`String` | :ref:`current_path` | | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog`) | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ @@ -63,27 +63,27 @@ Methods Theme Properties ---------------- -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Color` | :ref:`file_icon_modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Color` | :ref:`files_disabled` | ``Color(0, 0, 0, 0.7)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Color` | :ref:`folder_icon_modulate` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`back_folder` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`file` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`folder` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`forward_folder` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`parent_folder` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`reload` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ -| :ref:`Texture2D` | :ref:`toggle_hidden` | | -+-----------------------------------+--------------------------------------------------------------------------------+-------------------------+ ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`file_icon_modulate` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`files_disabled` | ``Color(1, 1, 1, 0.25)`` | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`folder_icon_modulate` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`back_folder` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`file` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`folder` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`forward_folder` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`parent_folder` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`reload` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`toggle_hidden` | | ++-----------------------------------+--------------------------------------------------------------------------------+--------------------------+ Signals ------- @@ -180,13 +180,11 @@ The file system access scope. See enum ``Access`` constants. - :ref:`String` **current_dir** -+-----------+------------------------+ -| *Default* | ``"res://"`` | -+-----------+------------------------+ -| *Setter* | set_current_dir(value) | -+-----------+------------------------+ -| *Getter* | get_current_dir() | -+-----------+------------------------+ ++----------+------------------------+ +| *Setter* | set_current_dir(value) | ++----------+------------------------+ +| *Getter* | get_current_dir() | ++----------+------------------------+ The current working directory of the file dialog. @@ -196,13 +194,11 @@ The current working directory of the file dialog. - :ref:`String` **current_file** -+-----------+-------------------------+ -| *Default* | ``""`` | -+-----------+-------------------------+ -| *Setter* | set_current_file(value) | -+-----------+-------------------------+ -| *Getter* | get_current_file() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_current_file(value) | ++----------+-------------------------+ +| *Getter* | get_current_file() | ++----------+-------------------------+ The currently selected file of the file dialog. @@ -212,13 +208,11 @@ The currently selected file of the file dialog. - :ref:`String` **current_path** -+-----------+-------------------------+ -| *Default* | ``"res://"`` | -+-----------+-------------------------+ -| *Setter* | set_current_path(value) | -+-----------+-------------------------+ -| *Getter* | get_current_path() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_current_path(value) | ++----------+-------------------------+ +| *Getter* | get_current_path() | ++----------+-------------------------+ The currently selected file path of the file dialog. @@ -362,9 +356,9 @@ The color modulation applied to the file icon. - :ref:`Color` **files_disabled** -+-----------+-------------------------+ -| *Default* | ``Color(0, 0, 0, 0.7)`` | -+-----------+-------------------------+ ++-----------+--------------------------+ +| *Default* | ``Color(1, 1, 1, 0.25)`` | ++-----------+--------------------------+ The color tint for disabled files (when the ``FileDialog`` is used in open folder mode). diff --git a/classes/class_float.rst b/classes/class_float.rst index 789a15a96..6dbf5c300 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -43,8 +43,6 @@ Constructors Operators --------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ @@ -66,6 +64,10 @@ Operators +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator *` **(** :ref:`int` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`operator **` **(** :ref:`int` right **)** | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator +` **(** :ref:`int` right **)** | @@ -86,8 +88,6 @@ Operators +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`int` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | @@ -137,10 +137,6 @@ Operator Descriptions .. _class_float_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`float` right **)** Returns ``true`` if two floats are different from each other. @@ -219,6 +215,16 @@ Multiplies a ``float`` and an :ref:`int`. The result is a ``float``. ---- +.. _class_float_operator_pow_float: + +- :ref:`float` **operator **** **(** :ref:`float` right **)** + +---- + +- :ref:`float` **operator **** **(** :ref:`int` right **)** + +---- + .. _class_float_operator_sum_float: - :ref:`float` **operator +** **(** :ref:`float` right **)** @@ -291,10 +297,6 @@ Returns ``true`` if this ``float`` is less than or equal to the given :ref:`int< .. _class_float_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`float` right **)** Returns ``true`` if both floats are exactly equal. diff --git a/classes/class_fogvolume.rst b/classes/class_fogvolume.rst index 8827430fc..fc8d675a9 100644 --- a/classes/class_fogvolume.rst +++ b/classes/class_fogvolume.rst @@ -28,7 +28,7 @@ Properties +------------------------------------------------------------+----------------------------------------------------+----------------------+ | :ref:`Material` | :ref:`material` | | +------------------------------------------------------------+----------------------------------------------------+----------------------+ -| :ref:`FogVolumeShape` | :ref:`shape` | ``1`` | +| :ref:`FogVolumeShape` | :ref:`shape` | ``3`` | +------------------------------------------------------------+----------------------------------------------------+----------------------+ Property Descriptions @@ -46,10 +46,12 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ -Sets the size of the ``FogVolume`` when :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`. +Sets the size of the ``FogVolume`` when :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`. \ **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth` (at a performance cost) or by decreasing :ref:`Environment.volumetric_fog_length` (at no performance cost, but at the cost of lower fog range). Alternatively, the ``FogVolume`` can be made thicker and use a lower density in the :ref:`material`. +\ **Note:** If :ref:`shape` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the :ref:`extents` property is not supported, but you can scale the ``FogVolume`` node instead. + ---- .. _class_FogVolume_property_material: @@ -71,14 +73,14 @@ Sets the :ref:`Material` to be used by the ``FogVolume``. Can be - :ref:`FogVolumeShape` **shape** +-----------+------------------+ -| *Default* | ``1`` | +| *Default* | ``3`` | +-----------+------------------+ | *Setter* | set_shape(value) | +-----------+------------------+ | *Getter* | get_shape() | +-----------+------------------+ -Sets the shape of the ``FogVolume`` to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX`, or :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD`. +Sets the shape of the ``FogVolume`` to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_font.rst b/classes/class_font.rst index 71f83284d..b86a43343 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -134,6 +134,8 @@ Methods +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`float` width=-1, :ref:`int` size=16, :ref:`int` flags=96 **)** |const| | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_rids` **(** **)** |const| | ++---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`int` size=16, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` flags=3 **)** |const| | @@ -327,6 +329,14 @@ See also :ref:`draw_multiline_string`. ---- +.. _class_Font_method_get_rids: + +- :ref:`Array` **get_rids** **(** **)** |const| + +Returns :ref:`Array` of valid :ref:`FontData` :ref:`RID`\ s, which can be passed to the :ref:`TextServer` methods. + +---- + .. _class_Font_method_get_spacing: - :ref:`int` **get_spacing** **(** :ref:`SpacingType` spacing **)** |const| diff --git a/classes/class_fontdata.rst b/classes/class_fontdata.rst index a831a28f9..b88e08bbe 100644 --- a/classes/class_fontdata.rst +++ b/classes/class_fontdata.rst @@ -15,7 +15,7 @@ Font source data and prerendered glyph cache, imported from dynamic or bitmap fo Supported font formats: -- Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm). +- Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm). - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants. @@ -39,6 +39,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`bool` | :ref:`force_autohinter` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`generate_mipmaps` | ``false`` | ++-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Hinting` | :ref:`hinting` | ``1`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`msdf_pixel_range` | ``16`` | @@ -310,6 +312,22 @@ If set to ``true``, auto-hinting is supported and preferred over font built-in h ---- +.. _class_FontData_property_generate_mipmaps: + +- :ref:`bool` **generate_mipmaps** + ++-----------+-----------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------+ +| *Setter* | set_generate_mipmaps(value) | ++-----------+-----------------------------+ +| *Getter* | get_generate_mipmaps() | ++-----------+-----------------------------+ + +If set to ``true``, generate mipmaps for the font textures. + +---- + .. _class_FontData_property_hinting: - :ref:`Hinting` **hinting** @@ -783,7 +801,7 @@ Loads an AngelCode BMFont (.fnt, .font) bitmap font from file ``path``. - :ref:`Error` **load_dynamic_font** **(** :ref:`String` path **)** -Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff) or Type 1 (.pfb, .pfm) dynamic font from file ``path``. +Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file ``path``. \ **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the ``user://`` directory. diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index 2db1932d1..48c35b005 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -241,7 +241,7 @@ Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, other - :ref:`Variant` **line_intersects_line** **(** :ref:`Vector2` from_a, :ref:`Vector2` dir_a, :ref:`Vector2` from_b, :ref:`Vector2` dir_b **)** -Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. +Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns ``null``. \ **Note:** The lines are specified using direction vectors, not end points. @@ -325,7 +325,7 @@ Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. - :ref:`Variant` **segment_intersects_segment** **(** :ref:`Vector2` from_a, :ref:`Vector2` to_a, :ref:`Vector2` from_b, :ref:`Vector2` to_b **)** -Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns an empty :ref:`Variant`. +Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) intersect. If yes, return the point of intersection as :ref:`Vector2`. If no intersection takes place, returns ``null``. ---- diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index b58465eba..0f0791120 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -110,7 +110,7 @@ Given the two 3D segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two - :ref:`Variant` **ray_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` dir, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** -Tests if the 3D ray starting at ``from`` with the direction of ``dir`` intersects the triangle specified by ``a``, ``b`` and ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, an empty :ref:`Variant` is returned. +Tests if the 3D ray starting at ``from`` with the direction of ``dir`` intersects the triangle specified by ``a``, ``b`` and ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, returns ``null``. ---- @@ -142,7 +142,7 @@ Checks if the segment (``from``, ``to``) intersects the sphere that is located a - :ref:`Variant` **segment_intersects_triangle** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** -Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, an empty :ref:`Variant` is returned. +Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, ``c``. If yes, returns the point of intersection as :ref:`Vector3`. If no intersection takes place, returns ``null``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index aeec91b55..d2e012f4d 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -11,7 +11,7 @@ GeometryInstance3D **Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CPUParticles3D`, :ref:`CSGShape3D`, :ref:`GPUParticles3D`, :ref:`MeshInstance3D`, :ref:`MultiMeshInstance3D`, :ref:`SpriteBase3D` +**Inherited By:** :ref:`CPUParticles3D`, :ref:`CSGShape3D`, :ref:`GPUParticles3D`, :ref:`Label3D`, :ref:`MeshInstance3D`, :ref:`MultiMeshInstance3D`, :ref:`SpriteBase3D` Base node for geometry-based visual instances. @@ -23,35 +23,35 @@ Base node for geometry-based visual instances. Shares some common functionality Properties ---------- -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`ShadowCastingSetting` | :ref:`cast_shadow` | ``1`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`extra_cull_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`LightmapScale` | :ref:`gi_lightmap_scale` | ``0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`GIMode` | :ref:`gi_mode` | ``0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`ignore_occlusion_culling` | ``false`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`lod_bias` | ``1.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Material` | :ref:`material_overlay` | | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`Material` | :ref:`material_override` | | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`transparency` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_begin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_begin_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_end` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`visibility_range_end_margin` | ``0.0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`VisibilityRangeFadeMode` | :ref:`visibility_range_fade_mode` | ``0`` | -+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`ShadowCastingSetting` | :ref:`cast_shadow` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`extra_cull_margin` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`LightmapScale` | :ref:`gi_lightmap_scale` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`GIMode` | :ref:`gi_mode` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`ignore_occlusion_culling` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`lod_bias` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`material_overlay` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`Material` | :ref:`material_override` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`transparency` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visibility_range_begin` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visibility_range_begin_margin` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visibility_range_end` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`visibility_range_end_margin` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`VisibilityRangeFadeMode` | :ref:`visibility_range_fade_mode` | ++---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ Methods ------- @@ -162,13 +162,11 @@ Property Descriptions - :ref:`ShadowCastingSetting` **cast_shadow** -+-----------+---------------------------------+ -| *Default* | ``1`` | -+-----------+---------------------------------+ -| *Setter* | set_cast_shadows_setting(value) | -+-----------+---------------------------------+ -| *Getter* | get_cast_shadows_setting() | -+-----------+---------------------------------+ ++----------+---------------------------------+ +| *Setter* | set_cast_shadows_setting(value) | ++----------+---------------------------------+ +| *Getter* | get_cast_shadows_setting() | ++----------+---------------------------------+ The selected shadow casting flag. See :ref:`ShadowCastingSetting` for possible values. @@ -178,13 +176,11 @@ The selected shadow casting flag. See :ref:`ShadowCastingSetting` **extra_cull_margin** -+-----------+------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------+ -| *Setter* | set_extra_cull_margin(value) | -+-----------+------------------------------+ -| *Getter* | get_extra_cull_margin() | -+-----------+------------------------------+ ++----------+------------------------------+ +| *Setter* | set_extra_cull_margin(value) | ++----------+------------------------------+ +| *Getter* | get_extra_cull_margin() | ++----------+------------------------------+ The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB`) to increase its cull box. @@ -194,13 +190,11 @@ The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB` **gi_lightmap_scale** -+-----------+---------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------+ -| *Setter* | set_lightmap_scale(value) | -+-----------+---------------------------+ -| *Getter* | get_lightmap_scale() | -+-----------+---------------------------+ ++----------+---------------------------+ +| *Setter* | set_lightmap_scale(value) | ++----------+---------------------------+ +| *Getter* | get_lightmap_scale() | ++----------+---------------------------+ The texel density to use for lightmapping in :ref:`LightmapGI`. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes. @@ -210,13 +204,11 @@ The texel density to use for lightmapping in :ref:`LightmapGI` - :ref:`GIMode` **gi_mode** -+-----------+--------------------+ -| *Default* | ``0`` | -+-----------+--------------------+ -| *Setter* | set_gi_mode(value) | -+-----------+--------------------+ -| *Getter* | get_gi_mode() | -+-----------+--------------------+ ++----------+--------------------+ +| *Setter* | set_gi_mode(value) | ++----------+--------------------+ +| *Getter* | get_gi_mode() | ++----------+--------------------+ The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic). @@ -228,13 +220,11 @@ The global illumination mode to use for the whole geometry. To avoid inconsisten - :ref:`bool` **ignore_occlusion_culling** -+-----------+-------------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------------+ -| *Setter* | set_ignore_occlusion_culling(value) | -+-----------+-------------------------------------+ -| *Getter* | is_ignoring_occlusion_culling() | -+-----------+-------------------------------------+ ++----------+-------------------------------------+ +| *Setter* | set_ignore_occlusion_culling(value) | ++----------+-------------------------------------+ +| *Getter* | is_ignoring_occlusion_culling() | ++----------+-------------------------------------+ ---- @@ -242,13 +232,11 @@ The global illumination mode to use for the whole geometry. To avoid inconsisten - :ref:`float` **lod_bias** -+-----------+---------------------+ -| *Default* | ``1.0`` | -+-----------+---------------------+ -| *Setter* | set_lod_bias(value) | -+-----------+---------------------+ -| *Getter* | get_lod_bias() | -+-----------+---------------------+ ++----------+---------------------+ +| *Setter* | set_lod_bias(value) | ++----------+---------------------+ +| *Getter* | get_lod_bias() | ++----------+---------------------+ ---- @@ -288,13 +276,11 @@ If a material is assigned to this property, it will be used instead of any mater - :ref:`float` **transparency** -+-----------+-------------------------+ -| *Default* | ``0.0`` | -+-----------+-------------------------+ -| *Setter* | set_transparency(value) | -+-----------+-------------------------+ -| *Getter* | get_transparency() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_transparency(value) | ++----------+-------------------------+ +| *Getter* | get_transparency() | ++----------+-------------------------+ The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). ``0.0`` is fully opaque, while ``1.0`` is fully transparent. Values greater than ``0.0`` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting :ref:`transparency` to a value greater than ``0.0`` (exclusive) will *not* disable shadow rendering. @@ -308,13 +294,11 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` - :ref:`float` **visibility_range_begin** -+-----------+-----------------------------------+ -| *Default* | ``0.0`` | -+-----------+-----------------------------------+ -| *Setter* | set_visibility_range_begin(value) | -+-----------+-----------------------------------+ -| *Getter* | get_visibility_range_begin() | -+-----------+-----------------------------------+ ++----------+-----------------------------------+ +| *Setter* | set_visibility_range_begin(value) | ++----------+-----------------------------------+ +| *Getter* | get_visibility_range_begin() | ++----------+-----------------------------------+ Starting distance from which the GeometryInstance3D will be visible, taking :ref:`visibility_range_begin_margin` into account as well. The default value of 0 is used to disable the range check. @@ -324,13 +308,11 @@ Starting distance from which the GeometryInstance3D will be visible, taking :ref - :ref:`float` **visibility_range_begin_margin** -+-----------+------------------------------------------+ -| *Default* | ``0.0`` | -+-----------+------------------------------------------+ -| *Setter* | set_visibility_range_begin_margin(value) | -+-----------+------------------------------------------+ -| *Getter* | get_visibility_range_begin_margin() | -+-----------+------------------------------------------+ ++----------+------------------------------------------+ +| *Setter* | set_visibility_range_begin_margin(value) | ++----------+------------------------------------------+ +| *Getter* | get_visibility_range_begin_margin() | ++----------+------------------------------------------+ Margin for the :ref:`visibility_range_begin` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_begin` threshold by this amount. @@ -342,13 +324,11 @@ If :ref:`visibility_range_fade_mode` **visibility_range_end** -+-----------+---------------------------------+ -| *Default* | ``0.0`` | -+-----------+---------------------------------+ -| *Setter* | set_visibility_range_end(value) | -+-----------+---------------------------------+ -| *Getter* | get_visibility_range_end() | -+-----------+---------------------------------+ ++----------+---------------------------------+ +| *Setter* | set_visibility_range_end(value) | ++----------+---------------------------------+ +| *Getter* | get_visibility_range_end() | ++----------+---------------------------------+ Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibility_range_end_margin` into account as well. The default value of 0 is used to disable the range check. @@ -358,13 +338,11 @@ Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibili - :ref:`float` **visibility_range_end_margin** -+-----------+----------------------------------------+ -| *Default* | ``0.0`` | -+-----------+----------------------------------------+ -| *Setter* | set_visibility_range_end_margin(value) | -+-----------+----------------------------------------+ -| *Getter* | get_visibility_range_end_margin() | -+-----------+----------------------------------------+ ++----------+----------------------------------------+ +| *Setter* | set_visibility_range_end_margin(value) | ++----------+----------------------------------------+ +| *Getter* | get_visibility_range_end_margin() | ++----------+----------------------------------------+ Margin for the :ref:`visibility_range_end` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_end` threshold by this amount. @@ -376,13 +354,11 @@ If :ref:`visibility_range_fade_mode` **visibility_range_fade_mode** -+-----------+---------------------------------------+ -| *Default* | ``0`` | -+-----------+---------------------------------------+ -| *Setter* | set_visibility_range_fade_mode(value) | -+-----------+---------------------------------------+ -| *Getter* | get_visibility_range_fade_mode() | -+-----------+---------------------------------------+ ++----------+---------------------------------------+ +| *Setter* | set_visibility_range_fade_mode(value) | ++----------+---------------------------------------+ +| *Getter* | get_visibility_range_fade_mode() | ++----------+---------------------------------------+ Controls which instances will be faded when approaching the limits of the visibility range. See :ref:`VisibilityRangeFadeMode` for possible values. diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 87a4b5a50..99090e66c 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -31,7 +31,7 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`append_from_buffer` **(** :ref:`PackedByteArray` bytes, :ref:`String` base_path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`append_from_file` **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** | +| :ref:`Error` | :ref:`append_from_file` **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30, :ref:`String` base_path="" **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`append_from_scene` **(** :ref:`Node` node, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -68,7 +68,7 @@ Method Descriptions .. _class_GLTFDocument_method_append_from_file: -- :ref:`Error` **append_from_file** **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30 **)** +- :ref:`Error` **append_from_file** **(** :ref:`String` path, :ref:`GLTFState` state, :ref:`int` flags=0, :ref:`int` bake_fps=30, :ref:`String` base_path="" **)** ---- diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 177c4be4f..8eee61da3 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -18,88 +18,64 @@ GLTFDocumentExtension Methods ------- -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`export_post` **(** :ref:`GLTFDocument` document **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`export_preflight` **(** :ref:`GLTFDocument` document, :ref:`Node` node **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_export_setting` **(** :ref:`StringName` key **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_export_setting_keys` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_import_setting` **(** :ref:`StringName` key **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_import_setting_keys` **(** **)** |const| | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`import_post` **(** :ref:`GLTFDocument` document, :ref:`Node` node **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`import_preflight` **(** :ref:`GLTFDocument` document **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_export_setting` **(** :ref:`StringName` key, :ref:`Variant` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_import_setting` **(** :ref:`StringName` key, :ref:`Variant` value **)** | -+---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_export_preflight` **(** :ref:`Node` root **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_import_preflight` **(** :ref:`GLTFState` state **)** |virtual| | ++-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- -.. _class_GLTFDocumentExtension_method_export_post: +.. _class_GLTFDocumentExtension_method__export_node: -- :ref:`Error` **export_post** **(** :ref:`GLTFDocument` document **)** +- :ref:`int` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_export_preflight: +.. _class_GLTFDocumentExtension_method__export_post: -- :ref:`Error` **export_preflight** **(** :ref:`GLTFDocument` document, :ref:`Node` node **)** +- :ref:`int` **_export_post** **(** :ref:`GLTFState` state **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_get_export_setting: +.. _class_GLTFDocumentExtension_method__export_preflight: -- :ref:`Variant` **get_export_setting** **(** :ref:`StringName` key **)** |const| +- :ref:`int` **_export_preflight** **(** :ref:`Node` root **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_get_export_setting_keys: +.. _class_GLTFDocumentExtension_method__import_node: -- :ref:`Array` **get_export_setting_keys** **(** **)** |const| +- :ref:`int` **_import_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_get_import_setting: +.. _class_GLTFDocumentExtension_method__import_post: -- :ref:`Variant` **get_import_setting** **(** :ref:`StringName` key **)** |const| +- :ref:`int` **_import_post** **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_get_import_setting_keys: +.. _class_GLTFDocumentExtension_method__import_post_parse: -- :ref:`Array` **get_import_setting_keys** **(** **)** |const| +- :ref:`int` **_import_post_parse** **(** :ref:`GLTFState` state **)** |virtual| ---- -.. _class_GLTFDocumentExtension_method_import_post: +.. _class_GLTFDocumentExtension_method__import_preflight: -- :ref:`Error` **import_post** **(** :ref:`GLTFDocument` document, :ref:`Node` node **)** - ----- - -.. _class_GLTFDocumentExtension_method_import_preflight: - -- :ref:`Error` **import_preflight** **(** :ref:`GLTFDocument` document **)** - ----- - -.. _class_GLTFDocumentExtension_method_set_export_setting: - -- void **set_export_setting** **(** :ref:`StringName` key, :ref:`Variant` value **)** - ----- - -.. _class_GLTFDocumentExtension_method_set_import_setting: - -- void **set_import_setting** **(** :ref:`StringName` key, :ref:`Variant` value **)** +- :ref:`int` **_import_preflight** **(** :ref:`GLTFState` state **)** |virtual| .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index d1e485f5f..6f887fb77 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -16,6 +16,8 @@ GLTFState Properties ---------- ++-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ +| :ref:`String` | :ref:`base_path` | ``""`` | +-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`Array` | :ref:`buffers` | ``[]`` | +-----------------------------------------------+----------------------------------------------------------------------------+-----------------------+ @@ -108,6 +110,20 @@ Methods Property Descriptions --------------------- +.. _class_GLTFState_property_base_path: + +- :ref:`String` **base_path** + ++-----------+----------------------+ +| *Default* | ``""`` | ++-----------+----------------------+ +| *Setter* | set_base_path(value) | ++-----------+----------------------+ +| *Getter* | get_base_path() | ++-----------+----------------------+ + +---- + .. _class_GLTFState_property_buffers: - :ref:`Array` **buffers** diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index ca881174d..e93b43053 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -45,6 +45,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool` | :ref:`fract_delta` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ +| :ref:`bool` | :ref:`interpolate` | ``true`` | ++-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool` | :ref:`local_coords` | ``true`` | @@ -243,6 +245,22 @@ If ``true``, results in fractional delta calculation which has a smoother partic ---- +.. _class_GPUParticles2D_property_interpolate: + +- :ref:`bool` **interpolate** + ++-----------+------------------------+ +| *Default* | ``true`` | ++-----------+------------------------+ +| *Setter* | set_interpolate(value) | ++-----------+------------------------+ +| *Getter* | get_interpolate() | ++-----------+------------------------+ + +Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps` is lower than the screen refresh rate. + +---- + .. _class_GPUParticles2D_property_lifetime: - :ref:`float` **lifetime** diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index bba2dd26f..59bffe5b8 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -386,6 +386,8 @@ If ``true``, results in fractional delta calculation which has a smoother partic | *Getter* | get_interpolate() | +-----------+------------------------+ +Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps` is lower than the screen refresh rate. + ---- .. _class_GPUParticles3D_property_lifetime: diff --git a/classes/class_gpuparticlesattractor3d.rst b/classes/class_gpuparticlesattractor3d.rst index 7299a6137..547ca40c0 100644 --- a/classes/class_gpuparticlesattractor3d.rst +++ b/classes/class_gpuparticlesattractor3d.rst @@ -13,7 +13,18 @@ GPUParticlesAttractor3D **Inherited By:** :ref:`GPUParticlesAttractorBox3D`, :ref:`GPUParticlesAttractorSphere3D`, :ref:`GPUParticlesAttractorVectorField3D` +Abstract class for 3D particle attractors affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. + +Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. + +Attractors can be temporarily disabled by hiding them, or by setting their :ref:`strength` to ``0.0``. + +\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -43,6 +54,8 @@ Property Descriptions | *Getter* | get_attenuation() | +-----------+------------------------+ +The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. + ---- .. _class_GPUParticlesAttractor3D_property_cull_mask: @@ -57,6 +70,12 @@ Property Descriptions | *Getter* | get_cull_mask() | +-----------+----------------------+ +The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the attractor. By default, all particles are affected by an attractor. + +After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + +Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticlesMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. + ---- .. _class_GPUParticlesAttractor3D_property_directionality: @@ -71,6 +90,10 @@ Property Descriptions | *Getter* | get_directionality() | +-----------+---------------------------+ +Adjusts how directional the attractor is. At ``0.0``, the attractor is not directional at all: it will attract particles towards its center. At ``1.0``, the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if :ref:`strength` is negative). + +\ **Note:** If :ref:`directionality` is greater than ``0.0``, the direction in which particles are pushed can be changed by rotating the ``GPUParticlesAttractor3D`` node. + ---- .. _class_GPUParticlesAttractor3D_property_strength: @@ -85,6 +108,8 @@ Property Descriptions | *Getter* | get_strength() | +-----------+---------------------+ +If :ref:`strength` is negative, particles will be pushed in the reverse direction. Particles will be pushed *away* from the attractor's origin if :ref:`directionality` is ``0.0``, or towards local +Z if :ref:`directionality` is greater than ``0.0``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlesattractorbox3d.rst b/classes/class_gpuparticlesattractorbox3d.rst index f700951d1..f2df3ac13 100644 --- a/classes/class_gpuparticlesattractorbox3d.rst +++ b/classes/class_gpuparticlesattractorbox3d.rst @@ -11,7 +11,14 @@ GPUParticlesAttractorBox3D **Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. + +\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -35,6 +42,8 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ +The attractor box's extents in 3D units. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlesattractorsphere3d.rst b/classes/class_gpuparticlesattractorsphere3d.rst index 71cbf21f9..789fb59aa 100644 --- a/classes/class_gpuparticlesattractorsphere3d.rst +++ b/classes/class_gpuparticlesattractorsphere3d.rst @@ -11,7 +11,14 @@ GPUParticlesAttractorSphere3D **Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. + +\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -35,6 +42,10 @@ Property Descriptions | *Getter* | get_radius() | +-----------+-------------------+ +The attractor sphere's radius in 3D units. + +\ **Note:** Stretched ellipses can be obtained by using non-uniform scaling on the ``GPUParticlesAttractorSphere3D`` node. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlesattractorvectorfield3d.rst b/classes/class_gpuparticlesattractorvectorfield3d.rst index aec4e199b..133752bbd 100644 --- a/classes/class_gpuparticlesattractorvectorfield3d.rst +++ b/classes/class_gpuparticlesattractorvectorfield3d.rst @@ -11,7 +11,16 @@ GPUParticlesAttractorVectorField3D **Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D` nodes. + +Unlike :ref:`GPUParticlesAttractorBox3D`, ``GPUParticlesAttractorVectorField3D`` uses a :ref:`texture` to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. + +\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -37,6 +46,8 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ +The extents of the vector field box in 3D units. + ---- .. _class_GPUParticlesAttractorVectorField3D_property_texture: @@ -49,6 +60,10 @@ Property Descriptions | *Getter* | get_texture() | +----------+--------------------+ +The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + +\ **Note:** To get better performance, the 3D texture's resolution should reflect the :ref:`extents` of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollision3d.rst b/classes/class_gpuparticlescollision3d.rst index 956c34dd6..6e3a895f3 100644 --- a/classes/class_gpuparticlescollision3d.rst +++ b/classes/class_gpuparticlescollision3d.rst @@ -13,7 +13,22 @@ GPUParticlesCollision3D **Inherited By:** :ref:`GPUParticlesCollisionBox3D`, :ref:`GPUParticlesCollisionHeightField3D`, :ref:`GPUParticlesCollisionSDF3D`, :ref:`GPUParticlesCollisionSphere3D` +Abstract class for 3D particle collision shapes affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Particle collision shapes can be used to make particles stop or bounce against them. + +Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. + +Particle collision shapes can be temporarily disabled by hiding them. + +\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. + +\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. + +\ **Note:** Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting :ref:`GPUParticles3D.fixed_fps` to ``0`` or a value that matches or exceeds the target framerate. Properties ---------- @@ -37,6 +52,12 @@ Property Descriptions | *Getter* | get_cull_mask() | +-----------+----------------------+ +The particle rendering layers (:ref:`VisualInstance3D.layers`) that will be affected by the collision shape. By default, all particles that have :ref:`ParticlesMaterial.collision_enabled` set to ``true`` will be affected by a collision shape. + +After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + +Particle attraction can also be disabled on a per-process material basis by setting :ref:`ParticlesMaterial.attractor_interaction_enabled` on the :ref:`GPUParticles3D` node. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollisionbox3d.rst b/classes/class_gpuparticlescollisionbox3d.rst index 736598c7c..3a8ba16a3 100644 --- a/classes/class_gpuparticlescollisionbox3d.rst +++ b/classes/class_gpuparticlescollisionbox3d.rst @@ -11,7 +11,16 @@ GPUParticlesCollisionBox3D **Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. + +\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. + +\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -35,6 +44,8 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ +The collision box's extents in 3D units. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index 7b7eaaa76..4a8c2e980 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -11,22 +11,33 @@ GPUParticlesCollisionHeightField3D **Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D` nodes. + +Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than :ref:`GPUParticlesCollisionSDF3D`, but it doesn't require a baking step. + +\ ``GPUParticlesCollisionHeightField3D`` can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes ``GPUParticlesCollisionHeightField3D`` a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, ``GPUParticlesCollisionHeightField3D`` is not suited for indoor particle collision. + +\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. + +\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`bool` | :ref:`follow_camera_enabled` | ``false`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`float` | :ref:`follow_camera_push_ratio` | ``0.1`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`Resolution` | :ref:`resolution` | ``2`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ -| :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | -+-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+ ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`Vector3` | :ref:`extents` | ``Vector3(1, 1, 1)`` | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`bool` | :ref:`follow_camera_enabled` | ``false`` | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`Resolution` | :ref:`resolution` | ``2`` | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ +| :ref:`UpdateMode` | :ref:`update_mode` | ``0`` | ++-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------+ Enumerations ------------ @@ -49,19 +60,19 @@ Enumerations enum **Resolution**: -- **RESOLUTION_256** = **0** +- **RESOLUTION_256** = **0** --- Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. -- **RESOLUTION_512** = **1** +- **RESOLUTION_512** = **1** --- Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. -- **RESOLUTION_1024** = **2** +- **RESOLUTION_1024** = **2** --- Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. -- **RESOLUTION_2048** = **3** +- **RESOLUTION_2048** = **3** --- Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. -- **RESOLUTION_4096** = **4** +- **RESOLUTION_4096** = **4** --- Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. -- **RESOLUTION_8192** = **5** +- **RESOLUTION_8192** = **5** --- Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. -- **RESOLUTION_MAX** = **6** +- **RESOLUTION_MAX** = **6** --- Represents the size of the :ref:`Resolution` enum. ---- @@ -73,9 +84,9 @@ enum **Resolution**: enum **UpdateMode**: -- **UPDATE_MODE_WHEN_MOVED** = **0** +- **UPDATE_MODE_WHEN_MOVED** = **0** --- Only update the heightmap when the ``GPUParticlesCollisionHeightField3D`` node is moved, or when the camera moves if :ref:`follow_camera_enabled` is ``true``. An update can be forced by slightly moving the ``GPUParticlesCollisionHeightField3D`` in any direction. -- **UPDATE_MODE_ALWAYS** = **1** +- **UPDATE_MODE_ALWAYS** = **1** --- Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. Property Descriptions --------------------- @@ -92,33 +103,25 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ +The collision heightmap's extents in 3D units. To improve heightmap quality, :ref:`extents` should be set as small as possible while covering the parts of the scene you need. + ---- .. _class_GPUParticlesCollisionHeightField3D_property_follow_camera_enabled: - :ref:`bool` **follow_camera_enabled** -+-----------+---------------------------------+ -| *Default* | ``false`` | -+-----------+---------------------------------+ -| *Setter* | set_follow_camera_mode(value) | -+-----------+---------------------------------+ -| *Getter* | is_follow_camera_mode_enabled() | -+-----------+---------------------------------+ ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_follow_camera_enabled(value) | ++-----------+----------------------------------+ +| *Getter* | is_follow_camera_enabled() | ++-----------+----------------------------------+ ----- +If ``true``, the ``GPUParticlesCollisionHeightField3D`` will follow the current camera in global space. The ``GPUParticlesCollisionHeightField3D`` does not need to be a child of the :ref:`Camera3D` node for this to work. -.. _class_GPUParticlesCollisionHeightField3D_property_follow_camera_push_ratio: - -- :ref:`float` **follow_camera_push_ratio** - -+-----------+-------------------------------------+ -| *Default* | ``0.1`` | -+-----------+-------------------------------------+ -| *Setter* | set_follow_camera_push_ratio(value) | -+-----------+-------------------------------------+ -| *Getter* | get_follow_camera_push_ratio() | -+-----------+-------------------------------------+ +Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering :ref:`resolution` to improve performance if :ref:`follow_camera_enabled` is ``true``. ---- @@ -134,6 +137,8 @@ Property Descriptions | *Getter* | get_resolution() | +-----------+-----------------------+ +Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If :ref:`update_mode` is :ref:`UPDATE_MODE_ALWAYS`, consider using the lowest resolution possible. + ---- .. _class_GPUParticlesCollisionHeightField3D_property_update_mode: @@ -148,6 +153,8 @@ Property Descriptions | *Getter* | get_update_mode() | +-----------+------------------------+ +The update policy to use for the generated heightmap. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollisionsdf3d.rst b/classes/class_gpuparticlescollisionsdf3d.rst index 36841a303..4236d8475 100644 --- a/classes/class_gpuparticlescollisionsdf3d.rst +++ b/classes/class_gpuparticlescollisionsdf3d.rst @@ -11,7 +11,22 @@ GPUParticlesCollisionSDF3D **Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D` nodes. + +Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than :ref:`GPUParticlesCollisionHeightField3D`, but it requires a baking step. + +\ **Baking:** The signed distance field texture can be baked by selecting the ``GPUParticlesCollisionSDF3D`` node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any *visible* :ref:`MeshInstance3D`\ s touching the :ref:`extents` will be taken into account for baking, regardless of their :ref:`GeometryInstance3D.gi_mode`. + +\ **Note:** Baking a ``GPUParticlesCollisionSDF3D``'s :ref:`texture` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D`\ s into its :ref:`texture` property in an exported project. + +\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. + +\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -47,19 +62,19 @@ Enumerations enum **Resolution**: -- **RESOLUTION_16** = **0** +- **RESOLUTION_16** = **0** --- Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. -- **RESOLUTION_32** = **1** +- **RESOLUTION_32** = **1** --- Bake a 32×32×32 signed distance field. -- **RESOLUTION_64** = **2** +- **RESOLUTION_64** = **2** --- Bake a 64×64×64 signed distance field. -- **RESOLUTION_128** = **3** +- **RESOLUTION_128** = **3** --- Bake a 128×128×128 signed distance field. -- **RESOLUTION_256** = **4** +- **RESOLUTION_256** = **4** --- Bake a 256×256×256 signed distance field. -- **RESOLUTION_512** = **5** +- **RESOLUTION_512** = **5** --- Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. -- **RESOLUTION_MAX** = **6** +- **RESOLUTION_MAX** = **6** --- Represents the size of the :ref:`Resolution` enum. Property Descriptions --------------------- @@ -76,6 +91,8 @@ Property Descriptions | *Getter* | get_extents() | +-----------+----------------------+ +The collision SDF's extents in 3D units. To improve SDF quality, the :ref:`extents` should be set as small as possible while covering the parts of the scene you need. + ---- .. _class_GPUParticlesCollisionSDF3D_property_resolution: @@ -90,6 +107,8 @@ Property Descriptions | *Getter* | get_resolution() | +-----------+-----------------------+ +The bake resolution to use for the signed distance field :ref:`texture`. The texture must be baked again for changes to the :ref:`resolution` property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. + ---- .. _class_GPUParticlesCollisionSDF3D_property_texture: @@ -102,6 +121,8 @@ Property Descriptions | *Getter* | get_texture() | +----------+--------------------+ +The 3D texture representing the signed distance field. + ---- .. _class_GPUParticlesCollisionSDF3D_property_thickness: @@ -116,6 +137,8 @@ Property Descriptions | *Getter* | get_thickness() | +-----------+----------------------+ +The collision shape's thickness. Unlike other particle colliders, ``GPUParticlesCollisionSDF3D`` is actually hollow on the inside. :ref:`thickness` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the ``GPUParticlesCollisionSDF3D`` is moved. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gpuparticlescollisionsphere3d.rst b/classes/class_gpuparticlescollisionsphere3d.rst index 2c24c15d6..e313bcec8 100644 --- a/classes/class_gpuparticlescollisionsphere3d.rst +++ b/classes/class_gpuparticlescollisionsphere3d.rst @@ -11,7 +11,16 @@ GPUParticlesCollisionSphere3D **Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +Description +----------- + +Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. + +\ **Note:** :ref:`ParticlesMaterial.collision_enabled` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. + +\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. Properties ---------- @@ -35,6 +44,8 @@ Property Descriptions | *Getter* | get_radius() | +-----------+-------------------+ +The collision sphere's radius in 3D units. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index a7175f19c..17dd772ca 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -28,6 +28,8 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`connection_lines_antialiased` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`float` | :ref:`connection_lines_curvature` | ``0.5`` | ++----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float` | :ref:`connection_lines_thickness` | ``2.0`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | @@ -109,39 +111,35 @@ Methods Theme Properties ---------------- -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`activity` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`grid_major` | ``Color(1, 1, 1, 0.2)`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`grid_minor` | ``Color(1, 1, 1, 0.05)`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`selection_fill` | ``Color(1, 1, 1, 0.3)`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Color` | :ref:`selection_stroke` | ``Color(1, 1, 1, 0.8)`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`bezier_len_neg` | ``160`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`bezier_len_pos` | ``80`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`port_grab_distance_horizontal` | ``24`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`int` | :ref:`port_grab_distance_vertical` | ``26`` | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`layout` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`minimap` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`minus` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`more` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`reset` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`Texture2D` | :ref:`snap` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ -| :ref:`StyleBox` | :ref:`bg` | | -+-----------------------------------+----------------------------------------------------------------------------------------------------+--------------------------+ ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`activity` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`grid_major` | ``Color(1, 1, 1, 0.2)`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`grid_minor` | ``Color(1, 1, 1, 0.05)`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`selection_fill` | ``Color(1, 1, 1, 0.3)`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Color` | :ref:`selection_stroke` | ``Color(1, 1, 1, 0.8)`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`int` | :ref:`port_hotzone_inner_extent` | ``22`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`int` | :ref:`port_hotzone_outer_extent` | ``26`` | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`layout` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`minimap` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`minus` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`more` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`reset` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`Texture2D` | :ref:`snap` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ +| :ref:`StyleBox` | :ref:`bg` | | ++-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ Signals ------- @@ -204,9 +202,9 @@ Emitted when the user presses :kbd:`Ctrl + C`. .. _class_GraphEdit_signal_delete_nodes_request: -- **delete_nodes_request** **(** **)** +- **delete_nodes_request** **(** :ref:`StringName[]` nodes **)** -Emitted when a GraphNode is attempted to be removed from the GraphEdit. +Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). ---- @@ -266,7 +264,7 @@ Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ` .. _class_GraphEdit_signal_scroll_offset_changed: -- **scroll_offset_changed** **(** :ref:`Vector2` ofs **)** +- **scroll_offset_changed** **(** :ref:`Vector2` offset **)** Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. @@ -304,6 +302,22 @@ If ``true``, the lines between nodes will use antialiasing. ---- +.. _class_GraphEdit_property_connection_lines_curvature: + +- :ref:`float` **connection_lines_curvature** + ++-----------+---------------------------------------+ +| *Default* | ``0.5`` | ++-----------+---------------------------------------+ +| *Setter* | set_connection_lines_curvature(value) | ++-----------+---------------------------------------+ +| *Getter* | get_connection_lines_curvature() | ++-----------+---------------------------------------+ + +The curvature of the lines between the nodes. 0 results in straight lines. + +---- + .. _class_GraphEdit_property_connection_lines_thickness: - :ref:`float` **connection_lines_thickness** @@ -786,47 +800,27 @@ The outline color of the selection rectangle. ---- -.. _class_GraphEdit_theme_constant_bezier_len_neg: +.. _class_GraphEdit_theme_constant_port_hotzone_inner_extent: -- :ref:`int` **bezier_len_neg** +- :ref:`int` **port_hotzone_inner_extent** -+-----------+---------+ -| *Default* | ``160`` | -+-----------+---------+ ++-----------+--------+ +| *Default* | ``22`` | ++-----------+--------+ + +The horizontal range within which a port can be grabbed (inner side). ---- -.. _class_GraphEdit_theme_constant_bezier_len_pos: +.. _class_GraphEdit_theme_constant_port_hotzone_outer_extent: -- :ref:`int` **bezier_len_pos** - -+-----------+--------+ -| *Default* | ``80`` | -+-----------+--------+ - ----- - -.. _class_GraphEdit_theme_constant_port_grab_distance_horizontal: - -- :ref:`int` **port_grab_distance_horizontal** - -+-----------+--------+ -| *Default* | ``24`` | -+-----------+--------+ - -The horizontal range within which a port can be grabbed (on both sides). - ----- - -.. _class_GraphEdit_theme_constant_port_grab_distance_vertical: - -- :ref:`int` **port_grab_distance_vertical** +- :ref:`int` **port_hotzone_outer_extent** +-----------+--------+ | *Default* | ``26`` | +-----------+--------+ -The vertical range within which a port can be grabbed (on both sides). +The horizontal range within which a port can be grabbed (outer side). ---- diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 795845ce2..5af87a445 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -50,98 +50,110 @@ Properties Methods ------- -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_all_slots` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_opentype_features` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear_slot` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_count` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_connection_input_position` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_count` **(** **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_connection_output_position` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` idx **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_opentype_feature` **(** :ref:`String` tag **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` idx **)** |const| | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_opentype_feature` **(** :ref:`String` tag, :ref:`int` value **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot` **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_left=null, :ref:`Texture2D` custom_right=null **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_color_left` **(** :ref:`int` idx, :ref:`Color` color_left **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_color_right` **(** :ref:`int` idx, :ref:`Color` color_right **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_enabled_left` **(** :ref:`int` idx, :ref:`bool` enable_left **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_enabled_right` **(** :ref:`int` idx, :ref:`bool` enable_right **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_type_left` **(** :ref:`int` idx, :ref:`int` type_left **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_slot_type_right` **(** :ref:`int` idx, :ref:`int` type_right **)** | -+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_all_slots` **(** **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_opentype_features` **(** **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_slot` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_input_count` **(** **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_input_height` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_connection_input_position` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_output_count` **(** **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_output_height` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_connection_output_position` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` idx **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_opentype_feature` **(** :ref:`String` tag **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_slot_draw_stylebox` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` idx **)** |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opentype_feature` **(** :ref:`String` tag, :ref:`int` value **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot` **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_left=null, :ref:`Texture2D` custom_right=null, :ref:`bool` enable=true **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_color_left` **(** :ref:`int` idx, :ref:`Color` color_left **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_color_right` **(** :ref:`int` idx, :ref:`Color` color_right **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_draw_stylebox` **(** :ref:`int` idx, :ref:`bool` draw_stylebox **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_enabled_left` **(** :ref:`int` idx, :ref:`bool` enable_left **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_enabled_right` **(** :ref:`int` idx, :ref:`bool` enable_right **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_type_left` **(** :ref:`int` idx, :ref:`int` type_left **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_slot_type_right` **(** :ref:`int` idx, :ref:`int` type_right **)** | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`close_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_offset` | ``22`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`port_offset` | ``0`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`separation` | ``2`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`title_offset` | ``26`` | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`title_font` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`close` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`port` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`resizer` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`breakpoint` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`comment` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`commentfocus` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`frame` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`position` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`selectedframe` | | -+-----------------------------------+------------------------------------------------------------------+-----------------------------------+ ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`close_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`close_h_offset` | ``22`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`close_offset` | ``22`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`port_offset` | ``0`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`separation` | ``2`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`title_offset` | ``26`` | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Font` | :ref:`title_font` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`close` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`port` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`resizer` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`breakpoint` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`comment` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`comment_focus` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`frame` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`position` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`selected_frame` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`slot` | | ++-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ Signals ------- @@ -405,6 +417,14 @@ Returns the number of enabled input slots (connections) to the GraphNode. ---- +.. _class_GraphNode_method_get_connection_input_height: + +- :ref:`int` **get_connection_input_height** **(** :ref:`int` idx **)** + +Returns the height of the input connection ``idx``. + +---- + .. _class_GraphNode_method_get_connection_input_position: - :ref:`Vector2` **get_connection_input_position** **(** :ref:`int` idx **)** @@ -437,6 +457,14 @@ Returns the number of enabled output slots (connections) of the GraphNode. ---- +.. _class_GraphNode_method_get_connection_output_height: + +- :ref:`int` **get_connection_output_height** **(** :ref:`int` idx **)** + +Returns the height of the output connection ``idx``. + +---- + .. _class_GraphNode_method_get_connection_output_position: - :ref:`Vector2` **get_connection_output_position** **(** :ref:`int` idx **)** @@ -493,6 +521,14 @@ Returns the right (output) type of the slot ``idx``. ---- +.. _class_GraphNode_method_is_slot_draw_stylebox: + +- :ref:`bool` **is_slot_draw_stylebox** **(** :ref:`int` idx **)** |const| + +Returns true if the background :ref:`StyleBox` of the slot ``idx`` is drawn. + +---- + .. _class_GraphNode_method_is_slot_enabled_left: - :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` idx **)** |const| @@ -519,7 +555,7 @@ Sets OpenType feature ``tag``. More info: `OpenType feature tags ` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_left=null, :ref:`Texture2D` custom_right=null **)** +- void **set_slot** **(** :ref:`int` idx, :ref:`bool` enable_left, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_left=null, :ref:`Texture2D` custom_right=null, :ref:`bool` enable=true **)** Sets properties of the slot with ID ``idx``. @@ -553,6 +589,14 @@ Sets the :ref:`Color` of the right (output) side of the slot ``idx` ---- +.. _class_GraphNode_method_set_slot_draw_stylebox: + +- void **set_slot_draw_stylebox** **(** :ref:`int` idx, :ref:`bool` draw_stylebox **)** + +Toggles the background :ref:`StyleBox` of the slot ``idx``. + +---- + .. _class_GraphNode_method_set_slot_enabled_left: - void **set_slot_enabled_left** **(** :ref:`int` idx, :ref:`bool` enable_left **)** @@ -622,6 +666,16 @@ Color of the title text. ---- +.. _class_GraphNode_theme_constant_close_h_offset: + +- :ref:`int` **close_h_offset** + ++-----------+--------+ +| *Default* | ``22`` | ++-----------+--------+ + +---- + .. _class_GraphNode_theme_constant_close_offset: - :ref:`int` **close_offset** @@ -718,9 +772,9 @@ The :ref:`StyleBox` used when :ref:`comment` **commentfocus** +- :ref:`StyleBox` **comment_focus** The :ref:`StyleBox` used when :ref:`comment` is enabled and the ``GraphNode`` is focused. @@ -742,12 +796,20 @@ The background used when :ref:`overlay` is set ---- -.. _class_GraphNode_theme_style_selectedframe: +.. _class_GraphNode_theme_style_selected_frame: -- :ref:`StyleBox` **selectedframe** +- :ref:`StyleBox` **selected_frame** The background used when the ``GraphNode`` is selected. +---- + +.. _class_GraphNode_theme_style_slot: + +- :ref:`StyleBox` **slot** + +The :ref:`StyleBox` used for each slot of the ``GraphNode``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index f5f760830..70315cec0 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -25,6 +25,8 @@ Notice that grid layout will preserve the columns and rows for every size of the Tutorials --------- +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + - `OS Test Demo `__ Properties @@ -37,11 +39,11 @@ Properties Theme Properties ---------------- -+-----------------------+--------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | -+-----------------------+--------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`vseparation` | ``4`` | -+-----------------------+--------------------------------------------------------------------+-------+ ++-----------------------+----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`h_separation` | ``4`` | ++-----------------------+----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`v_separation` | ``4`` | ++-----------------------+----------------------------------------------------------------------+-------+ Property Descriptions --------------------- @@ -63,9 +65,9 @@ The number of columns in the ``GridContainer``. If modified, ``GridContainer`` r Theme Property Descriptions --------------------------- -.. _class_GridContainer_theme_constant_hseparation: +.. _class_GridContainer_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -75,9 +77,9 @@ The horizontal separation of children nodes. ---- -.. _class_GridContainer_theme_constant_vseparation: +.. _class_GridContainer_theme_constant_v_separation: -- :ref:`int` **vseparation** +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``4`` | diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index 49ed9371d..e67ba2915 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -76,8 +76,6 @@ The :ref:`HashType` enum shows the supported hashi -\ **Note:** Not available in HTML5 exports. - Methods ------- diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index 30347b211..3d8e15266 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -20,6 +20,11 @@ Description Horizontal box container. See :ref:`BoxContainer`. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Theme Properties ---------------- diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index fce4fcbe8..81d306dba 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -11,12 +11,14 @@ HeightMapShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Height map shape for 3D physics. +Height map shape resource for 3D physics. Description ----------- -Height map shape resource, which can be added to a :ref:`PhysicsBody3D` or :ref:`Area3D`. +Height map shape resource, which can be added to a :ref:`PhysicsBody3D` or :ref:`Area3D`. Heightmap collision is typically used for colliding with terrains. However, since heightmaps cannot store overhangs, collisions with other structures (such as buildings) must be done with other collision shapes such as :ref:`ConcavePolygonShape3D`. If needed, "holes" can be created in an ``HeightMapShape3D`` by assigning very low points (like ``-100000``) in the desired area. + +\ **Performance:** ``HeightMapShape3D`` is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` or :ref:`BoxShape3D`. Properties ---------- diff --git a/classes/class_hflowcontainer.rst b/classes/class_hflowcontainer.rst index 8a8c8eee5..dd608df51 100644 --- a/classes/class_hflowcontainer.rst +++ b/classes/class_hflowcontainer.rst @@ -21,18 +21,18 @@ Horizontal version of :ref:`FlowContainer`. Theme Properties ---------------- -+-----------------------+---------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | -+-----------------------+---------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`vseparation` | ``4`` | -+-----------------------+---------------------------------------------------------------------+-------+ ++-----------------------+-----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`h_separation` | ``4`` | ++-----------------------+-----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`v_separation` | ``4`` | ++-----------------------+-----------------------------------------------------------------------+-------+ Theme Property Descriptions --------------------------- -.. _class_HFlowContainer_theme_constant_hseparation: +.. _class_HFlowContainer_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -42,9 +42,9 @@ The horizontal separation of children nodes. ---- -.. _class_HFlowContainer_theme_constant_vseparation: +.. _class_HFlowContainer_theme_constant_v_separation: -- :ref:`int` **vseparation** +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``4`` | diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index a28b12a70..bf245b85a 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -68,8 +68,6 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming t -\ **Note:** Not available in HTML5 exports. - Methods ------- diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst index 8cc8701c0..4cbaca7ea 100644 --- a/classes/class_hsplitcontainer.rst +++ b/classes/class_hsplitcontainer.rst @@ -18,6 +18,11 @@ Description Horizontal split container. See :ref:`SplitContainer`. This goes from left to right. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Theme Properties ---------------- diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index d8a425953..dcb5a55c2 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -201,7 +201,7 @@ Properties +-----------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_redirects` | ``8`` | +-----------------------------+----------------------------------------------------------------------------+-----------+ -| :ref:`int` | :ref:`timeout` | ``0`` | +| :ref:`float` | :ref:`timeout` | ``0.0`` | +-----------------------------+----------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_threads` | ``false`` | +-----------------------------+----------------------------------------------------------------------------+-----------+ @@ -392,10 +392,10 @@ Maximum number of allowed redirects. .. _class_HTTPRequest_property_timeout: -- :ref:`int` **timeout** +- :ref:`float` **timeout** +-----------+--------------------+ -| *Default* | ``0`` | +| *Default* | ``0.0`` | +-----------+--------------------+ | *Setter* | set_timeout(value) | +-----------+--------------------+ diff --git a/classes/class_image.rst b/classes/class_image.rst index 70be9d06b..305d6ddcd 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -72,7 +72,7 @@ Methods +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AlphaMode` | :ref:`detect_alpha` **(** **)** |const| | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** | +| :ref:`UsedChannels` | :ref:`detect_used_channels` **(** :ref:`CompressSource` source=0 **)** |const| | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`Color` color **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -479,7 +479,7 @@ Method Descriptions - void **blend_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dest``. +Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dest``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty. ---- @@ -487,7 +487,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dest - void **blend_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. +Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``, clipped accordingly to both image bounds. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with not positive size is treated as empty. ---- @@ -495,7 +495,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image - void **blit_rect** **(** :ref:`Image` src, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``. +Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with not positive size is treated as empty. ---- @@ -503,7 +503,7 @@ Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``. - void **blit_rect_mask** **(** :ref:`Image` src, :ref:`Image` mask, :ref:`Rect2` src_rect, :ref:`Vector2` dst **)** -Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. +Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``, clipped accordingly to both image bounds. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with not positive size is treated as empty. ---- @@ -607,7 +607,7 @@ Returns :ref:`ALPHA_BLEND` if the image has da .. _class_Image_method_detect_used_channels: -- :ref:`UsedChannels` **detect_used_channels** **(** :ref:`CompressSource` source=0 **)** +- :ref:`UsedChannels` **detect_used_channels** **(** :ref:`CompressSource` source=0 **)** |const| ---- diff --git a/classes/class_input.rst b/classes/class_input.rst index 4ef805ca3..834ba6321 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -27,6 +27,15 @@ Tutorials - `3D Voxel Demo `__ +Properties +---------- + ++----------------------------------------+--------------------------------------------------------------------------+ +| :ref:`MouseMode` | :ref:`mouse_mode` | ++----------------------------------------+--------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`use_accumulated_input` | ++----------------------------------------+--------------------------------------------------------------------------+ + Methods ------- @@ -47,7 +56,7 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_axis` **(** :ref:`StringName` negative_action, :ref:`StringName` positive_action **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_connected_joypads` **(** **)** | +| :ref:`int[]` | :ref:`get_connected_joypads` **(** **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`CursorShape` | :ref:`get_current_cursor_shape` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -71,8 +80,6 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`MouseButton` | :ref:`get_mouse_button_mask` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MouseMode` | :ref:`get_mouse_mode` **(** **)** |const| | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_vector` **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_just_pressed` **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| | @@ -109,17 +116,13 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_magnetometer` **(** :ref:`Vector3` value **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mouse_mode` **(** :ref:`MouseMode` mode **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_use_accumulated_input` **(** :ref:`bool` enable **)** | -+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`start_joy_vibration` **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`stop_joy_vibration` **(** :ref:`int` device **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`vibrate_handheld` **(** :ref:`int` duration_ms=500 **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse_position` **(** :ref:`Vector2` to **)** | +| void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -208,9 +211,9 @@ enum **CursorShape**: - **CURSOR_CROSS** = **3** --- Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. -- **CURSOR_WAIT** = **4** --- Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. +- **CURSOR_WAIT** = **4** --- Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). -- **CURSOR_BUSY** = **5** --- Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). +- **CURSOR_BUSY** = **5** --- Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. - **CURSOR_DRAG** = **6** --- Drag cursor. Usually displayed when dragging something. @@ -236,6 +239,37 @@ enum **CursorShape**: - **CURSOR_HELP** = **16** --- Help cursor. Usually a question mark. +Property Descriptions +--------------------- + +.. _class_Input_property_mouse_mode: + +- :ref:`MouseMode` **mouse_mode** + ++----------+-----------------------+ +| *Setter* | set_mouse_mode(value) | ++----------+-----------------------+ +| *Getter* | get_mouse_mode() | ++----------+-----------------------+ + +Controls the mouse mode. See :ref:`MouseMode` for more information. + +---- + +.. _class_Input_property_use_accumulated_input: + +- :ref:`bool` **use_accumulated_input** + ++----------+----------------------------------+ +| *Setter* | set_use_accumulated_input(value) | ++----------+----------------------------------+ +| *Getter* | is_using_accumulated_input() | ++----------+----------------------------------+ + +If ``true``, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + +Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. + Method Descriptions ------------------- @@ -271,7 +305,7 @@ Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally up - void **flush_buffered_events** **(** **)** -Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input (:ref:`set_use_accumulated_input`) or agile input flushing (:ref:`ProjectSettings.input_devices/buffering/agile_event_flushing`). +Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input (:ref:`use_accumulated_input`) or agile input flushing (:ref:`ProjectSettings.input_devices/buffering/agile_event_flushing`). The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling. @@ -295,7 +329,7 @@ Note this method returns an empty :ref:`Vector3` when running fro 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 :ref:`get_action_strength` instead. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -305,7 +339,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE 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. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -321,7 +355,7 @@ This is a shorthand for writing ``Input.get_action_strength("positive_action") - .. _class_Input_method_get_connected_joypads: -- :ref:`Array` **get_connected_joypads** **(** **)** +- :ref:`int[]` **get_connected_joypads** **(** **)** Returns an :ref:`Array` containing the device IDs of all currently connected joypads. @@ -421,14 +455,6 @@ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the ---- -.. _class_Input_method_get_mouse_mode: - -- :ref:`MouseMode` **get_mouse_mode** **(** **)** |const| - -Returns the mouse mode. See the constants for more information. - ----- - .. _class_Input_method_get_vector: - :ref:`Vector2` **get_vector** **(** :ref:`StringName` negative_x, :ref:`StringName` positive_x, :ref:`StringName` negative_y, :ref:`StringName` positive_y, :ref:`float` deadzone=-1.0 **)** |const| @@ -449,7 +475,7 @@ Returns ``true`` when the user starts pressing the action event, meaning it's `` This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. \ **Note:** Due to keyboard ghosting, :ref:`is_action_just_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. @@ -461,7 +487,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE Returns ``true`` when the user stops pressing the action event, meaning it's ``true`` only on the frame that the user released the button. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -471,7 +497,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE Returns ``true`` 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. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. \ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. @@ -638,24 +664,6 @@ Sets the value of the magnetic field of the magnetometer sensor. Can be used for ---- -.. _class_Input_method_set_mouse_mode: - -- void **set_mouse_mode** **(** :ref:`MouseMode` mode **)** - -Sets the mouse mode. See the constants for more information. - ----- - -.. _class_Input_method_set_use_accumulated_input: - -- void **set_use_accumulated_input** **(** :ref:`bool` enable **)** - -Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. - -Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. - ----- - .. _class_Input_method_start_joy_vibration: - void **start_joy_vibration** **(** :ref:`int` device, :ref:`float` weak_magnitude, :ref:`float` strong_magnitude, :ref:`float` duration=0 **)** @@ -680,15 +688,17 @@ Stops the vibration of the joypad. Vibrate Android and iOS devices. -\ **Note:** It needs ``VIBRATE`` permission for Android at export settings. iOS does not support duration. +\ **Note:** For Android, it requires enabling the ``VIBRATE`` permission in the export preset. + +\ **Note:** For iOS, specifying the duration is supported in iOS 13 and later. ---- -.. _class_Input_method_warp_mouse_position: +.. _class_Input_method_warp_mouse: -- void **warp_mouse_position** **(** :ref:`Vector2` to **)** +- void **warp_mouse** **(** :ref:`Vector2` position **)** -Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the game window. +Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if :ref:`MouseMode` is set to ``MOUSE_MODE_CONFINED`` or ``MOUSE_MODE_CONFINED_HIDDEN``. diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 1f4774380..71256a712 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -111,7 +111,7 @@ Returns a :ref:`String` representation of the event. Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type :ref:`InputEventJoypadMotion`. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -121,7 +121,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE Returns ``true`` if this input event matches a pre-defined action of any type. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -131,7 +131,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey` events, unless ``allow_echo`` is ``true``). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. \ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. @@ -143,7 +143,7 @@ If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputE Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- @@ -169,7 +169,7 @@ Returns ``true`` if this input event is an echo event (only for events of type : Returns ``true`` if the specified ``event`` matches this event. Only valid for action events i.e key (:ref:`InputEventKey`), button (:ref:`InputEventMouseButton` or :ref:`InputEventJoypadButton`), axis :ref:`InputEventJoypadMotion` or action (:ref:`InputEventAction`) events. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index b0d724537..e40897951 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -81,7 +81,7 @@ If ``true``, the button's state is pressed. If ``false``, the button's state is | *Getter* | get_pressure() | +-----------+---------------------+ -Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from ``0`` to ``1``. +Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from ``0`` to ``1``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index 05da7c34b..9b7a380d5 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -18,7 +18,7 @@ Description Contains mouse and pen motion information. Supports relative, absolute positions and velocity. See :ref:`Node._input`. -\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call :ref:`Input.set_use_accumulated_input` with ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. +\ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm `__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. Tutorials --------- diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index 3dd093a0d..c62c078cf 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -95,6 +95,8 @@ Returns a deadzone value for the action. Returns an array of :ref:`InputEvent`\ s associated with a given action. +\ **Note:** When used in the editor (e.g. a tool script or :ref:`EditorPlugin`), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the ``input/*`` settings from :ref:`ProjectSettings`. + ---- .. _class_InputMap_method_action_has_event: @@ -137,7 +139,7 @@ Removes an action from the ``InputMap``. Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent` is not pressed (for proper release detection). See :ref:`action_has_event` if you don't want this behavior. -If ``exact_match`` is ``false``, it ignores the input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. ---- diff --git a/classes/class_int.rst b/classes/class_int.rst index f7d4db2b2..dace413b8 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -69,8 +69,6 @@ Constructors Operators --------- -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`float` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ @@ -96,6 +94,10 @@ Operators +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`operator *` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`operator **` **(** :ref:`float` right **)** | ++-------------------------------------+------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`operator **` **(** :ref:`int` right **)** | ++-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`operator +` **(** :ref:`String` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator +` **(** :ref:`float` right **)** | @@ -120,8 +122,6 @@ Operators +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`int` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`float` right **)** | +-------------------------------------+------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`int` right **)** | @@ -179,10 +179,6 @@ Operator Descriptions .. _class_int_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`float` right **)** Returns ``true`` if operands are different from each other. @@ -285,6 +281,16 @@ Multiplies two ``int``\ s. ---- +.. _class_int_operator_pow_float: + +- :ref:`float` **operator **** **(** :ref:`float` right **)** + +---- + +- :ref:`int` **operator **** **(** :ref:`int` right **)** + +---- + .. _class_int_operator_sum_String: - :ref:`String` **operator +** **(** :ref:`String` right **)** @@ -385,10 +391,6 @@ Returns ``true`` the left integer is less than or equal to the right one. .. _class_int_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`float` right **)** Returns ``true`` if the integer is equal to the given :ref:`float`. diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 055ebd36e..4c74f6ce8 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -95,7 +95,7 @@ Constants .. _class_IP_constant_RESOLVER_INVALID_ID: -- **RESOLVER_MAX_QUERIES** = **32** --- Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID` is returned if exceeded. +- **RESOLVER_MAX_QUERIES** = **256** --- Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID` is returned if exceeded. - **RESOLVER_INVALID_ID** = **-1** --- Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES` is exceeded. diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index d3904aed1..dced504f9 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -22,6 +22,8 @@ Selectable items in the list may be selected or deselected and multiple selectio Item text only supports single-line strings, newline characters (e.g. ``\n``) in the string won't produce a newline. Text wrapping is enabled in :ref:`ICON_MODE_TOP` mode, but column's width is adjusted to fully fit its content by default. You need to set :ref:`fixed_column_width` greater than zero to wrap the text. +All ``set_*`` methods allow negative item index, which makes the item accessed from the last one. + Properties ---------- @@ -166,7 +168,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`guide_color` | ``Color(0, 0, 0, 0.1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | +| :ref:`int` | :ref:`h_separation` | ``4`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`icon_margin` | ``4`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ @@ -174,7 +176,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ -| :ref:`int` | :ref:`vseparation` | ``2`` | +| :ref:`int` | :ref:`v_separation` | ``2`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Font` | :ref:`font` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ @@ -196,6 +198,14 @@ Theme Properties Signals ------- +.. _class_ItemList_signal_empty_clicked: + +- **empty_clicked** **(** :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** + +Triggered when any mouse click is issued within the rect of the list but on empty space. + +---- + .. _class_ItemList_signal_item_activated: - **item_activated** **(** :ref:`int` index **)** @@ -204,16 +214,14 @@ Triggered when specified list item is activated via double-clicking or by pressi ---- -.. _class_ItemList_signal_item_rmb_selected: +.. _class_ItemList_signal_item_clicked: -- **item_rmb_selected** **(** :ref:`int` index, :ref:`Vector2` at_position **)** +- **item_clicked** **(** :ref:`int` index, :ref:`Vector2` at_position, :ref:`int` mouse_button_index **)** -Triggered when specified list item has been selected via right mouse clicking. +Triggered when specified list item has been clicked with any mouse button. The click position is also provided to allow appropriate popup of context menus at the correct location. -\ :ref:`allow_rmb_select` must be enabled. - ---- .. _class_ItemList_signal_item_selected: @@ -232,24 +240,6 @@ Triggered when specified item has been selected. Triggered when a multiple selection is altered on a list allowing multiple selection. ----- - -.. _class_ItemList_signal_nothing_selected: - -- **nothing_selected** **(** **)** - -Triggered when a left mouse click is issued within the rect of the list but on empty space. - ----- - -.. _class_ItemList_signal_rmb_clicked: - -- **rmb_clicked** **(** :ref:`Vector2` at_position **)** - -Triggered when a right mouse click is issued within the rect of the list but on empty space. - -\ :ref:`allow_rmb_select` must be enabled. - Enumerations ------------ @@ -932,9 +922,9 @@ Text :ref:`Color` used when the item is selected. ---- -.. _class_ItemList_theme_constant_hseparation: +.. _class_ItemList_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -980,9 +970,9 @@ The size of the item text outline. ---- -.. _class_ItemList_theme_constant_vseparation: +.. _class_ItemList_theme_constant_v_separation: -- :ref:`int` **vseparation** +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``2`` | diff --git a/classes/class_label.rst b/classes/class_label.rst index ce8091aca..384d06d29 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -47,7 +47,7 @@ Properties +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`int` | size_flags_vertical | ``4`` (overrides :ref:`Control`) | +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -306,7 +306,7 @@ Limits the amount of visible characters. If you set ``percent_visible`` to 0.5, .. _class_Label_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +- :ref:`StructuredTextParser` **structured_text_bidi_override** +-----------+------------------------------------------+ | *Default* | ``0`` | diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst new file mode 100644 index 000000000..b53df9cd6 --- /dev/null +++ b/classes/class_label3d.rst @@ -0,0 +1,681 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the Label3D.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_Label3D: + +Label3D +======= + +**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +Displays plain text in a 3D world. + +Description +----------- + +Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment. + +Properties +---------- + ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`alpha_scissor_threshold` | ``0.5`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`BillboardMode` | :ref:`billboard` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`double_sided` | ``true`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`fixed_size` | ``false`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Font` | :ref:`font` | | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`font_size` | ``16`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`String` | :ref:`language` | ``""`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`line_spacing` | ``0.0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`no_depth_test` | ``false`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`outline_modulate` | ``Color(0, 0, 0, 1)`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`outline_render_priority` | ``-1`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`outline_size` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`pixel_size` | ``0.01`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`render_priority` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`shaded` | ``false`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`String` | :ref:`text` | ``""`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Direction` | :ref:`text_direction` | ``0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`uppercase` | ``false`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`VerticalAlignment` | :ref:`vertical_alignment` | ``1`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`width` | ``500.0`` | ++-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+-----------------------+ + +Methods +------- + ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_opentype_features` **(** **)** | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`get_draw_flag` **(** :ref:`DrawFlags` flag **)** |const| | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_opentype_feature` **(** :ref:`String` tag **)** |const| | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_draw_flag` **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opentype_feature` **(** :ref:`String` tag, :ref:`int` value **)** | ++-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_Label3D_AutowrapMode: + +.. _class_Label3D_constant_AUTOWRAP_OFF: + +.. _class_Label3D_constant_AUTOWRAP_ARBITRARY: + +.. _class_Label3D_constant_AUTOWRAP_WORD: + +.. _class_Label3D_constant_AUTOWRAP_WORD_SMART: + +enum **AutowrapMode**: + +- **AUTOWRAP_OFF** = **0** --- Autowrap is disabled. + +- **AUTOWRAP_ARBITRARY** = **1** --- Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. + +- **AUTOWRAP_WORD** = **2** --- Wraps the text inside the node's bounding rectangle by soft-breaking between words. + +- **AUTOWRAP_WORD_SMART** = **3** --- Behaves similarly to :ref:`AUTOWRAP_WORD`, but force-breaks a word if that single word does not fit in one line. + +---- + +.. _enum_Label3D_DrawFlags: + +.. _class_Label3D_constant_FLAG_SHADED: + +.. _class_Label3D_constant_FLAG_DOUBLE_SIDED: + +.. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST: + +.. _class_Label3D_constant_FLAG_FIXED_SIZE: + +.. _class_Label3D_constant_FLAG_MAX: + +enum **DrawFlags**: + +- **FLAG_SHADED** = **0** --- If set, lights in the environment affect the label. + +- **FLAG_DOUBLE_SIDED** = **1** --- If set, text can be seen from the back as well. If not, the texture is invisible when looking at it from behind. + +- **FLAG_DISABLE_DEPTH_TEST** = **2** --- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + +- **FLAG_FIXED_SIZE** = **3** --- Label is scaled by depth so that it always appears the same size on screen. + +- **FLAG_MAX** = **4** --- Represents the size of the :ref:`DrawFlags` enum. + +---- + +.. _enum_Label3D_AlphaCutMode: + +.. _class_Label3D_constant_ALPHA_CUT_DISABLED: + +.. _class_Label3D_constant_ALPHA_CUT_DISCARD: + +.. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS: + +enum **AlphaCutMode**: + +- **ALPHA_CUT_DISABLED** = **0** --- This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. + +- **ALPHA_CUT_DISCARD** = **1** --- 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 :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa`). This mode is also known as *alpha testing* or *1-bit transparency*. + +\ **Note:** This mode might have issues with anti-aliased fonts and outlines, try adjusting :ref:`alpha_scissor_threshold` or using MSDF font. + +\ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + +- **ALPHA_CUT_OPAQUE_PREPASS** = **2** --- This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED` or :ref:`ALPHA_CUT_DISCARD`, but it allows displaying translucent areas and smooth edges while using proper sorting. + +\ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + +Property Descriptions +--------------------- + +.. _class_Label3D_property_alpha_cut: + +- :ref:`AlphaCutMode` **alpha_cut** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_alpha_cut_mode(value) | ++-----------+---------------------------+ +| *Getter* | get_alpha_cut_mode() | ++-----------+---------------------------+ + +The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode` for possible values. + +---- + +.. _class_Label3D_property_alpha_scissor_threshold: + +- :ref:`float` **alpha_scissor_threshold** + ++-----------+------------------------------------+ +| *Default* | ``0.5`` | ++-----------+------------------------------------+ +| *Setter* | set_alpha_scissor_threshold(value) | ++-----------+------------------------------------+ +| *Getter* | get_alpha_scissor_threshold() | ++-----------+------------------------------------+ + +Threshold at which the alpha scissor will discard values. + +---- + +.. _class_Label3D_property_autowrap_mode: + +- :ref:`AutowrapMode` **autowrap_mode** + ++-----------+--------------------------+ +| *Default* | ``0`` | ++-----------+--------------------------+ +| *Setter* | set_autowrap_mode(value) | ++-----------+--------------------------+ +| *Getter* | get_autowrap_mode() | ++-----------+--------------------------+ + +If set to something other than :ref:`AUTOWRAP_OFF`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see :ref:`AutowrapMode`. + +---- + +.. _class_Label3D_property_billboard: + +- :ref:`BillboardMode` **billboard** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_billboard_mode(value) | ++-----------+---------------------------+ +| *Getter* | get_billboard_mode() | ++-----------+---------------------------+ + +The billboard mode to use for the label. See :ref:`BillboardMode` for possible values. + +---- + +.. _class_Label3D_property_double_sided: + +- :ref:`bool` **double_sided** + ++-----------+----------------------+ +| *Default* | ``true`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. + +---- + +.. _class_Label3D_property_fixed_size: + +- :ref:`bool` **fixed_size** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, the label is rendered at the same size regardless of distance. + +---- + +.. _class_Label3D_property_font: + +- :ref:`Font` **font** + ++----------+-----------------+ +| *Setter* | set_font(value) | ++----------+-----------------+ +| *Getter* | get_font() | ++----------+-----------------+ + +:ref:`Font` used for the ``Label3D``'s text. + +---- + +.. _class_Label3D_property_font_size: + +- :ref:`int` **font_size** + ++-----------+----------------------+ +| *Default* | ``16`` | ++-----------+----------------------+ +| *Setter* | set_font_size(value) | ++-----------+----------------------+ +| *Getter* | get_font_size() | ++-----------+----------------------+ + +Font size of the ``Label3D``'s text. + +---- + +.. _class_Label3D_property_horizontal_alignment: + +- :ref:`HorizontalAlignment` **horizontal_alignment** + ++-----------+---------------------------------+ +| *Default* | ``1`` | ++-----------+---------------------------------+ +| *Setter* | set_horizontal_alignment(value) | ++-----------+---------------------------------+ +| *Getter* | get_horizontal_alignment() | ++-----------+---------------------------------+ + +Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment` constants. + +---- + +.. _class_Label3D_property_language: + +- :ref:`String` **language** + ++-----------+---------------------+ +| *Default* | ``""`` | ++-----------+---------------------+ +| *Setter* | set_language(value) | ++-----------+---------------------+ +| *Getter* | get_language() | ++-----------+---------------------+ + +Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + +---- + +.. _class_Label3D_property_line_spacing: + +- :ref:`float` **line_spacing** + ++-----------+-------------------------+ +| *Default* | ``0.0`` | ++-----------+-------------------------+ +| *Setter* | set_line_spacing(value) | ++-----------+-------------------------+ +| *Getter* | get_line_spacing() | ++-----------+-------------------------+ + +Vertical space between lines in multiline ``Label3D``. + +---- + +.. _class_Label3D_property_modulate: + +- :ref:`Color` **modulate** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ +| *Setter* | set_modulate(value) | ++-----------+-----------------------+ +| *Getter* | get_modulate() | ++-----------+-----------------------+ + +Text :ref:`Color` of the ``Label3D``. + +---- + +.. _class_Label3D_property_no_depth_test: + +- :ref:`bool` **no_depth_test** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, depth testing is disabled and the object will be drawn in render order. + +---- + +.. _class_Label3D_property_offset: + +- :ref:`Vector2` **offset** + ++-----------+-------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+-------------------+ +| *Setter* | set_offset(value) | ++-----------+-------------------+ +| *Getter* | get_offset() | ++-----------+-------------------+ + +The text drawing offset (in pixels). + +---- + +.. _class_Label3D_property_outline_modulate: + +- :ref:`Color` **outline_modulate** + ++-----------+-----------------------------+ +| *Default* | ``Color(0, 0, 0, 1)`` | ++-----------+-----------------------------+ +| *Setter* | set_outline_modulate(value) | ++-----------+-----------------------------+ +| *Getter* | get_outline_modulate() | ++-----------+-----------------------------+ + +The tint of :ref:`Font`'s outline. + +---- + +.. _class_Label3D_property_outline_render_priority: + +- :ref:`int` **outline_render_priority** + ++-----------+------------------------------------+ +| *Default* | ``-1`` | ++-----------+------------------------------------+ +| *Setter* | set_outline_render_priority(value) | ++-----------+------------------------------------+ +| *Getter* | get_outline_render_priority() | ++-----------+------------------------------------+ + +Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. + +\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). + +\ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + +---- + +.. _class_Label3D_property_outline_size: + +- :ref:`int` **outline_size** + ++-----------+-------------------------+ +| *Default* | ``0`` | ++-----------+-------------------------+ +| *Setter* | set_outline_size(value) | ++-----------+-------------------------+ +| *Getter* | get_outline_size() | ++-----------+-------------------------+ + +Text outline size. + +---- + +.. _class_Label3D_property_pixel_size: + +- :ref:`float` **pixel_size** + ++-----------+-----------------------+ +| *Default* | ``0.01`` | ++-----------+-----------------------+ +| *Setter* | set_pixel_size(value) | ++-----------+-----------------------+ +| *Getter* | get_pixel_size() | ++-----------+-----------------------+ + +The size of one pixel's width on the label to scale it in 3D. + +---- + +.. _class_Label3D_property_render_priority: + +- :ref:`int` **render_priority** + ++-----------+----------------------------+ +| *Default* | ``0`` | ++-----------+----------------------------+ +| *Setter* | set_render_priority(value) | ++-----------+----------------------------+ +| *Getter* | get_render_priority() | ++-----------+----------------------------+ + +Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. + +\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). + +\ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + +---- + +.. _class_Label3D_property_shaded: + +- :ref:`bool` **shaded** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, the :ref:`Light3D` in the :ref:`Environment` has effects on the label. + +---- + +.. _class_Label3D_property_structured_text_bidi_override: + +- :ref:`StructuredTextParser` **structured_text_bidi_override** + ++-----------+------------------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------------------+ +| *Setter* | set_structured_text_bidi_override(value) | ++-----------+------------------------------------------+ +| *Getter* | get_structured_text_bidi_override() | ++-----------+------------------------------------------+ + +Set BiDi algorithm override for the structured text. + +---- + +.. _class_Label3D_property_structured_text_bidi_override_options: + +- :ref:`Array` **structured_text_bidi_override_options** + ++-----------+--------------------------------------------------+ +| *Default* | ``[]`` | ++-----------+--------------------------------------------------+ +| *Setter* | set_structured_text_bidi_override_options(value) | ++-----------+--------------------------------------------------+ +| *Getter* | get_structured_text_bidi_override_options() | ++-----------+--------------------------------------------------+ + +Set additional options for BiDi override. + +---- + +.. _class_Label3D_property_text: + +- :ref:`String` **text** + ++-----------+-----------------+ +| *Default* | ``""`` | ++-----------+-----------------+ +| *Setter* | set_text(value) | ++-----------+-----------------+ +| *Getter* | get_text() | ++-----------+-----------------+ + +The text to display on screen. + +---- + +.. _class_Label3D_property_text_direction: + +- :ref:`Direction` **text_direction** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_text_direction(value) | ++-----------+---------------------------+ +| *Getter* | get_text_direction() | ++-----------+---------------------------+ + +Base text writing direction. + +---- + +.. _class_Label3D_property_texture_filter: + +- :ref:`TextureFilter` **texture_filter** + ++-----------+---------------------------+ +| *Default* | ``3`` | ++-----------+---------------------------+ +| *Setter* | set_texture_filter(value) | ++-----------+---------------------------+ +| *Getter* | get_texture_filter() | ++-----------+---------------------------+ + +Filter flags for the texture. See :ref:`TextureFilter` for options. + +---- + +.. _class_Label3D_property_uppercase: + +- :ref:`bool` **uppercase** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_uppercase(value) | ++-----------+----------------------+ +| *Getter* | is_uppercase() | ++-----------+----------------------+ + +If ``true``, all the text displays as UPPERCASE. + +---- + +.. _class_Label3D_property_vertical_alignment: + +- :ref:`VerticalAlignment` **vertical_alignment** + ++-----------+-------------------------------+ +| *Default* | ``1`` | ++-----------+-------------------------------+ +| *Setter* | set_vertical_alignment(value) | ++-----------+-------------------------------+ +| *Getter* | get_vertical_alignment() | ++-----------+-------------------------------+ + +Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment` constants. + +---- + +.. _class_Label3D_property_width: + +- :ref:`float` **width** + ++-----------+------------------+ +| *Default* | ``500.0`` | ++-----------+------------------+ +| *Setter* | set_width(value) | ++-----------+------------------+ +| *Getter* | get_width() | ++-----------+------------------+ + +Text width (in pixels), used for autowrap and fill alignment. + +Method Descriptions +------------------- + +.. _class_Label3D_method_clear_opentype_features: + +- void **clear_opentype_features** **(** **)** + +Removes all OpenType features. + +---- + +.. _class_Label3D_method_generate_triangle_mesh: + +- :ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| + +Returns a :ref:`TriangleMesh` with the label's vertices following its current configuration (such as its :ref:`pixel_size`). + +---- + +.. _class_Label3D_method_get_draw_flag: + +- :ref:`bool` **get_draw_flag** **(** :ref:`DrawFlags` flag **)** |const| + +Returns the value of the specified flag. + +---- + +.. _class_Label3D_method_get_opentype_feature: + +- :ref:`int` **get_opentype_feature** **(** :ref:`String` tag **)** |const| + +Returns OpenType feature ``tag``. + +---- + +.. _class_Label3D_method_set_draw_flag: + +- void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref:`bool` enabled **)** + +If ``true``, the specified flag will be enabled. See :ref:`DrawFlags` for a list of flags. + +---- + +.. _class_Label3D_method_set_opentype_feature: + +- void **set_opentype_feature** **(** :ref:`String` tag, :ref:`int` value **)** + +Returns OpenType feature ``tag``. More info: `OpenType feature tags `__. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index f23f6d57d..5e446c2f3 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -61,7 +61,7 @@ Properties +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`light_specular` | ``0.5`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`shadow_bias` | ``0.2`` | +| :ref:`float` | :ref:`shadow_bias` | ``0.1`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`shadow_blur` | ``1.0`` | +----------------------------------------+------------------------------------------------------------------------------------+-----------------------+ @@ -452,7 +452,7 @@ The intensity of the specular blob in objects affected by the light. At ``0``, t - :ref:`float` **shadow_bias** +-----------+------------------+ -| *Default* | ``0.2`` | +| *Default* | ``0.1`` | +-----------+------------------+ | *Setter* | set_param(value) | +-----------+------------------+ diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 961f01a66..eebf12434 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -114,7 +114,7 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ @@ -743,7 +743,7 @@ If ``false``, using shortcuts will be disabled. .. _class_LineEdit_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +- :ref:`StructuredTextParser` **structured_text_bidi_override** +-----------+------------------------------------------+ | *Default* | ``0`` | diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index cc0cbc80a..6873a53b1 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -23,23 +23,19 @@ See also :ref:`BaseButton` which contains common properties an Properties ---------- -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``0`` (overrides :ref:`Control`) | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | mouse_default_cursor_shape | ``2`` (overrides :ref:`Control`) | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`UnderlineMode` | :ref:`underline` | ``0`` | -+----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`language` | ``""`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`String` | :ref:`text` | ``""`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ +| :ref:`UnderlineMode` | :ref:`underline` | ``0`` | ++-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------+ Methods ------- @@ -117,7 +113,7 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. _class_LinkButton_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +- :ref:`StructuredTextParser` **structured_text_bidi_override** +-----------+------------------------------------------+ | *Default* | ``0`` | diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index 734df6c06..714f840fe 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -43,6 +43,11 @@ Adds a top, left, bottom, and right margin to all :ref:`Control` +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Theme Properties ---------------- diff --git a/classes/class_material.rst b/classes/class_material.rst index 3faa2957c..68bf32ea6 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -11,7 +11,7 @@ Material **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticlesMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` +**Inherited By:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticlesMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`PlaceholderMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` Abstract base :ref:`Resource` for coloring and shading geometry. diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index fc1e94c90..9c238ad22 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -64,7 +64,7 @@ Theme Properties +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``3`` | +| :ref:`int` | :ref:`h_separation` | ``3`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ @@ -219,9 +219,9 @@ Text :ref:`Color` used when the ``MenuButton`` is being pressed. ---- -.. _class_MenuButton_theme_constant_hseparation: +.. _class_MenuButton_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``3`` | diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 01a23f10c..a5a364a77 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -11,7 +11,7 @@ Mesh **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ArrayMesh`, :ref:`ImmediateMesh`, :ref:`PrimitiveMesh` +**Inherited By:** :ref:`ArrayMesh`, :ref:`ImmediateMesh`, :ref:`PlaceholderMesh`, :ref:`PrimitiveMesh` A :ref:`Resource` that contains vertex array-based geometry. @@ -34,9 +34,9 @@ Tutorials Properties ---------- -+---------------------------------+-------------------------------------------------------------------+--------------------+ -| :ref:`Vector2i` | :ref:`lightmap_size_hint` | ``Vector2i(0, 0)`` | -+---------------------------------+-------------------------------------------------------------------+--------------------+ ++---------------------------------+-------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`lightmap_size_hint` | ++---------------------------------+-------------------------------------------------------------------+ Methods ------- @@ -353,13 +353,11 @@ Property Descriptions - :ref:`Vector2i` **lightmap_size_hint** -+-----------+-------------------------------+ -| *Default* | ``Vector2i(0, 0)`` | -+-----------+-------------------------------+ -| *Setter* | set_lightmap_size_hint(value) | -+-----------+-------------------------------+ -| *Getter* | get_lightmap_size_hint() | -+-----------+-------------------------------+ ++----------+-------------------------------+ +| *Setter* | set_lightmap_size_hint(value) | ++----------+-------------------------------+ +| *Getter* | get_lightmap_size_hint() | ++----------+-------------------------------+ Sets a hint to be used for lightmap resolution. @@ -484,7 +482,7 @@ Calculate a :ref:`ConcavePolygonShape3D` from the m - :ref:`TriangleMesh` **generate_triangle_mesh** **(** **)** |const| -Generate a :ref:`TriangleMesh` from the mesh. +Generate a :ref:`TriangleMesh` from the mesh. Considers only surfaces using one of these primitive types: :ref:`PRIMITIVE_TRIANGLES`, :ref:`PRIMITIVE_TRIANGLE_STRIP`. ---- diff --git a/classes/class_missingnode.rst b/classes/class_missingnode.rst new file mode 100644 index 000000000..d225e5d2f --- /dev/null +++ b/classes/class_missingnode.rst @@ -0,0 +1,60 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the MissingNode.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_MissingNode: + +MissingNode +=========== + +**Inherits:** :ref:`Node` **<** :ref:`Object` + +This is an internal editor class intended for keeping data of nodes of unknown type. + +Description +----------- + +This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + +Properties +---------- + ++-----------------------------+------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`original_class` | ++-----------------------------+------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`recording_properties` | ++-----------------------------+------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_MissingNode_property_original_class: + +- :ref:`String` **original_class** + ++----------+---------------------------+ +| *Setter* | set_original_class(value) | ++----------+---------------------------+ +| *Getter* | get_original_class() | ++----------+---------------------------+ + +---- + +.. _class_MissingNode_property_recording_properties: + +- :ref:`bool` **recording_properties** + ++----------+---------------------------------+ +| *Setter* | set_recording_properties(value) | ++----------+---------------------------------+ +| *Getter* | is_recording_properties() | ++----------+---------------------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_missingresource.rst b/classes/class_missingresource.rst new file mode 100644 index 000000000..e08ed5bfb --- /dev/null +++ b/classes/class_missingresource.rst @@ -0,0 +1,60 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the MissingResource.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_MissingResource: + +MissingResource +=============== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +This is an internal editor class intended for keeping data of resources of unknown type. + +Description +----------- + +This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is. + +Properties +---------- + ++-----------------------------+----------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`original_class` | ++-----------------------------+----------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`recording_properties` | ++-----------------------------+----------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_MissingResource_property_original_class: + +- :ref:`String` **original_class** + ++----------+---------------------------+ +| *Setter* | set_original_class(value) | ++----------+---------------------------+ +| *Getter* | get_original_class() | ++----------+---------------------------+ + +---- + +.. _class_MissingResource_property_recording_properties: + +- :ref:`bool` **recording_properties** + ++----------+---------------------------------+ +| *Setter* | set_recording_properties(value) | ++----------+---------------------------------+ +| *Getter* | is_recording_properties() | ++----------+---------------------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 919352c7d..6fe1dadb2 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -20,7 +20,7 @@ This class implements the high-level multiplayer API. See also :ref:`Multiplayer By default, :ref:`SceneTree` has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene. -It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the :ref:`Node.custom_multiplayer` property, effectively allowing to run both client and server in the same scene. +It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the :ref:`SceneTree.set_multiplayer` method, effectively allowing to run both client and server in the same scene. \ **Note:** 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. @@ -233,7 +233,7 @@ Returns ``true`` if this MultiplayerAPI's :ref:`multiplayer_peer` override or you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default, :ref:`SceneTree` will poll its MultiplayerAPI for you. +Method used for polling the MultiplayerAPI. You only need to worry about this if you set :ref:`SceneTree.multiplayer_poll` to ``false``. By default, :ref:`SceneTree` will poll its MultiplayerAPI(s) for you. \ **Note:** This method results in RPCs being called, so they will be executed in the same context of this function (e.g. ``_process``, ``physics``, :ref:`Thread`). diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 5f2cb8fdb..b977299bd 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -11,7 +11,12 @@ MultiplayerPeerExtension **Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +Class that can be inherited to implement custom multiplayer API networking layers via GDExtension. +Description +----------- + +This class is designed to be inherited from a GDExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below **must** be implemented to have a working custom multiplayer implementation. See also :ref:`MultiplayerAPI`. Methods ------- @@ -57,96 +62,128 @@ Method Descriptions - :ref:`int` **_get_available_packet_count** **(** **)** |virtual| |const| +Called when the available packet count is internally requested by the :ref:`MultiplayerAPI`. + ---- .. _class_MultiplayerPeerExtension_method__get_connection_status: - :ref:`int` **_get_connection_status** **(** **)** |virtual| |const| +Called when the connection status is requested on the :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.get_connection_status`). + ---- .. _class_MultiplayerPeerExtension_method__get_max_packet_size: - :ref:`int` **_get_max_packet_size** **(** **)** |virtual| |const| +Called when the maximum allowed packet size (in bytes) is requested by the :ref:`MultiplayerAPI`. + ---- .. _class_MultiplayerPeerExtension_method__get_packet: - :ref:`int` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +Called when a packet needs to be received by the :ref:`MultiplayerAPI`, with ``p_buffer_size`` being the size of the binary ``p_buffer`` in bytes. + ---- .. _class_MultiplayerPeerExtension_method__get_packet_peer: - :ref:`int` **_get_packet_peer** **(** **)** |virtual| |const| +Called when the ID of the :ref:`MultiplayerPeer` who sent the most recent packet is requested (see :ref:`MultiplayerPeer.get_packet_peer`). + ---- .. _class_MultiplayerPeerExtension_method__get_transfer_channel: - :ref:`int` **_get_transfer_channel** **(** **)** |virtual| |const| +Called when the transfer channel to use is read on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_channel`). + ---- .. _class_MultiplayerPeerExtension_method__get_transfer_mode: - :ref:`int` **_get_transfer_mode** **(** **)** |virtual| |const| +Called when the transfer mode to use is read on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_mode`). + ---- .. _class_MultiplayerPeerExtension_method__get_unique_id: - :ref:`int` **_get_unique_id** **(** **)** |virtual| |const| +Called when the unique ID of this :ref:`MultiplayerPeer` is requested (see :ref:`MultiplayerPeer.get_unique_id`). + ---- .. _class_MultiplayerPeerExtension_method__is_refusing_new_connections: - :ref:`bool` **_is_refusing_new_connections** **(** **)** |virtual| |const| +Called when the "refuse new connections" status is requested on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.refuse_new_connections`). + ---- .. _class_MultiplayerPeerExtension_method__is_server: - :ref:`bool` **_is_server** **(** **)** |virtual| |const| +Called when the "is server" status is requested on the :ref:`MultiplayerAPI`. See :ref:`MultiplayerAPI.is_server`. + ---- .. _class_MultiplayerPeerExtension_method__poll: - :ref:`int` **_poll** **(** **)** |virtual| +Called when the :ref:`MultiplayerAPI` is polled. See :ref:`MultiplayerAPI.poll`. + ---- .. _class_MultiplayerPeerExtension_method__put_packet: - :ref:`int` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| +Called when a packet needs to be sent by the :ref:`MultiplayerAPI`, with ``p_buffer_size`` being the size of the binary ``p_buffer`` in bytes. + ---- .. _class_MultiplayerPeerExtension_method__set_refuse_new_connections: - void **_set_refuse_new_connections** **(** :ref:`bool` p_enable **)** |virtual| +Called when the "refuse new connections" status is set on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.refuse_new_connections`). + ---- .. _class_MultiplayerPeerExtension_method__set_target_peer: - void **_set_target_peer** **(** :ref:`int` p_peer **)** |virtual| +Called when the target peer to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.set_target_peer`). + ---- .. _class_MultiplayerPeerExtension_method__set_transfer_channel: - void **_set_transfer_channel** **(** :ref:`int` p_channel **)** |virtual| +Called when the channel to use is set for this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_channel`). + ---- .. _class_MultiplayerPeerExtension_method__set_transfer_mode: - void **_set_transfer_mode** **(** :ref:`int` p_mode **)** |virtual| +Called when the transfer mode is set on this :ref:`MultiplayerPeer` (see :ref:`MultiplayerPeer.transfer_mode`). + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index fc1bdcafc..42f1b867c 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -16,24 +16,30 @@ MultiplayerSpawner Properties ---------- -+-----------------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`bool` | :ref:`auto_spawn` | ``false`` | -+-----------------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`PackedScene[]` | :ref:`replication` | ``[]`` | -+-----------------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`int` | :ref:`spawn_limit` | ``0`` | -+-----------------------------------------+-------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`spawn_path` | ``NodePath("")`` | -+-----------------------------------------+-------------------------------------------------------------------+------------------+ ++---------------------------------+-------------------------------------------------------------------+------------------+ +| :ref:`bool` | :ref:`auto_spawn` | ``false`` | ++---------------------------------+-------------------------------------------------------------------+------------------+ +| :ref:`int` | :ref:`spawn_limit` | ``0`` | ++---------------------------------+-------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`spawn_path` | ``NodePath("")`` | ++---------------------------------+-------------------------------------------------------------------+------------------+ Methods ------- -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Object` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | -+-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`_spawn_custom` **(** :ref:`Variant` data **)** |virtual| | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_spawnable_scene` **(** :ref:`String` path **)** | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_spawnable_scenes` **(** **)** | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_spawnable_scene` **(** :ref:`int` path **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_spawnable_scene_count` **(** **)** |const| | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`spawn` **(** :ref:`Variant` data=null **)** | ++-----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -65,20 +71,6 @@ Property Descriptions ---- -.. _class_MultiplayerSpawner_property_replication: - -- :ref:`PackedScene[]` **replication** - -+-----------+-----------------------------+ -| *Default* | ``[]`` | -+-----------+-----------------------------+ -| *Setter* | set_spawnable_scenes(value) | -+-----------+-----------------------------+ -| *Getter* | get_spawnable_scenes() | -+-----------+-----------------------------+ - ----- - .. _class_MultiplayerSpawner_property_spawn_limit: - :ref:`int` **spawn_limit** @@ -114,6 +106,30 @@ Method Descriptions ---- +.. _class_MultiplayerSpawner_method_add_spawnable_scene: + +- void **add_spawnable_scene** **(** :ref:`String` path **)** + +---- + +.. _class_MultiplayerSpawner_method_clear_spawnable_scenes: + +- void **clear_spawnable_scenes** **(** **)** + +---- + +.. _class_MultiplayerSpawner_method_get_spawnable_scene: + +- :ref:`String` **get_spawnable_scene** **(** :ref:`int` path **)** |const| + +---- + +.. _class_MultiplayerSpawner_method_get_spawnable_scene_count: + +- :ref:`int` **get_spawnable_scene_count** **(** **)** |const| + +---- + .. _class_MultiplayerSpawner_method_spawn: - :ref:`Node` **spawn** **(** :ref:`Variant` data=null **)** diff --git a/classes/class_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index f2932fb7e..74b44a221 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -16,17 +16,29 @@ MultiplayerSynchronizer Properties ---------- -+-------------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`float` | :ref:`replication_interval` | ``0.0`` | -+-------------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`SceneReplicationConfig` | :ref:`resource` | | -+-------------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ -| :ref:`NodePath` | :ref:`root_path` | ``NodePath("")`` | -+-------------------------------------------------------------+------------------------------------------------------------------------------------------+------------------+ ++-------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ +| :ref:`SceneReplicationConfig` | :ref:`replication_config` | | ++-------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ +| :ref:`float` | :ref:`replication_interval` | ``0.0`` | ++-------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ +| :ref:`NodePath` | :ref:`root_path` | ``NodePath("..")`` | ++-------------------------------------------------------------+------------------------------------------------------------------------------------------+--------------------+ Property Descriptions --------------------- +.. _class_MultiplayerSynchronizer_property_replication_config: + +- :ref:`SceneReplicationConfig` **replication_config** + ++----------+-------------------------------+ +| *Setter* | set_replication_config(value) | ++----------+-------------------------------+ +| *Getter* | get_replication_config() | ++----------+-------------------------------+ + +---- + .. _class_MultiplayerSynchronizer_property_replication_interval: - :ref:`float` **replication_interval** @@ -41,24 +53,12 @@ Property Descriptions ---- -.. _class_MultiplayerSynchronizer_property_resource: - -- :ref:`SceneReplicationConfig` **resource** - -+----------+-------------------------------+ -| *Setter* | set_replication_config(value) | -+----------+-------------------------------+ -| *Getter* | get_replication_config() | -+----------+-------------------------------+ - ----- - .. _class_MultiplayerSynchronizer_property_root_path: - :ref:`NodePath` **root_path** +-----------+----------------------+ -| *Default* | ``NodePath("")`` | +| *Default* | ``NodePath("..")`` | +-----------+----------------------+ | *Setter* | set_root_path(value) | +-----------+----------------------+ diff --git a/classes/class_nativeextension.rst b/classes/class_nativeextension.rst index a93a56186..051fc4552 100644 --- a/classes/class_nativeextension.rst +++ b/classes/class_nativeextension.rst @@ -39,8 +39,6 @@ Enumerations .. _class_NativeExtension_constant_INITIALIZATION_LEVEL_SCENE: -.. _class_NativeExtension_constant_INITIALIZATION_LEVEL_DRIVER: - .. _class_NativeExtension_constant_INITIALIZATION_LEVEL_EDITOR: enum **InitializationLevel**: @@ -51,9 +49,7 @@ enum **InitializationLevel**: - **INITIALIZATION_LEVEL_SCENE** = **2** -- **INITIALIZATION_LEVEL_DRIVER** = **3** - -- **INITIALIZATION_LEVEL_EDITOR** = **4** +- **INITIALIZATION_LEVEL_EDITOR** = **3** Method Descriptions ------------------- diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 740239382..3e8bd0041 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -21,11 +21,15 @@ Description Properties ---------- ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_neighbors` | ``10`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`max_speed` | ``200.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`navigable_layers` | ``1`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`neighbor_dist` | ``500.0`` | +---------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`path_max_distance` | ``3.0`` | @@ -102,6 +106,22 @@ Notifies when the collision avoidance velocity is calculated. Emitted by :ref:`s Property Descriptions --------------------- +.. _class_NavigationAgent2D_property_avoidance_enabled: + +- :ref:`bool` **avoidance_enabled** + ++-----------+------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------+ +| *Setter* | set_avoidance_enabled(value) | ++-----------+------------------------------+ +| *Getter* | get_avoidance_enabled() | ++-----------+------------------------------+ + +If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. + +---- + .. _class_NavigationAgent2D_property_max_neighbors: - :ref:`int` **max_neighbors** @@ -134,6 +154,22 @@ The maximum speed that an agent can move. ---- +.. _class_NavigationAgent2D_property_navigable_layers: + +- :ref:`int` **navigable_layers** + ++-----------+-----------------------------+ +| *Default* | ``1`` | ++-----------+-----------------------------+ +| *Setter* | set_navigable_layers(value) | ++-----------+-----------------------------+ +| *Getter* | get_navigable_layers() | ++-----------+-----------------------------+ + +A bitfield determining what layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new layers. + +---- + .. _class_NavigationAgent2D_property_neighbor_dist: - :ref:`float` **neighbor_dist** @@ -259,6 +295,8 @@ Returns a :ref:`Vector2` in global coordinates, that can be moved - :ref:`RID` **get_rid** **(** **)** |const| +Returns the :ref:`RID` of this agent on the :ref:`NavigationServer2D`. + ---- .. _class_NavigationAgent2D_method_get_target_location: diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 40a488fbb..01655daed 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -21,25 +21,29 @@ Description Properties ---------- -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`bool` | :ref:`ignore_y` | ``true`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`max_neighbors` | ``10`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`max_speed` | ``10.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`neighbor_dist` | ``50.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`path_max_distance` | ``3.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`time_horizon` | ``5.0`` | -+---------------------------+------------------------------------------------------------------------------------------+----------+ ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`agent_height_offset` | ``0.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`avoidance_enabled` | ``false`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`ignore_y` | ``true`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`max_neighbors` | ``10`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`max_speed` | ``10.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`navigable_layers` | ``1`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`neighbor_dist` | ``50.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`path_max_distance` | ``3.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`radius` | ``1.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`target_desired_distance` | ``1.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`time_horizon` | ``5.0`` | ++---------------------------+------------------------------------------------------------------------------------------+-----------+ Methods ------- @@ -118,7 +122,23 @@ Property Descriptions | *Getter* | get_agent_height_offset() | +-----------+--------------------------------+ -The agent height offset to match the navigation mesh height. +The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. + +---- + +.. _class_NavigationAgent3D_property_avoidance_enabled: + +- :ref:`bool` **avoidance_enabled** + ++-----------+------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------+ +| *Setter* | set_avoidance_enabled(value) | ++-----------+------------------------------+ +| *Getter* | get_avoidance_enabled() | ++-----------+------------------------------+ + +If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer3D`. When :ref:`set_velocity` is used and the processing is completed a ``safe_velocity`` Vector3 is received with a signal connection to :ref:`velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. ---- @@ -170,6 +190,22 @@ The maximum speed that an agent can move. ---- +.. _class_NavigationAgent3D_property_navigable_layers: + +- :ref:`int` **navigable_layers** + ++-----------+-----------------------------+ +| *Default* | ``1`` | ++-----------+-----------------------------+ +| *Setter* | set_navigable_layers(value) | ++-----------+-----------------------------+ +| *Getter* | get_navigable_layers() | ++-----------+-----------------------------+ + +A bitfield determining what layers of navigation regions this agent will use to calculate path. Changing it runtime will clear current navigation path and generate new one, according to new layers. + +---- + .. _class_NavigationAgent3D_property_neighbor_dist: - :ref:`float` **neighbor_dist** @@ -295,6 +331,8 @@ Returns a :ref:`Vector3` in global coordinates, that can be moved - :ref:`RID` **get_rid** **(** **)** |const| +Returns the :ref:`RID` of this agent on the :ref:`NavigationServer3D`. + ---- .. _class_NavigationAgent3D_method_get_target_location: diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index c405c5b4a..1a47b90a5 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -27,17 +27,17 @@ Properties ---------- +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`agent/height` | ``2.0`` | +| :ref:`float` | :ref:`agent/height` | ``1.5`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`agent/max_climb` | ``0.9`` | +| :ref:`float` | :ref:`agent/max_climb` | ``0.25`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`agent/max_slope` | ``45.0`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`agent/radius` | ``1.0`` | +| :ref:`float` | :ref:`agent/radius` | ``0.5`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`cell/height` | ``0.2`` | +| :ref:`float` | :ref:`cell/height` | ``0.25`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`cell/size` | ``0.3`` | +| :ref:`float` | :ref:`cell/size` | ``0.25`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`detail/sample_distance` | ``6.0`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ @@ -65,7 +65,7 @@ Properties +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`region/merge_size` | ``20.0`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`region/min_size` | ``8.0`` | +| :ref:`float` | :ref:`region/min_size` | ``2.0`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`SamplePartitionType` | :ref:`sample_partition_type/sample_partition_type` | ``0`` | +---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------+ @@ -168,7 +168,7 @@ Property Descriptions - :ref:`float` **agent/height** +-----------+-------------------------+ -| *Default* | ``2.0`` | +| *Default* | ``1.5`` | +-----------+-------------------------+ | *Setter* | set_agent_height(value) | +-----------+-------------------------+ @@ -186,7 +186,7 @@ The minimum floor to ceiling height that will still allow the floor area to be c - :ref:`float` **agent/max_climb** +-----------+----------------------------+ -| *Default* | ``0.9`` | +| *Default* | ``0.25`` | +-----------+----------------------------+ | *Setter* | set_agent_max_climb(value) | +-----------+----------------------------+ @@ -220,7 +220,7 @@ The maximum slope that is considered walkable, in degrees. - :ref:`float` **agent/radius** +-----------+-------------------------+ -| *Default* | ``1.0`` | +| *Default* | ``0.5`` | +-----------+-------------------------+ | *Setter* | set_agent_radius(value) | +-----------+-------------------------+ @@ -238,7 +238,7 @@ The distance to erode/shrink the walkable area of the heightfield away from obst - :ref:`float` **cell/height** +-----------+------------------------+ -| *Default* | ``0.2`` | +| *Default* | ``0.25`` | +-----------+------------------------+ | *Setter* | set_cell_height(value) | +-----------+------------------------+ @@ -254,7 +254,7 @@ The Y axis cell size to use for fields. - :ref:`float` **cell/size** +-----------+----------------------+ -| *Default* | ``0.3`` | +| *Default* | ``0.25`` | +-----------+----------------------+ | *Setter* | set_cell_size(value) | +-----------+----------------------+ @@ -482,7 +482,7 @@ Any regions with a size smaller than this will be merged with larger regions if - :ref:`float` **region/min_size** +-----------+----------------------------+ -| *Default* | ``8.0`` | +| *Default* | ``2.0`` | +-----------+----------------------------+ | *Setter* | set_region_min_size(value) | +-----------+----------------------------+ diff --git a/classes/class_navigationmeshgenerator.rst b/classes/class_navigationmeshgenerator.rst index ef0d29bf0..3cf65f93c 100644 --- a/classes/class_navigationmeshgenerator.rst +++ b/classes/class_navigationmeshgenerator.rst @@ -11,7 +11,18 @@ NavigationMeshGenerator **Inherits:** :ref:`Object` +Helper class for creating and clearing navigation meshes. +Description +----------- + +This class is responsible for creating and clearing 3D navigation meshes used as :ref:`NavigationMesh` resources inside :ref:`NavigationRegion3D`. The ``NavigationMeshGenerator`` has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. + +The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. + +Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the :ref:`NavigationMesh` resource. In the first step, starting from a root node and depending on :ref:`NavigationMesh` properties all valid 3D source geometry nodes are collected from the :ref:`SceneTree`. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal :ref:`MeshInstance3D`\ s to :ref:`CSGShape3D`\ s or various :ref:`CollisionObject3D`\ s, some operations to collect geometry data can trigger :ref:`RenderingServer` and :ref:`PhysicsServer3D` synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves :ref:`Mutex` locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to :ref:`NavigationMesh` agent properties by creating a voxel world around the meshes bounding area. + +The finalized navigation mesh is then returned and stored inside the :ref:`NavigationMesh` for use as a resource inside :ref:`NavigationRegion3D` nodes. Methods ------- @@ -29,12 +40,16 @@ Method Descriptions - void **bake** **(** :ref:`NavigationMesh` nav_mesh, :ref:`Node` root_node **)** +Bakes navigation data to the provided ``nav_mesh`` by parsing child nodes under the provided ``root_node`` or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the :ref:`NavigationMesh.geometry/parsed_geometry_type` and :ref:`NavigationMesh.geometry/source_geometry_mode` properties on the :ref:`NavigationMesh` resource. + ---- .. _class_NavigationMeshGenerator_method_clear: - void **clear** **(** :ref:`NavigationMesh` nav_mesh **)** +Removes all polygons and vertices from the provided ``nav_mesh`` resource. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index c4d33ef95..af291b161 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -18,6 +18,8 @@ Description 2D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. ``NavigationObstacle2D`` is physics safe. +\ **Note:** Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. + Properties ---------- @@ -27,6 +29,13 @@ Properties | :ref:`float` | :ref:`radius` | ``1.0`` | +---------------------------+-----------------------------------------------------------------------------+----------+ +Methods +------- + ++-----------------------+-------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | ++-----------------------+-------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -60,6 +69,15 @@ Enables radius estimation algorithm which uses parent's collision shapes to dete The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +Method Descriptions +------------------- + +.. _class_NavigationObstacle2D_method_get_rid: + +- :ref:`RID` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer2D`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index 761f6ae1f..cbb542082 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -18,6 +18,8 @@ Description 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. ``NavigationObstacle3D`` is physics safe. +\ **Note:** Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently. + Properties ---------- @@ -27,6 +29,13 @@ Properties | :ref:`float` | :ref:`radius` | ``1.0`` | +---------------------------+-----------------------------------------------------------------------------+----------+ +Methods +------- + ++-----------------------+-------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_rid` **(** **)** |const| | ++-----------------------+-------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -60,6 +69,15 @@ Enables radius estimation algorithm which uses parent's collision shapes to dete The radius of the agent. Used only if :ref:`estimate_radius` is set to false. +Method Descriptions +------------------- + +.. _class_NavigationObstacle3D_method_get_rid: + +- :ref:`RID` **get_rid** **(** **)** |const| + +Returns the :ref:`RID` of this obstacle on the :ref:`NavigationServer3D`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 7fd1e5893..46b7867e9 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -85,6 +85,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_polygons` **(** **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`NavigationMesh` | :ref:`get_mesh` **(** **)** | ++-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`get_outline` **(** :ref:`int` idx **)** |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_outline_count` **(** **)** |const| | @@ -147,6 +149,14 @@ Clears the array of polygons, but it doesn't clear the array of outlines and ver ---- +.. _class_NavigationPolygon_method_get_mesh: + +- :ref:`NavigationMesh` **get_mesh** **(** **)** + +Returns the :ref:`NavigationMesh` resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the :ref:`NavigationServer3D.region_set_navmesh` API directly (as 2D uses the 3D server behind the scene). + +---- + .. _class_NavigationPolygon_method_get_outline: - :ref:`PackedVector2Array` **get_outline** **(** :ref:`int` idx **)** |const| diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 20ff9168a..95321e0f7 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -33,6 +33,13 @@ Properties | :ref:`NavigationPolygon` | :ref:`navpoly` | | +---------------------------------------------------+-----------------------------------------------------------+----------+ +Methods +------- + ++-----------------------+-------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | ++-----------------------+-------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -80,6 +87,15 @@ A bitfield determining all layers the region belongs to. These layers can be che The :ref:`NavigationPolygon` resource to use. +Method Descriptions +------------------- + +.. _class_NavigationRegion2D_method_get_region_rid: + +- :ref:`RID` **get_region_rid** **(** **)** |const| + +Returns the :ref:`RID` of this region on the :ref:`NavigationServer2D`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner` can be used to identify the ``NavigationRegion2D`` closest to a point on the merged navigation map. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index e426fc312..8f5c6517e 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -34,9 +34,11 @@ Properties Methods ------- -+------+-----------------------------------------------------------------------------------------------+ -| void | :ref:`bake_navigation_mesh` **(** **)** | -+------+-----------------------------------------------------------------------------------------------+ ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`bake_navigation_mesh` **(** :ref:`bool` on_thread=true **)** | ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`get_region_rid` **(** **)** |const| | ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -107,9 +109,17 @@ Method Descriptions .. _class_NavigationRegion3D_method_bake_navigation_mesh: -- void **bake_navigation_mesh** **(** **)** +- void **bake_navigation_mesh** **(** :ref:`bool` on_thread=true **)** -Bakes the :ref:`NavigationMesh`. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new :ref:`NavigationMesh`. +Bakes the :ref:`NavigationMesh`. If ``on_thread`` is set to ``true`` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new :ref:`NavigationMesh`. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled). + +---- + +.. _class_NavigationRegion3D_method_get_region_rid: + +- :ref:`RID` **get_region_rid** **(** **)** |const| + +Returns the :ref:`RID` of this region on the :ref:`NavigationServer3D`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner` can be used to identify the ``NavigationRegion3D`` closest to a point on the merged navigation map. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index c87fa2a23..31f5077fe 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -18,7 +18,11 @@ Description 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 ``edge_connection_margin`` to the respective other edge's vertex. +Maps are made up of regions, which are made of navigation polygons. Together, they define the navigable areas in the 2D world. + +\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. + +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 ``edge_connection_margin`` to the respective other edge's vertex. You may assign navigation layers to regions with :ref:`region_set_layers`, which then can be checked upon when requesting a path with :ref:`map_get_path`. This allows allowing or forbidding some areas to 2D objects. @@ -39,6 +43,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_create` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | @@ -61,10 +67,12 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free` **(** :ref:`RID` object **)** |const| | +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`map_create` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | @@ -75,6 +83,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` layers=1 **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` nap **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** |const| | @@ -93,6 +103,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_layers` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_layers` **(** :ref:`RID` region, :ref:`int` layers **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | @@ -122,6 +134,14 @@ Creates the agent. ---- +.. _class_NavigationServer2D_method_agent_get_map: + +- :ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| + +Returns the navigation map :ref:`RID` the requested ``agent`` is currently assigned to. + +---- + .. _class_NavigationServer2D_method_agent_is_map_changed: - :ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| @@ -210,11 +230,11 @@ Sets the current velocity of the agent. ---- -.. _class_NavigationServer2D_method_free: +.. _class_NavigationServer2D_method_free_rid: -- void **free** **(** :ref:`RID` object **)** |const| +- void **free_rid** **(** :ref:`RID` rid **)** |const| -Destroy the RID +Destroys the given RID. ---- @@ -226,6 +246,14 @@ Create a new map. ---- +.. _class_NavigationServer2D_method_map_get_agents: + +- :ref:`Array` **map_get_agents** **(** :ref:`RID` map **)** |const| + +Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +---- + .. _class_NavigationServer2D_method_map_get_cell_size: - :ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| @@ -266,6 +294,14 @@ Returns the navigation path to reach the destination from the origin. ``layers`` ---- +.. _class_NavigationServer2D_method_map_get_regions: + +- :ref:`Array` **map_get_regions** **(** :ref:`RID` map **)** |const| + +Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +---- + .. _class_NavigationServer2D_method_map_is_active: - :ref:`bool` **map_is_active** **(** :ref:`RID` nap **)** |const| @@ -338,6 +374,14 @@ Returns the region's layers. ---- +.. _class_NavigationServer2D_method_region_get_map: + +- :ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| + +Returns the navigation map :ref:`RID` the requested ``region`` is currently assigned to. + +---- + .. _class_NavigationServer2D_method_region_set_layers: - void **region_set_layers** **(** :ref:`RID` region, :ref:`int` layers **)** |const| diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index c02aae6f5..21a9c0244 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -18,7 +18,11 @@ Description 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 ``edge_connection_margin`` to the respective other edge's vertex. +Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. + +\ **Note:** Most NavigationServer changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation related Nodes in the SceneTree or made through scripts. + +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 ``edge_connection_margin`` to the respective other edge's vertex. You may assign navigation layers to regions with :ref:`region_set_layers`, which then can be checked upon when requesting a path with :ref:`map_get_path`. This allows allowing or forbidding some areas to 3D objects. @@ -39,6 +43,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`agent_create` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | ++-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_callback` **(** :ref:`RID` agent, :ref:`Object` receiver, :ref:`StringName` method, :ref:`Variant` userdata=null **)** |const| | @@ -61,10 +67,12 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector3` velocity **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`free` **(** :ref:`RID` object **)** |const| | +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`map_create` **(** **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | ++-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector3` to_point **)** |const| | @@ -79,6 +87,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector3` origin, :ref:`Vector3` destination, :ref:`bool` optimize, :ref:`int` layers=1 **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | ++-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`map_get_up` **(** :ref:`RID` map **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` nap **)** |const| | @@ -105,6 +115,8 @@ Methods +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`region_get_layers` **(** :ref:`RID` region **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | ++-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_layers` **(** :ref:`RID` region, :ref:`int` layers **)** |const| | +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** |const| | @@ -136,6 +148,14 @@ Creates the agent. ---- +.. _class_NavigationServer3D_method_agent_get_map: + +- :ref:`RID` **agent_get_map** **(** :ref:`RID` agent **)** |const| + +Returns the navigation map :ref:`RID` the requested ``agent`` is currently assigned to. + +---- + .. _class_NavigationServer3D_method_agent_is_map_changed: - :ref:`bool` **agent_is_map_changed** **(** :ref:`RID` agent **)** |const| @@ -224,11 +244,11 @@ Sets the current velocity of the agent. ---- -.. _class_NavigationServer3D_method_free: +.. _class_NavigationServer3D_method_free_rid: -- void **free** **(** :ref:`RID` object **)** |const| +- void **free_rid** **(** :ref:`RID` rid **)** |const| -Destroy the RID +Destroys the given RID. ---- @@ -240,6 +260,14 @@ Create a new map. ---- +.. _class_NavigationServer3D_method_map_get_agents: + +- :ref:`Array` **map_get_agents** **(** :ref:`RID` map **)** |const| + +Returns all navigation agents :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +---- + .. _class_NavigationServer3D_method_map_get_cell_size: - :ref:`float` **map_get_cell_size** **(** :ref:`RID` map **)** |const| @@ -296,6 +324,14 @@ Returns the navigation path to reach the destination from the origin. ``layers`` ---- +.. _class_NavigationServer3D_method_map_get_regions: + +- :ref:`Array` **map_get_regions** **(** :ref:`RID` map **)** |const| + +Returns all navigation regions :ref:`RID`\ s that are currently assigned to the requested navigation ``map``. + +---- + .. _class_NavigationServer3D_method_map_get_up: - :ref:`Vector3` **map_get_up** **(** :ref:`RID` map **)** |const| @@ -404,6 +440,14 @@ Returns the region's layers. ---- +.. _class_NavigationServer3D_method_region_get_map: + +- :ref:`RID` **region_get_map** **(** :ref:`RID` region **)** |const| + +Returns the navigation map :ref:`RID` the requested ``region`` is currently assigned to. + +---- + .. _class_NavigationServer3D_method_region_set_layers: - void **region_set_layers** **(** :ref:`RID` region, :ref:`int` layers **)** |const| diff --git a/classes/class_node.rst b/classes/class_node.rst index 635aef44e..da8824b4f 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -11,7 +11,7 @@ Node **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorInterface`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`NavigationObstacle2D`, :ref:`NavigationObstacle3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` +**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorInterface`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`NavigationObstacle2D`, :ref:`NavigationObstacle3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` Base class for all *scene* objects. @@ -52,23 +52,23 @@ Tutorials Properties ---------- -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`MultiplayerAPI` | :ref:`custom_multiplayer` | | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`editor_description` | ``""`` | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`MultiplayerAPI` | :ref:`multiplayer` | | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`StringName` | :ref:`name` | | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`Node` | :ref:`owner` | | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`int` | :ref:`process_priority` | ``0`` | -+---------------------------------------------+-------------------------------------------------------------------+--------+ -| :ref:`String` | :ref:`scene_file_path` | | -+---------------------------------------------+-------------------------------------------------------------------+--------+ ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`editor_description` | ``""`` | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`MultiplayerAPI` | :ref:`multiplayer` | | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`StringName` | :ref:`name` | | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`Node` | :ref:`owner` | | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`ProcessMode` | :ref:`process_mode` | ``0`` | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`process_priority` | ``0`` | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`scene_file_path` | | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`unique_name_in_owner` | ``false`` | ++---------------------------------------------+-----------------------------------------------------------------------+-----------+ Methods ------- @@ -88,6 +88,8 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_ready` **(** **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | @@ -104,9 +106,11 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`duplicate` **(** :ref:`int` flags=15 **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node[]` | :ref:`find_nodes` **(** :ref:`String` mask, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | +| :ref:`Node` | :ref:`find_child` **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` mask **)** |const| | +| :ref:`Node[]` | :ref:`find_children` **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Node` | :ref:`find_parent` **(** :ref:`String` pattern **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx, :ref:`bool` include_internal=false **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -170,13 +174,15 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_internal` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_processing_shortcut_input` **(** **)** |const| | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_position **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`print_stray_nodes` **(** **)** | +| void | :ref:`print_orphan_nodes` **(** **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_tree` **(** **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -200,11 +206,11 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`request_ready` **(** **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | +| void | :ref:`rpc` **(** :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rpc_config` **(** :ref:`StringName` method, :ref:`RPCMode` rpc_mode, :ref:`bool` call_local=false, :ref:`TransferMode` transfer_mode=2, :ref:`int` channel=0 **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | +| void | :ref:`rpc_id` **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -222,6 +228,8 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_internal` **(** :ref:`bool` enable **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_process_shortcut_input` **(** :ref:`bool` enable **)** | ++---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | @@ -466,9 +474,15 @@ Constants - **NOTIFICATION_INSTANCED** = **20** --- Notification received when the node is instantiated. -- **NOTIFICATION_DRAG_BEGIN** = **21** --- Notification received when a drag begins. +- **NOTIFICATION_DRAG_BEGIN** = **21** --- Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. -- **NOTIFICATION_DRAG_END** = **22** --- Notification received when a drag ends. +Can be triggered either by dragging a :ref:`Control` that provides drag data (see :ref:`Control._get_drag_data`) or using :ref:`Control.force_drag`. + +Use :ref:`Viewport.gui_get_drag_data` to get the dragged data. + +- **NOTIFICATION_DRAG_END** = **22** --- Notification received when a drag operation ends. + +Use :ref:`Viewport.gui_is_drag_successful` to check if the drag succeeded. - **NOTIFICATION_PATH_RENAMED** = **23** --- Notification received when the node's name or one of its parents' name is changed. This notification is *not* received when the node is removed from the scene tree to be added to another parent later on. @@ -553,20 +567,6 @@ Implemented on desktop platforms. Property Descriptions --------------------- -.. _class_Node_property_custom_multiplayer: - -- :ref:`MultiplayerAPI` **custom_multiplayer** - -+----------+-------------------------------+ -| *Setter* | set_custom_multiplayer(value) | -+----------+-------------------------------+ -| *Getter* | get_custom_multiplayer() | -+----------+-------------------------------+ - -The override to the default :ref:`MultiplayerAPI`. Set to ``null`` to use the default :ref:`SceneTree` one. - ----- - .. _class_Node_property_editor_description: - :ref:`String` **editor_description** @@ -579,7 +579,7 @@ The override to the default :ref:`MultiplayerAPI`. Set to | *Getter* | get_editor_description() | +-----------+-------------------------------+ -Add a custom description to a node. +Add a custom description to a node. It will be displayed in a tooltip when hovered in editor's scene tree. ---- @@ -591,7 +591,7 @@ Add a custom description to a node. | *Getter* | get_multiplayer() | +----------+-------------------+ -The :ref:`MultiplayerAPI` instance associated with this node. Either the :ref:`custom_multiplayer`, or the default SceneTree one (if inside tree). +The :ref:`MultiplayerAPI` instance associated with this node. See :ref:`SceneTree.get_multiplayer`. ---- @@ -623,6 +623,8 @@ The name of the node. This name is unique among the siblings (other child nodes 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 :ref:`PackedScene`), all the nodes it owns will be saved with it. This allows for the creation of complex :ref:`SceneTree`\ s, with instancing and subinstancing. +\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child`. This is typically relevant for :doc:`tool scripts <../tutorials/misc/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. + ---- .. _class_Node_property_process_mode: @@ -669,6 +671,24 @@ The node's priority in the execution order of the enabled processing callbacks ( If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in :ref:`scene_file_path` (e.g. ``res://levels/1.tscn``). Otherwise, :ref:`scene_file_path` is set to an empty string. +---- + +.. _class_Node_property_unique_name_in_owner: + +- :ref:`bool` **unique_name_in_owner** + ++-----------+---------------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------------+ +| *Setter* | set_unique_name_in_owner(value) | ++-----------+---------------------------------+ +| *Getter* | is_unique_name_in_owner() | ++-----------+---------------------------------+ + +Sets this node's name as a unique name in its :ref:`owner`. This allows the node to be accessed as ``%Name`` instead of the full path, from any node within that scene. + +If another node with the same owner already had that name declared as unique, that other node's name will no longer be set as having a unique name. + Method Descriptions ------------------- @@ -762,6 +782,22 @@ Usually used for initialization. For even earlier initialization, :ref:`Object._ ---- +.. _class_Node_method__shortcut_input: + +- void **_shortcut_input** **(** :ref:`InputEvent` event **)** |virtual| + +Called when an :ref:`InputEventKey` or :ref:`InputEventShortcut` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. The input event propagates up through the node tree until a node consumes it. + +It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_shortcut_input`. + +To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. + +This method can be used to handle shortcuts. + +\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). + +---- + .. _class_Node_method__unhandled_input: - void **_unhandled_input** **(** :ref:`InputEvent` event **)** |virtual| @@ -788,6 +824,8 @@ It is only called if unhandled key input processing is enabled, which is done au To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +This method can be used to handle Unicode character input with :kbd:`Alt`, :kbd:`Alt + Ctrl`, and :kbd:`Alt + Shift` modifiers, after shortcuts were handled. + For gameplay input, this and :ref:`_unhandled_input` are usually a better fit than :ref:`_input` as they allow the GUI to intercept the events first. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -829,7 +867,7 @@ If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED` instead of this method. -\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child`. This is typically relevant for `tool scripts `__ and `editor plugins `__. If :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. +\ **Note:** If you want a child to be persisted to a :ref:`PackedScene`, you must set :ref:`owner` in addition to calling :ref:`add_child`. This is typically relevant for :doc:`tool scripts <../tutorials/misc/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If :ref:`add_child` is called without setting :ref:`owner`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. ---- @@ -891,33 +929,57 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags` **find_nodes** **(** :ref:`String` mask, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| +- :ref:`Node` **find_child** **(** :ref:`String` pattern, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| -Finds descendants of this node whose, name matches ``mask`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. +Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match`. -\ ``mask`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). -\ ``type`` will check equality or inheritance. It is case-sensitive, ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around. +If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. -If ``owned`` is ``true``, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. +If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. -Returns an empty array, if no matching nodes are found. +Returns ``null`` if no matching ``Node`` is found. -\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. To avoid using :ref:`find_nodes` too often, consider caching the node references into variables. +\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using :ref:`get_node` with unique names instead (see :ref:`unique_name_in_owner`), or caching the node references into variable. + +\ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children`. + +---- + +.. _class_Node_method_find_children: + +- :ref:`Node[]` **find_children** **(** :ref:`String` pattern, :ref:`String` type="", :ref:`bool` recursive=true, :ref:`bool` owned=true **)** |const| + +Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match`, and/or type matches ``type`` as in :ref:`Object.is_class`. + +\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). + +\ ``type`` will check equality or inheritance, and is case-sensitive. ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around. + +If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. + +If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. + +Returns an empty array if no matching nodes are found. + +\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. Whenever possible, consider caching the node references into variables. + +\ **Note:** If you only want to find the first descendant node that matches a pattern, see :ref:`find_child`. ---- .. _class_Node_method_find_parent: -- :ref:`Node` **find_parent** **(** :ref:`String` mask **)** |const| +- :ref:`Node` **find_parent** **(** :ref:`String` pattern **)** |const| -Finds the first parent of the current node whose name matches ``mask`` as in :ref:`String.match` (i.e. case-sensitive, but ``"*"`` matches zero or more characters and ``"?"`` matches any single character except ``"."``). +Finds the first parent of the current node whose name matches ``pattern`` as in :ref:`String.match`. -\ **Note:** It does not match against the full path, just against individual node names. +\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). -\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node` instead. To avoid using :ref:`find_parent` too often, consider caching the node reference into a variable. +\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node` with unique names instead (see :ref:`unique_name_in_owner`), or caching the node references into variable. ---- @@ -1250,6 +1312,14 @@ Returns ``true`` if internal processing is enabled (see :ref:`set_process_intern ---- +.. _class_Node_method_is_processing_shortcut_input: + +- :ref:`bool` **is_processing_shortcut_input** **(** **)** |const| + +Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input`). + +---- + .. _class_Node_method_is_processing_unhandled_input: - :ref:`bool` **is_processing_unhandled_input** **(** **)** |const| @@ -1276,11 +1346,13 @@ Moves a child node to a different position (order) among the other children. Sin ---- -.. _class_Node_method_print_stray_nodes: +.. _class_Node_method_print_orphan_nodes: -- void **print_stray_nodes** **(** **)** +- void **print_orphan_nodes** **(** **)** -Prints all stray nodes (nodes outside the :ref:`SceneTree`). Used for debugging. Works only in debug builds. +Prints all orphan nodes (nodes outside the :ref:`SceneTree`). Used for debugging. + +\ **Note:** :ref:`print_orphan_nodes` only works in debug builds. When called in a project exported in release mode, :ref:`print_orphan_nodes` will not print anything. ---- @@ -1404,9 +1476,9 @@ Requests that ``_ready`` be called again. Note that the method won't be called i .. _class_Node_method_rpc: -- :ref:`Variant` **rpc** **(** :ref:`StringName` method, ... **)** |vararg| +- void **rpc** **(** :ref:`StringName` method, ... **)** |vararg| -Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same node name. Behaviour depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. Returns an empty :ref:`Variant`. +Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath`, including the exact same node name. Behaviour depends on the RPC configuration for the given method, see :ref:`rpc_config`. Methods are not exposed to RPCs by default. Returns ``null``. \ **Note:** You can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`MultiplayerAPI`. You also need to keep track of the connection state, either by the :ref:`MultiplayerAPI` signals like ``server_disconnected`` or by checking ``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``. @@ -1416,15 +1488,15 @@ Sends a remote procedure call request for the given ``method`` to peers on the n - :ref:`int` **rpc_config** **(** :ref:`StringName` method, :ref:`RPCMode` rpc_mode, :ref:`bool` call_local=false, :ref:`TransferMode` transfer_mode=2, :ref:`int` channel=0 **)** -Changes the RPC mode for the given ``method`` to the given ``rpc_mode``, optionally specifying the ``transfer_mode`` and ``channel`` (on supported peers). See :ref:`RPCMode` and :ref:`TransferMode`. An alternative is annotating methods and properties with the corresponding annotation (``@rpc(any)``, ``@rpc(auth)``). By default, methods are not exposed to networking (and RPCs). +Changes the RPC mode for the given ``method`` to the given ``rpc_mode``, optionally specifying the ``transfer_mode`` and ``channel`` (on supported peers). See :ref:`RPCMode` and :ref:`TransferMode`. An alternative is annotating methods and properties with the corresponding annotation (``@rpc(any)``, ``@rpc(authority)``). By default, methods are not exposed to networking (and RPCs). ---- .. _class_Node_method_rpc_id: -- :ref:`Variant` **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| +- void **rpc_id** **(** :ref:`int` peer_id, :ref:`StringName` method, ... **)** |vararg| -Sends a :ref:`rpc` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer`). Returns an empty :ref:`Variant`. +Sends a :ref:`rpc` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer`). Returns ``null``. ---- @@ -1496,6 +1568,14 @@ Enables or disabled internal processing for this node. Internal processing happe ---- +.. _class_Node_method_set_process_shortcut_input: + +- void **set_process_shortcut_input** **(** :ref:`bool` enable **)** + +Enables shortcut processing. Enabled automatically if :ref:`_shortcut_input` is overridden. Any calls to this before :ref:`_ready` will be ignored. + +---- + .. _class_Node_method_set_process_unhandled_input: - void **set_process_unhandled_input** **(** :ref:`bool` enable **)** diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 71e0a0dc8..97a5e9700 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -16,7 +16,7 @@ Description A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, ``"Path2D/PathFollow2D/Sprite2D:texture:size"`` would refer to the ``size`` property of the ``texture`` resource on the node named ``"Sprite2D"`` which is a child of the other named nodes in the path. -You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with ``NodePath`` or the literal syntax ``@"path"``. Exporting a ``NodePath`` variable will give you a node selection widget in the properties panel of the editor, which can often be useful. +You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with ``NodePath`` or the literal syntax ``^"path"``. Exporting a ``NodePath`` variable will give you a node selection widget in the properties panel of the editor, which can often be useful. A ``NodePath`` is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties. @@ -25,15 +25,17 @@ Some examples of NodePaths include the following: :: # No leading slash means it is relative to the current node. - @"A" # Immediate child A - @"A/B" # A's child B - @"." # The current node. - @".." # The parent node. - @"../C" # A sibling node C. + ^"A" # Immediate child A + ^"A/B" # A's child B + ^"." # The current node. + ^".." # The parent node. + ^"../C" # A sibling node C. # A leading slash means it is absolute from the SceneTree. - @"/root" # Equivalent to get_tree().get_root(). - @"/root/Main" # If your main scene's root node were named "Main". - @"/root/MyAutoload" # If you have an autoloaded node or scene. + ^"/root" # Equivalent to get_tree().get_root(). + ^"/root/Main" # If your main scene's root node were named "Main". + ^"/root/MyAutoload" # If you have an autoloaded node or scene. + +See also :ref:`StringName`, which is a similar concept for general-purpose string interning. \ **Note:** In the editor, ``NodePath`` properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime. @@ -69,6 +71,8 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_subname_count` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_absolute` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | @@ -77,13 +81,9 @@ Methods Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`NodePath` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`NodePath` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------+ @@ -100,7 +100,7 @@ Constructs an empty ``NodePath``. - :ref:`NodePath` **NodePath** **(** :ref:`NodePath` from **)** -Constructs a ``NodePath`` as a copy of the given ``NodePath``. +Constructs a ``NodePath`` as a copy of the given ``NodePath``. ``NodePath("example")`` is equivalent to ``^"example"``. ---- @@ -186,7 +186,7 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i - :ref:`StringName` **get_name** **(** :ref:`int` idx **)** |const| -Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count`). +Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count` - 1). .. tabs:: @@ -254,6 +254,14 @@ For example, ``"Path2D/PathFollow2D/Sprite2D:texture:load_path"`` has 2 subnames ---- +.. _class_NodePath_method_hash: + +- :ref:`int` **hash** **(** **)** |const| + +Returns the 32-bit hash value representing the ``NodePath``'s contents. + +---- + .. _class_NodePath_method_is_absolute: - :ref:`bool` **is_absolute** **(** **)** |const| @@ -273,20 +281,12 @@ Operator Descriptions .. _class_NodePath_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`NodePath` right **)** ---- .. _class_NodePath_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`NodePath` right **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` diff --git a/classes/class_noise.rst b/classes/class_noise.rst new file mode 100644 index 000000000..91e01f8bd --- /dev/null +++ b/classes/class_noise.rst @@ -0,0 +1,108 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the Noise.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_Noise: + +Noise +===== + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`FastNoiseLite` + +Abstract base class for noise generators. + +Description +----------- + +This class defines the interface for noise generation libraries to inherit from. + +A default get_seamless_noise() implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from get_image(), reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. + +Inheriting noise classes can optionally override this function to provide a more optimal algorithm. + +Methods +------- + ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` v **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` v **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| | ++---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_Noise_method_get_image: + +- :ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false **)** |const| + +Returns a 2D :ref:`Image` noise image. + +---- + +.. _class_Noise_method_get_noise_1d: + +- :ref:`float` **get_noise_1d** **(** :ref:`float` x **)** |const| + +Returns the 1D noise value at the given (x) coordinate. + +---- + +.. _class_Noise_method_get_noise_2d: + +- :ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** |const| + +Returns the 2D noise value at the given position. + +---- + +.. _class_Noise_method_get_noise_2dv: + +- :ref:`float` **get_noise_2dv** **(** :ref:`Vector2` v **)** |const| + +Returns the 2D noise value at the given position. + +---- + +.. _class_Noise_method_get_noise_3d: + +- :ref:`float` **get_noise_3d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| + +Returns the 3D noise value at the given position. + +---- + +.. _class_Noise_method_get_noise_3dv: + +- :ref:`float` **get_noise_3dv** **(** :ref:`Vector3` v **)** |const| + +Returns the 3D noise value at the given position. + +---- + +.. _class_Noise_method_get_seamless_image: + +- :ref:`Image` **get_seamless_image** **(** :ref:`int` width, :ref:`int` height, :ref:`bool` invert=false, :ref:`bool` in_3d_space=false, :ref:`float` skirt=0.1 **)** |const| + +Returns a seamless 2D :ref:`Image` noise image. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_noisetexture.rst b/classes/class_noisetexture.rst index 81326c905..d3da422a4 100644 --- a/classes/class_noisetexture.rst +++ b/classes/class_noisetexture.rst @@ -11,21 +11,21 @@ NoiseTexture **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -:ref:`OpenSimplexNoise` filled texture. +A texture filled with noise generated by a :ref:`Noise` object. Description ----------- -Uses an :ref:`OpenSimplexNoise` to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. +Uses :ref:`FastNoiseLite` or other libraries to fill the texture data of your desired size. -NoiseTexture can also generate normal map textures. +NoiseTexture can also generate normalmap textures. The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture2D.get_image` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: :: var texture = NoiseTexture.new() - texture.noise = OpenSimplexNoise.new() + texture.noise = FastNoiseLite.new() await texture.changed var image = texture.get_image() var data = image.get_data() @@ -33,21 +33,29 @@ The class uses :ref:`Thread`\ s to generate the texture data inter Properties ---------- -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`as_normal_map` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`float` | :ref:`bump_strength` | ``8.0`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`height` | ``512`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`OpenSimplexNoise` | :ref:`noise` | | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`Vector2` | :ref:`noise_offset` | ``Vector2(0, 0)`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`bool` | :ref:`seamless` | ``false`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ -| :ref:`int` | :ref:`width` | ``512`` | -+-------------------------------------------------+-----------------------------------------------------------------+-------------------+ ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`as_normal_map` | ``false`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`bump_strength` | ``8.0`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`Gradient` | :ref:`color_ramp` | | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`generate_mipmaps` | ``true`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`height` | ``512`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`in_3d_space` | ``false`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`invert` | ``false`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`Noise` | :ref:`noise` | | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`seamless` | ``false`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`seamless_blend_skirt` | ``0.1`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`width` | ``512`` | ++---------------------------------+-------------------------------------------------------------------------------+-----------+ Property Descriptions --------------------- @@ -84,6 +92,40 @@ Strength of the bump maps used in this texture. A higher value will make the bum ---- +.. _class_NoiseTexture_property_color_ramp: + +- :ref:`Gradient` **color_ramp** + ++----------+-----------------------+ +| *Setter* | set_color_ramp(value) | ++----------+-----------------------+ +| *Getter* | get_color_ramp() | ++----------+-----------------------+ + +A :ref:`Gradient` which is used to map the luminance of each pixel to a color value. + +---- + +.. _class_NoiseTexture_property_generate_mipmaps: + +- :ref:`bool` **generate_mipmaps** + ++-----------+-----------------------------+ +| *Default* | ``true`` | ++-----------+-----------------------------+ +| *Setter* | set_generate_mipmaps(value) | ++-----------+-----------------------------+ +| *Getter* | is_generating_mipmaps() | ++-----------+-----------------------------+ + +Determines whether mipmaps are generated for this texture. + +Enabling this results in less texture aliasing, but the noise texture generation may take longer. + +Requires (anisotropic) mipmap filtering to be enabled for a material to have an effect. + +---- + .. _class_NoiseTexture_property_height: - :ref:`int` **height** @@ -100,9 +142,41 @@ Height of the generated texture. ---- +.. _class_NoiseTexture_property_in_3d_space: + +- :ref:`bool` **in_3d_space** + ++-----------+------------------------+ +| *Default* | ``false`` | ++-----------+------------------------+ +| *Setter* | set_in_3d_space(value) | ++-----------+------------------------+ +| *Getter* | is_in_3d_space() | ++-----------+------------------------+ + +Determines whether the noise image is calculated in 3D space. May result in reduced contrast. + +---- + +.. _class_NoiseTexture_property_invert: + +- :ref:`bool` **invert** + ++-----------+-------------------+ +| *Default* | ``false`` | ++-----------+-------------------+ +| *Setter* | set_invert(value) | ++-----------+-------------------+ +| *Getter* | get_invert() | ++-----------+-------------------+ + +If ``true``, inverts the noise texture. White becomes black, black becomes white. + +---- + .. _class_NoiseTexture_property_noise: -- :ref:`OpenSimplexNoise` **noise** +- :ref:`Noise` **noise** +----------+------------------+ | *Setter* | set_noise(value) | @@ -110,23 +184,7 @@ Height of the generated texture. | *Getter* | get_noise() | +----------+------------------+ -The :ref:`OpenSimplexNoise` instance used to generate the noise. - ----- - -.. _class_NoiseTexture_property_noise_offset: - -- :ref:`Vector2` **noise_offset** - -+-----------+-------------------------+ -| *Default* | ``Vector2(0, 0)`` | -+-----------+-------------------------+ -| *Setter* | set_noise_offset(value) | -+-----------+-------------------------+ -| *Getter* | get_noise_offset() | -+-----------+-------------------------+ - -An offset used to specify the noise space coordinate of the top left corner of the generated noise. This value is ignored if :ref:`seamless` is enabled. +The instance of the :ref:`Noise` object. ---- @@ -142,9 +200,25 @@ An offset used to specify the noise space coordinate of the top left corner of t | *Getter* | get_seamless() | +-----------+---------------------+ -Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate. +If ``true``, a seamless texture is requested from the :ref:`Noise` resource. -\ **Note:** Seamless noise has a lower contrast compared to non-seamless noise. This is due to the way noise uses higher dimensions for generating seamless noise. +\ **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used :ref:`Noise` resource. This is because some implementations use higher dimensions for generating seamless noise. + +---- + +.. _class_NoiseTexture_property_seamless_blend_skirt: + +- :ref:`float` **seamless_blend_skirt** + ++-----------+---------------------------------+ +| *Default* | ``0.1`` | ++-----------+---------------------------------+ +| *Setter* | set_seamless_blend_skirt(value) | ++-----------+---------------------------------+ +| *Getter* | get_seamless_blend_skirt() | ++-----------+---------------------------------+ + +Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See :ref:`Noise` for further details. ---- diff --git a/classes/class_object.rst b/classes/class_object.rst index 490888e36..4cfe8916b 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -9,7 +9,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`JavaClassWrapper`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`NativeExtensionManager`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer3D`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`TextServerManager`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptCustomNodes`, :ref:`XRServer` +**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`IP`, :ref:`Input`, :ref:`InputMap`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`JavaClassWrapper`, :ref:`JavaScript`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`NativeExtensionManager`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`VisualScriptCustomNodes`, :ref:`XRServer` Base class for all non-built-in types. @@ -82,7 +82,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`call` **(** :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | +| :ref:`Variant` | :ref:`call_deferred` **(** :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`callv` **(** :ref:`StringName` method, :ref:`Array` arg_array **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -92,7 +92,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`disconnect` **(** :ref:`StringName` signal, :ref:`Callable` callable **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | +| :ref:`Error` | :ref:`emit_signal` **(** :ref:`StringName` signal, ... **)** |vararg| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free` **(** **)** | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -106,7 +106,7 @@ Methods +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_instance_id` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name **)** |const| | +| :ref:`Variant` | :ref:`get_meta` **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_meta_list` **(** **)** |const| | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -241,7 +241,9 @@ Each property's :ref:`Dictionary` must contain at least ``name - void **_init** **(** **)** |virtual| -Called when the object is initialized. +Called when the object is initialized in memory. Can be defined to take in parameters, that are passed in when constructing. + +\ **Note:** If :ref:`_init` is defined with required parameters, then explicit construction is the only valid means of creating an Object of the class. If any other means (such as :ref:`PackedScene.instantiate`) is used, then initialization will fail. ---- @@ -308,7 +310,7 @@ Calls the ``method`` on the object and returns the result. This method supports .. _class_Object_method_call_deferred: -- void **call_deferred** **(** :ref:`StringName` method, ... **)** |vararg| +- :ref:`Variant` **call_deferred** **(** :ref:`StringName` method, ... **)** |vararg| Calls the ``method`` on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -370,7 +372,7 @@ Connects a ``signal`` to a ``callable``. Pass optional ``binds`` to the call as \ **Note:** This method is the legacy implementation for connecting signals. The recommended modern approach is to use :ref:`Signal.connect` and to use :ref:`Callable.bind` to add and validate parameter binds. Both syntaxes are shown below. -A signal can only be connected once to a :ref:`Callable`. It will throw an error if already connected, unless the signal was connected with :ref:`CONNECT_REFERENCE_COUNTED`. To avoid this, first, use :ref:`is_connected` to check for existing connections. +A signal can only be connected once to a :ref:`Callable`. It will print an error if already connected, unless the signal was connected with :ref:`CONNECT_REFERENCE_COUNTED`. To avoid this, first, use :ref:`is_connected` to check for existing connections. If the callable's target is destroyed in the game's lifecycle, the connection will be lost. @@ -474,7 +476,7 @@ As seen above, the recommended method to connect signals is not :ref:`connect` signal will be connected to ``_on_button_down``), option 3 offers the best validation: it will throw a compile-time error if either the ``button_down`` signal or the ``_on_button_down`` 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 ``"button_down"`` doesn't correspond to a signal, or if ``"_on_button_down"`` is not a registered method in the object ``self``. 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. +While all options have the same outcome (``button``'s :ref:`BaseButton.button_down` signal will be connected to ``_on_button_down``), option 3 offers the best validation: it will print a compile-time error if either the ``button_down`` signal or the ``_on_button_down`` 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 print a runtime error if ``"button_down"`` doesn't correspond to a signal, or if ``"_on_button_down"`` is not a registered method in the object ``self``. 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. \ **Parameter bindings and passing:**\ @@ -535,13 +537,13 @@ One can also pass additional parameters when emitting the signal with :ref:`emit Disconnects a ``signal`` from a given ``callable``. -If you try to disconnect a connection that does not exist, the method will throw an error. Use :ref:`is_connected` to ensure that the connection exists. +If you try to disconnect a connection that does not exist, the method will print an error. Use :ref:`is_connected` to ensure that the connection exists. ---- .. _class_Object_method_emit_signal: -- void **emit_signal** **(** :ref:`StringName` signal, ... **)** |vararg| +- :ref:`Error` **emit_signal** **(** :ref:`StringName` signal, ... **)** |vararg| Emits the given ``signal``. 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: @@ -628,10 +630,12 @@ This ID can be saved in :ref:`EncodedObjectAsID`, and c .. _class_Object_method_get_meta: -- :ref:`Variant` **get_meta** **(** :ref:`StringName` name **)** |const| +- :ref:`Variant` **get_meta** **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| Returns the object's metadata entry for the given ``name``. +Throws error if the entry does not exist, unless ``default`` is not ``null`` (in which case the default value will be returned). + ---- .. _class_Object_method_get_meta_list: diff --git a/classes/class_omnilight3d.rst b/classes/class_omnilight3d.rst index 06138a7ae..687ef10f6 100644 --- a/classes/class_omnilight3d.rst +++ b/classes/class_omnilight3d.rst @@ -26,13 +26,15 @@ Tutorials Properties ---------- -+------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`omni_attenuation` | ``1.0`` | -+------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`omni_range` | ``5.0`` | -+------------------------------------------------+----------------------------------------------------------------------+---------+ -| :ref:`ShadowMode` | :ref:`omni_shadow_mode` | ``1`` | -+------------------------------------------------+----------------------------------------------------------------------+---------+ ++------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`omni_attenuation` | ``1.0`` | ++------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | :ref:`omni_range` | ``5.0`` | ++------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`ShadowMode` | :ref:`omni_shadow_mode` | ``1`` | ++------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ +| :ref:`float` | shadow_bias | ``0.2`` (overrides :ref:`Light3D`) | ++------------------------------------------------+----------------------------------------------------------------------+------------------------------------------------------------------------+ Enumerations ------------ diff --git a/classes/class_opensimplexnoise.rst b/classes/class_opensimplexnoise.rst deleted file mode 100644 index 0643b9687..000000000 --- a/classes/class_opensimplexnoise.rst +++ /dev/null @@ -1,230 +0,0 @@ -:github_url: hide - -.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. -.. DO NOT EDIT THIS FILE, but the OpenSimplexNoise.xml source instead. -.. The source is found in doc/classes or modules//doc_classes. - -.. _class_OpenSimplexNoise: - -OpenSimplexNoise -================ - -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` - -Noise generator based on Open Simplex. - -Description ------------ - -This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions: - -:: - - var noise = OpenSimplexNoise.new() - - # Configure - noise.seed = randi() - noise.octaves = 4 - noise.period = 20.0 - noise.persistence = 0.8 - - # Sample - print("Values:") - print(noise.get_noise_2d(1.0, 1.0)) - print(noise.get_noise_3d(0.5, 3.0, 15.0)) - print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0)) - -Properties ----------- - -+---------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`lacunarity` | ``2.0`` | -+---------------------------+-----------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`octaves` | ``3`` | -+---------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`period` | ``64.0`` | -+---------------------------+-----------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`persistence` | ``0.5`` | -+---------------------------+-----------------------------------------------------------------+----------+ -| :ref:`int` | :ref:`seed` | ``0`` | -+---------------------------+-----------------------------------------------------------------+----------+ - -Methods -------- - -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_image` **(** :ref:`int` width, :ref:`int` height, :ref:`Vector2` noise_offset=Vector2(0, 0) **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_1d` **(** :ref:`float` x **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2d` **(** :ref:`float` x, :ref:`float` y **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_2dv` **(** :ref:`Vector2` pos **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_3dv` **(** :ref:`Vector3` pos **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_noise_4d` **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`get_seamless_image` **(** :ref:`int` size **)** |const| | -+---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Property Descriptions ---------------------- - -.. _class_OpenSimplexNoise_property_lacunarity: - -- :ref:`float` **lacunarity** - -+-----------+-----------------------+ -| *Default* | ``2.0`` | -+-----------+-----------------------+ -| *Setter* | set_lacunarity(value) | -+-----------+-----------------------+ -| *Getter* | get_lacunarity() | -+-----------+-----------------------+ - -Difference in period between :ref:`octaves`. - ----- - -.. _class_OpenSimplexNoise_property_octaves: - -- :ref:`int` **octaves** - -+-----------+--------------------+ -| *Default* | ``3`` | -+-----------+--------------------+ -| *Setter* | set_octaves(value) | -+-----------+--------------------+ -| *Getter* | get_octaves() | -+-----------+--------------------+ - -Number of OpenSimplex noise layers that are sampled to get the fractal noise. Higher values result in more detailed noise but take more time to generate. - -\ **Note:** The maximum allowed value is 9. - ----- - -.. _class_OpenSimplexNoise_property_period: - -- :ref:`float` **period** - -+-----------+-------------------+ -| *Default* | ``64.0`` | -+-----------+-------------------+ -| *Setter* | set_period(value) | -+-----------+-------------------+ -| *Getter* | get_period() | -+-----------+-------------------+ - -Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance). - ----- - -.. _class_OpenSimplexNoise_property_persistence: - -- :ref:`float` **persistence** - -+-----------+------------------------+ -| *Default* | ``0.5`` | -+-----------+------------------------+ -| *Setter* | set_persistence(value) | -+-----------+------------------------+ -| *Getter* | get_persistence() | -+-----------+------------------------+ - -Contribution factor of the different octaves. A ``persistence`` value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. - ----- - -.. _class_OpenSimplexNoise_property_seed: - -- :ref:`int` **seed** - -+-----------+-----------------+ -| *Default* | ``0`` | -+-----------+-----------------+ -| *Setter* | set_seed(value) | -+-----------+-----------------+ -| *Getter* | get_seed() | -+-----------+-----------------+ - -Seed used to generate random values, different seeds will generate different noise maps. - -Method Descriptions -------------------- - -.. _class_OpenSimplexNoise_method_get_image: - -- :ref:`Image` **get_image** **(** :ref:`int` width, :ref:`int` height, :ref:`Vector2` noise_offset=Vector2(0, 0) **)** |const| - -Generate a noise image in :ref:`Image.FORMAT_L8` format with the requested ``width`` and ``height``, based on the current noise parameters. If ``noise_offset`` is specified, then the offset value is used as the coordinates of the top-left corner of the generated noise. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_1d: - -- :ref:`float` **get_noise_1d** **(** :ref:`float` x **)** |const| - -Returns the 1D noise value ``[-1,1]`` at the given x-coordinate. - -\ **Note:** This method actually returns the 2D noise value ``[-1,1]`` with fixed y-coordinate value 0.0. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_2d: - -- :ref:`float` **get_noise_2d** **(** :ref:`float` x, :ref:`float` y **)** |const| - -Returns the 2D noise value ``[-1,1]`` at the given position. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_2dv: - -- :ref:`float` **get_noise_2dv** **(** :ref:`Vector2` pos **)** |const| - -Returns the 2D noise value ``[-1,1]`` at the given position. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_3d: - -- :ref:`float` **get_noise_3d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z **)** |const| - -Returns the 3D noise value ``[-1,1]`` at the given position. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_3dv: - -- :ref:`float` **get_noise_3dv** **(** :ref:`Vector3` pos **)** |const| - -Returns the 3D noise value ``[-1,1]`` at the given position. - ----- - -.. _class_OpenSimplexNoise_method_get_noise_4d: - -- :ref:`float` **get_noise_4d** **(** :ref:`float` x, :ref:`float` y, :ref:`float` z, :ref:`float` w **)** |const| - -Returns the 4D noise value ``[-1,1]`` at the given position. - ----- - -.. _class_OpenSimplexNoise_method_get_seamless_image: - -- :ref:`Image` **get_seamless_image** **(** :ref:`int` size **)** |const| - -Generate a tileable noise image in :ref:`Image.FORMAT_L8` format, based on the current noise parameters. Generated seamless images are always square (``size`` × ``size``). - -\ **Note:** Seamless noise has a lower contrast compared to non-seamless noise. This is due to the way noise uses higher dimensions for generating seamless noise. - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_openxractionmap.rst b/classes/class_openxractionmap.rst index c03b9b0d7..4afa36835 100644 --- a/classes/class_openxractionmap.rst +++ b/classes/class_openxractionmap.rst @@ -20,7 +20,7 @@ OpenXR uses an action system similar to Godots Input map system to bind inputs a Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available. -The action map therefor needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map. +The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map. Properties ---------- @@ -34,17 +34,29 @@ Properties Methods ------- -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`create_default_action_sets` **(** **)** | -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | -+------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_default_action_sets` **(** **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OpenXRActionSet` | :ref:`find_action_set` **(** :ref:`String` name **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OpenXRInteractionProfile` | :ref:`find_interaction_profile` **(** :ref:`String` name **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OpenXRActionSet` | :ref:`get_action_set` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_action_set_count` **(** **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`OpenXRInteractionProfile` | :ref:`get_interaction_profile` **(** :ref:`int` idx **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_interaction_profile_count` **(** **)** |const| | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_action_set` **(** :ref:`OpenXRActionSet` action_set **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_interaction_profile` **(** :ref:`OpenXRInteractionProfile` interaction_profile **)** | ++-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -61,6 +73,8 @@ Property Descriptions | *Getter* | get_action_sets() | +-----------+------------------------+ +Collection of :ref:`OpenXRActionSet`\ s that are part of this action map. + ---- .. _class_OpenXRActionMap_property_interaction_profiles: @@ -75,6 +89,8 @@ Property Descriptions | *Getter* | get_interaction_profiles() | +-----------+---------------------------------+ +Collection of :ref:`OpenXRInteractionProfile`\ s that are part of this action map. + Method Descriptions ------------------- @@ -102,6 +118,54 @@ Setup this action set with our default actions. ---- +.. _class_OpenXRActionMap_method_find_action_set: + +- :ref:`OpenXRActionSet` **find_action_set** **(** :ref:`String` name **)** |const| + +Retrieve an action set by name. + +---- + +.. _class_OpenXRActionMap_method_find_interaction_profile: + +- :ref:`OpenXRInteractionProfile` **find_interaction_profile** **(** :ref:`String` name **)** |const| + +Find an interaction profile by its name (path). + +---- + +.. _class_OpenXRActionMap_method_get_action_set: + +- :ref:`OpenXRActionSet` **get_action_set** **(** :ref:`int` idx **)** |const| + +Retrieve the action set at this index. + +---- + +.. _class_OpenXRActionMap_method_get_action_set_count: + +- :ref:`int` **get_action_set_count** **(** **)** |const| + +Retrieve the number of actions sets in our action map. + +---- + +.. _class_OpenXRActionMap_method_get_interaction_profile: + +- :ref:`OpenXRInteractionProfile` **get_interaction_profile** **(** :ref:`int` idx **)** |const| + +Get the interaction profile at this index. + +---- + +.. _class_OpenXRActionMap_method_get_interaction_profile_count: + +- :ref:`int` **get_interaction_profile_count** **(** **)** |const| + +Retrieve the number of interaction profiles in our action map. + +---- + .. _class_OpenXRActionMap_method_remove_action_set: - void **remove_action_set** **(** :ref:`OpenXRActionSet` action_set **)** diff --git a/classes/class_openxractionset.rst b/classes/class_openxractionset.rst index 3824f11cd..7bbdb8ce1 100644 --- a/classes/class_openxractionset.rst +++ b/classes/class_openxractionset.rst @@ -18,9 +18,7 @@ Description Action sets in OpenXR define a collection of actions that can be activated in unison. This allows games to easily change between different states that require different inputs or need to reinterpret inputs. For instance we could have an action set that is active when a menu is open, an action set that is active when the player is freely walking around and an action set that is active when the player is controlling a vehicle. -Action sets can contain the same actions, or actions with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active. - -Note that the name of the resource is used to identify the action set within OpenXR. +Action sets can contain the same action with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active. Properties ---------- @@ -36,11 +34,13 @@ Properties Methods ------- -+------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_action` **(** :ref:`OpenXRAction` action **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_action` **(** :ref:`OpenXRAction` action **)** | -+------+-----------------------------------------------------------------------------------------------------------------------------+ ++-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_action` **(** :ref:`OpenXRAction` action **)** | ++-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_action_count` **(** **)** |const| | ++-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_action` **(** :ref:`OpenXRAction` action **)** | ++-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- @@ -102,6 +102,14 @@ Add an action to this action set. ---- +.. _class_OpenXRActionSet_method_get_action_count: + +- :ref:`int` **get_action_count** **(** **)** |const| + +Retrieve the number of actions in our action set. + +---- + .. _class_OpenXRActionSet_method_remove_action: - void **remove_action** **(** :ref:`OpenXRAction` action **)** diff --git a/classes/class_openxrinteractionprofile.rst b/classes/class_openxrinteractionprofile.rst index 53fff6094..5931e0c26 100644 --- a/classes/class_openxrinteractionprofile.rst +++ b/classes/class_openxrinteractionprofile.rst @@ -29,6 +29,15 @@ Properties | :ref:`String` | :ref:`interaction_profile_path` | ``""`` | +-----------------------------+---------------------------------------------------------------------------------------------------+--------+ +Methods +------- + ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`OpenXRIPBinding` | :ref:`get_binding` **(** :ref:`int` index **)** |const| | ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_binding_count` **(** **)** |const| | ++-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -62,6 +71,23 @@ Action bindings for this interaction profile. The interaction profile path identifying the XR device. +Method Descriptions +------------------- + +.. _class_OpenXRInteractionProfile_method_get_binding: + +- :ref:`OpenXRIPBinding` **get_binding** **(** :ref:`int` index **)** |const| + +Retrieve the binding at this index. + +---- + +.. _class_OpenXRInteractionProfile_method_get_binding_count: + +- :ref:`int` **get_binding_count** **(** **)** |const| + +Get the number of bindings in this interaction profile. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 85015cc8a..20adb885c 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -16,7 +16,7 @@ Defines a binding between an :ref:`OpenXRAction` and an XR i Description ----------- -This binding resource binds an OpenXR action to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". +This binding resource binds an :ref:`OpenXRAction` to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". Properties ---------- @@ -27,6 +27,19 @@ Properties | :ref:`PackedStringArray` | :ref:`paths` | ``PackedStringArray()`` | +---------------------------------------------------+------------------------------------------------------+-------------------------+ +Methods +------- + ++-------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_path` **(** :ref:`String` path **)** | ++-------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_path_count` **(** **)** |const| | ++-------------------------+-------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_path` **(** :ref:`String` arg0 **)** |const| | ++-------------------------+-------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_path` **(** :ref:`String` path **)** | ++-------------------------+-------------------------------------------------------------------------------------------------------------+ + Property Descriptions --------------------- @@ -40,7 +53,7 @@ Property Descriptions | *Getter* | get_action() | +----------+-------------------+ -Action that is bound to these paths. +:ref:`OpenXRAction` that is bound to these paths. ---- @@ -58,6 +71,39 @@ Action that is bound to these paths. Paths that define the inputs or outputs bound on the device. +Method Descriptions +------------------- + +.. _class_OpenXRIPBinding_method_add_path: + +- void **add_path** **(** :ref:`String` path **)** + +Add an input/output path to this binding. + +---- + +.. _class_OpenXRIPBinding_method_get_path_count: + +- :ref:`int` **get_path_count** **(** **)** |const| + +Get the number of input/output paths in this binding. + +---- + +.. _class_OpenXRIPBinding_method_has_path: + +- :ref:`bool` **has_path** **(** :ref:`String` arg0 **)** |const| + +Returns ``true`` if this input/output path is part of this binding. + +---- + +.. _class_OpenXRIPBinding_method_remove_path: + +- void **remove_path** **(** :ref:`String` path **)** + +Removes this input/output path from this binding. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 2d9a26ae3..81a460a83 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -20,6 +20,8 @@ OptionButton is a type button that provides a selectable list of items when pres See also :ref:`BaseButton` which contains common properties and methods associated with this node. +\ **Note:** Properties :ref:`Button.text` and :ref:`Button.icon` are automatically set based on the selected item. They shouldn't be changed manually. + Properties ---------- @@ -43,7 +45,7 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1 **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_separator` **(** **)** | +| void | :ref:`add_separator` **(** :ref:`String` text="" **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -57,14 +59,22 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PopupMenu` | :ref:`get_popup` **(** **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_selectable_item` **(** :ref:`bool` from_last=false **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_selected_id` **(** **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`get_selected_metadata` **(** **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_selectable_items` **(** **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_item` **(** :ref:`int` idx **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`select` **(** :ref:`int` idx **)** | @@ -79,6 +89,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- @@ -98,7 +110,7 @@ Theme Properties +-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`arrow_margin` | ``4`` | +-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``2`` | +| :ref:`int` | :ref:`h_separation` | ``2`` | +-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+--------------------------------------------------------------------------------+-------------------------------------+ @@ -196,9 +208,9 @@ Adds an item, with text ``label`` and (optionally) ``id``. If no ``id`` is passe .. _class_OptionButton_method_add_separator: -- void **add_separator** **(** **)** +- void **add_separator** **(** :ref:`String` text="" **)** -Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. +Adds a separator to the list of items. Separators help to group items, and can optionally be given a ``text`` header. A separator also gets an index assigned, and is appended at the end of the item list. ---- @@ -250,6 +262,14 @@ Returns the text of the item at index ``idx``. ---- +.. _class_OptionButton_method_get_item_tooltip: + +- :ref:`String` **get_item_tooltip** **(** :ref:`int` idx **)** |const| + +Returns the tooltip of the item at index ``idx``. + +---- + .. _class_OptionButton_method_get_popup: - :ref:`PopupMenu` **get_popup** **(** **)** |const| @@ -260,6 +280,12 @@ Returns the :ref:`PopupMenu` contained in this button. ---- +.. _class_OptionButton_method_get_selectable_item: + +- :ref:`int` **get_selectable_item** **(** :ref:`bool` from_last=false **)** |const| + +---- + .. _class_OptionButton_method_get_selected_id: - :ref:`int` **get_selected_id** **(** **)** |const| @@ -276,6 +302,12 @@ Gets the metadata of the selected item. Metadata for items can be set using :ref ---- +.. _class_OptionButton_method_has_selectable_items: + +- :ref:`bool` **has_selectable_items** **(** **)** |const| + +---- + .. _class_OptionButton_method_is_item_disabled: - :ref:`bool` **is_item_disabled** **(** :ref:`int` idx **)** |const| @@ -284,6 +316,12 @@ Returns ``true`` if the item at index ``idx`` is disabled. ---- +.. _class_OptionButton_method_is_item_separator: + +- :ref:`bool` **is_item_separator** **(** :ref:`int` idx **)** |const| + +---- + .. _class_OptionButton_method_remove_item: - void **remove_item** **(** :ref:`int` idx **)** @@ -342,6 +380,14 @@ Sets the metadata of an item. Metadata may be of any type and can be used to sto Sets the text of the item at index ``idx``. +---- + +.. _class_OptionButton_method_set_item_tooltip: + +- void **set_item_tooltip** **(** :ref:`int` idx, :ref:`String` tooltip **)** + +Sets the tooltip of the item at index ``idx``. + Theme Property Descriptions --------------------------- @@ -429,9 +475,9 @@ The horizontal space between the arrow icon and the right edge of the button. ---- -.. _class_OptionButton_theme_constant_hseparation: +.. _class_OptionButton_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``2`` | diff --git a/classes/class_os.rst b/classes/class_os.rst index 67ee55b79..171b7ffe2 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -114,12 +114,16 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_keycode_unicode` **(** :ref:`int` code **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_process_running` **(** :ref:`int` pid **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_stdout_verbose` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_userfs_persistent` **(** **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`kill` **(** :ref:`int` pid **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`move_to_trash` **(** :ref:`String` path **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`open_midi_inputs` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_all_resources` **(** :ref:`String` tofile="" **)** | @@ -688,7 +692,7 @@ Returns the model name of the current device. Returns the name of the host OS. -On Windows, this is ``"Windows"`` or ``"UWP"`` (Universal Windows Platform) if exported thereon. +On Windows, this is ``"Windows"`` or ``"UWP"`` if exported on Universal Windows Platform. On macOS, this is ``"macOS"``. @@ -896,6 +900,18 @@ Returns ``true`` if the input keycode corresponds to a Unicode character. ---- +.. _class_OS_method_is_process_running: + +- :ref:`bool` **is_process_running** **(** :ref:`int` pid **)** |const| + +Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. + +Must be a valid ID generated from :ref:`create_process`. + +\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + +---- + .. _class_OS_method_is_stdout_verbose: - :ref:`bool` **is_stdout_verbose** **(** **)** |const| @@ -924,6 +940,16 @@ Kill (terminate) the process identified by the given process ID (``pid``), e.g. ---- +.. _class_OS_method_move_to_trash: + +- :ref:`Error` **move_to_trash** **(** :ref:`String` path **)** |const| + +Moves the file or directory to the system's recycle bin. See also :ref:`Directory.remove`. + +\ **Note:** If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. + +---- + .. _class_OS_method_open_midi_inputs: - void **open_midi_inputs** **(** **)** @@ -1020,7 +1046,7 @@ Requests the OS to open a resource with the most appropriate program. For exampl - ``OS.shell_open("https://godotengine.org")`` opens the default web browser on the official Godot website. -- ``OS.shell_open("mailto:example@example.com")`` opens the default email client with the "To" field set to ``example@example.com``. See `Customizing [code]mailto:[/code] Links `__ for a list of fields that can be added. +- ``OS.shell_open("mailto:example@example.com")`` opens the default email client with the "To" field set to ``example@example.com``. See `RFC 2368 - The [code]mailto[/code] URL scheme `__ for a list of fields that can be added. Use :ref:`ProjectSettings.globalize_path` to convert a ``res://`` or ``user://`` path into a system path for use with this method. diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index 397598955..3e0a8a168 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -9,12 +9,12 @@ PackedByteArray =============== -A packed :ref:`Array` of bytes. +A packed array of bytes. Description ----------- -An :ref:`Array` specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes. Constructors ------------ @@ -39,6 +39,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`compress` **(** :ref:`int` compression_mode=0 **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`decode_double` **(** :ref:`int` byte_offset **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`decode_float` **(** :ref:`int` byte_offset **)** |const| | @@ -97,6 +99,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_ascii` **(** **)** |const| | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf16` **(** **)** |const| | @@ -123,6 +127,8 @@ Methods +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -143,15 +149,11 @@ Methods Operators --------- -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedByteArray` right **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`operator +` **(** :ref:`PackedByteArray` right **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedByteArray` right **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -215,6 +217,14 @@ Returns a new ``PackedByteArray`` with the data compressed. Set the compression ---- +.. _class_PackedByteArray_method_count: + +- :ref:`int` **count** **(** :ref:`int` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedByteArray_method_decode_double: - :ref:`float` **decode_double** **(** :ref:`int` byte_offset **)** |const| @@ -401,6 +411,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedByteArray_method_find: + +- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedByteArray_method_get_string_from_ascii: - :ref:`String` **get_string_from_ascii** **(** **)** |const| @@ -518,6 +536,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedByteArray_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedByteArray_method_set: - void **set** **(** :ref:`int` index, :ref:`int` value **)** @@ -605,10 +631,6 @@ Operator Descriptions .. _class_PackedByteArray_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedByteArray` right **)** ---- @@ -621,10 +643,6 @@ Operator Descriptions .. _class_PackedByteArray_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedByteArray` right **)** ---- diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index b28bd6651..7a156760e 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -9,12 +9,12 @@ PackedColorArray ================ -A packed :ref:`Array` of :ref:`Color`\ s. +A packed array of :ref:`Color`\ s. Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Color`. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold :ref:`Color`. Packs data tightly, so it saves memory for large array sizes. Constructors ------------ @@ -37,10 +37,14 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Color` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`Color` value **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedColorArray` | :ref:`duplicate` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`Color` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`Color` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Color` value **)** | @@ -55,6 +59,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`Color` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -69,15 +75,11 @@ Methods Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedColorArray` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedColorArray` | :ref:`operator +` **(** :ref:`PackedColorArray` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedColorArray` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -133,6 +135,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedColorArray_method_count: + +- :ref:`int` **count** **(** :ref:`Color` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedColorArray_method_duplicate: - :ref:`PackedColorArray` **duplicate** **(** **)** @@ -149,6 +159,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedColorArray_method_find: + +- :ref:`int` **find** **(** :ref:`Color` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedColorArray_method_has: - :ref:`bool` **has** **(** :ref:`Color` value **)** |const| @@ -205,6 +223,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedColorArray_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`Color` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedColorArray_method_set: - void **set** **(** :ref:`int` index, :ref:`Color` value **)** @@ -250,10 +276,6 @@ Operator Descriptions .. _class_PackedColorArray_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedColorArray` right **)** ---- @@ -266,10 +288,6 @@ Operator Descriptions .. _class_PackedColorArray_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedColorArray` right **)** ---- diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 8189279fe..ecee6fc8d 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -9,12 +9,12 @@ PackedFloat32Array ================== -A packed :ref:`Array` of 32-bit floating-point values. +A packed array of 32-bit floating-point values. Description ----------- -An :ref:`Array` specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 32-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array`. @@ -39,10 +39,14 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`duplicate` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`float` value **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | @@ -57,6 +61,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -71,15 +77,11 @@ Methods Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat32Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat32Array` | :ref:`operator +` **(** :ref:`PackedFloat32Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat32Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -135,6 +137,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedFloat32Array_method_count: + +- :ref:`int` **count** **(** :ref:`float` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedFloat32Array_method_duplicate: - :ref:`PackedFloat32Array` **duplicate** **(** **)** @@ -151,6 +161,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedFloat32Array_method_find: + +- :ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedFloat32Array_method_has: - :ref:`bool` **has** **(** :ref:`float` value **)** |const| @@ -207,6 +225,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedFloat32Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedFloat32Array_method_set: - void **set** **(** :ref:`int` index, :ref:`float` value **)** @@ -256,10 +282,6 @@ Operator Descriptions .. _class_PackedFloat32Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedFloat32Array` right **)** ---- @@ -272,10 +294,6 @@ Operator Descriptions .. _class_PackedFloat32Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedFloat32Array` right **)** ---- diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index c3a0e5caa..57c437c80 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -9,12 +9,12 @@ PackedFloat64Array ================== -A packed :ref:`Array` of 64-bit floating-point values. +A packed array of 64-bit floating-point values. Description ----------- -An :ref:`Array` specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 64-bit floating-point values. Packs data tightly, so it saves memory for large array sizes. If you only need to pack 32-bit floats tightly, see :ref:`PackedFloat32Array` for a more memory-friendly alternative. @@ -39,10 +39,14 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`float` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`float` value **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat64Array` | :ref:`duplicate` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`float` value **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`float` value, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`float` value **)** |const| | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`float` value **)** | @@ -57,6 +61,8 @@ Methods +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`float` value **)** | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -71,15 +77,11 @@ Methods Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedFloat64Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat64Array` | :ref:`operator +` **(** :ref:`PackedFloat64Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedFloat64Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -135,6 +137,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedFloat64Array_method_count: + +- :ref:`int` **count** **(** :ref:`float` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedFloat64Array_method_duplicate: - :ref:`PackedFloat64Array` **duplicate** **(** **)** @@ -151,6 +161,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedFloat64Array_method_find: + +- :ref:`int` **find** **(** :ref:`float` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedFloat64Array_method_has: - :ref:`bool` **has** **(** :ref:`float` value **)** |const| @@ -207,6 +225,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedFloat64Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`float` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedFloat64Array_method_set: - void **set** **(** :ref:`int` index, :ref:`float` value **)** @@ -256,10 +282,6 @@ Operator Descriptions .. _class_PackedFloat64Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedFloat64Array` right **)** ---- @@ -272,10 +294,6 @@ Operator Descriptions .. _class_PackedFloat64Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedFloat64Array` right **)** ---- diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index 0f1d3a3ed..6a94ef9f4 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -9,12 +9,12 @@ PackedInt32Array ================ -A packed :ref:`Array` of 32-bit integers. +A packed array of 32-bit integers. Description ----------- -An :ref:`Array` specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes. \ **Note:** This type stores signed 32-bit integers, which means it can take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int` uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see :ref:`PackedInt64Array`. @@ -39,10 +39,14 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`duplicate` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`int` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | @@ -57,6 +61,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -71,15 +77,11 @@ Methods Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt32Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`operator +` **(** :ref:`PackedInt32Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt32Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -135,6 +137,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedInt32Array_method_count: + +- :ref:`int` **count** **(** :ref:`int` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedInt32Array_method_duplicate: - :ref:`PackedInt32Array` **duplicate** **(** **)** @@ -151,6 +161,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedInt32Array_method_find: + +- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedInt32Array_method_has: - :ref:`bool` **has** **(** :ref:`int` value **)** |const| @@ -207,6 +225,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedInt32Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedInt32Array_method_set: - void **set** **(** :ref:`int` index, :ref:`int` value **)** @@ -256,10 +282,6 @@ Operator Descriptions .. _class_PackedInt32Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedInt32Array` right **)** ---- @@ -272,10 +294,6 @@ Operator Descriptions .. _class_PackedInt32Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedInt32Array` right **)** ---- diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index fb5562310..3b3b0b3ad 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -9,12 +9,12 @@ PackedInt64Array ================ -A packed :ref:`Array` of 64-bit integers. +A packed array of 64-bit integers. Description ----------- -An :ref:`Array` specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes. \ **Note:** This type stores signed 64-bit integers, which means it can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see :ref:`PackedInt32Array` for a more memory-friendly alternative. @@ -39,10 +39,14 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`int` value, :ref:`bool` before=true **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`int` value **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`duplicate` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`int` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`int` value, :ref:`int` from=0 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`int` value **)** |const| | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`int` value **)** | @@ -57,6 +61,8 @@ Methods +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| | ++-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`int` value **)** | +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -71,15 +77,11 @@ Methods Operators --------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedInt64Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt64Array` | :ref:`operator +` **(** :ref:`PackedInt64Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedInt64Array` right **)** | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -135,6 +137,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedInt64Array_method_count: + +- :ref:`int` **count** **(** :ref:`int` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedInt64Array_method_duplicate: - :ref:`PackedInt64Array` **duplicate** **(** **)** @@ -151,6 +161,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedInt64Array_method_find: + +- :ref:`int` **find** **(** :ref:`int` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedInt64Array_method_has: - :ref:`bool` **has** **(** :ref:`int` value **)** |const| @@ -207,6 +225,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedInt64Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`int` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedInt64Array_method_set: - void **set** **(** :ref:`int` index, :ref:`int` value **)** @@ -256,10 +282,6 @@ Operator Descriptions .. _class_PackedInt64Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedInt64Array` right **)** ---- @@ -272,10 +294,6 @@ Operator Descriptions .. _class_PackedInt64Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedInt64Array` right **)** ---- diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index e1d2eee59..bf073507f 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -9,12 +9,20 @@ PackedStringArray ================= -A packed :ref:`Array` of :ref:`String`\ s. +A packed array of :ref:`String`\ s. Description ----------- -An :ref:`Array` specifically designed to hold :ref:`String`\ s. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold :ref:`String`\ s. Packs data tightly, so it saves memory for large array sizes. + +If you want to join the strings in the array, use :ref:`String.join`. + +:: + + var string_array = PackedStringArray(["hello", "world"]) + var string = " ".join(string_array) + print(string) # "hello world" Tutorials --------- @@ -42,10 +50,14 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`String` value, :ref:`bool` before=true **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`String` value **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`duplicate` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`String` value **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`String` value, :ref:`int` from=0 **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`String` value **)** |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`String` value **)** | @@ -60,6 +72,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| | ++---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`String` value **)** | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -74,15 +88,11 @@ Methods Operators --------- -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedStringArray` right **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`operator +` **(** :ref:`PackedStringArray` right **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedStringArray` right **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -138,6 +148,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedStringArray_method_count: + +- :ref:`int` **count** **(** :ref:`String` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedStringArray_method_duplicate: - :ref:`PackedStringArray` **duplicate** **(** **)** @@ -154,6 +172,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedStringArray_method_find: + +- :ref:`int` **find** **(** :ref:`String` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedStringArray_method_has: - :ref:`bool` **has** **(** :ref:`String` value **)** |const| @@ -210,6 +236,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedStringArray_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`String` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedStringArray_method_set: - void **set** **(** :ref:`int` index, :ref:`String` value **)** @@ -255,10 +289,6 @@ Operator Descriptions .. _class_PackedStringArray_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedStringArray` right **)** ---- @@ -271,10 +301,6 @@ Operator Descriptions .. _class_PackedStringArray_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedStringArray` right **)** ---- diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 947e0e964..905b190ca 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -9,12 +9,12 @@ PackedVector2Array ================== -A packed :ref:`Array` of :ref:`Vector2`\ s. +A packed array of :ref:`Vector2`\ s. Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Vector2`. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold :ref:`Vector2`. Packs data tightly, so it saves memory for large array sizes. Tutorials --------- @@ -42,10 +42,14 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector2` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`Vector2` value **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`duplicate` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`Vector2` value **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`Vector2` value **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector2` value **)** | @@ -60,6 +64,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`Vector2` value **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -74,8 +80,6 @@ Methods Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector2Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -83,8 +87,6 @@ Operators +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector2Array` | :ref:`operator +` **(** :ref:`PackedVector2Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector2Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -140,6 +142,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedVector2Array_method_count: + +- :ref:`int` **count** **(** :ref:`Vector2` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedVector2Array_method_duplicate: - :ref:`PackedVector2Array` **duplicate** **(** **)** @@ -156,6 +166,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedVector2Array_method_find: + +- :ref:`int` **find** **(** :ref:`Vector2` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedVector2Array_method_has: - :ref:`bool` **has** **(** :ref:`Vector2` value **)** |const| @@ -212,6 +230,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedVector2Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`Vector2` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedVector2Array_method_set: - void **set** **(** :ref:`int` index, :ref:`Vector2` value **)** @@ -257,10 +283,6 @@ Operator Descriptions .. _class_PackedVector2Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedVector2Array` right **)** ---- @@ -279,10 +301,6 @@ Operator Descriptions .. _class_PackedVector2Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedVector2Array` right **)** ---- diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index e1fd8ab85..f213e70b0 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -9,12 +9,12 @@ PackedVector3Array ================== -A packed :ref:`Array` of :ref:`Vector3`\ s. +A packed array of :ref:`Vector3`\ s. Description ----------- -An :ref:`Array` specifically designed to hold :ref:`Vector3`. Packs data tightly, so it saves memory for large array sizes. +An array specifically designed to hold :ref:`Vector3`. Packs data tightly, so it saves memory for large array sizes. Constructors ------------ @@ -37,10 +37,14 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`bsearch` **(** :ref:`Vector3` value, :ref:`bool` before=true **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`Vector3` value **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`duplicate` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fill` **(** :ref:`Vector3` value **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has` **(** :ref:`Vector3` value **)** |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` at_index, :ref:`Vector3` value **)** | @@ -55,6 +59,8 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reverse` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` index, :ref:`Vector3` value **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** |const| | @@ -69,8 +75,6 @@ Methods Operators --------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`PackedVector3Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -78,8 +82,6 @@ Operators +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`operator +` **(** :ref:`PackedVector3Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`PackedVector3Array` right **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -135,6 +137,14 @@ Finds the index of an existing value (or the insertion index that maintains sort ---- +.. _class_PackedVector3Array_method_count: + +- :ref:`int` **count** **(** :ref:`Vector3` value **)** |const| + +Returns the number of times an element is in the array. + +---- + .. _class_PackedVector3Array_method_duplicate: - :ref:`PackedVector3Array` **duplicate** **(** **)** @@ -151,6 +161,14 @@ Assigns the given value to all elements in the array. This can typically be used ---- +.. _class_PackedVector3Array_method_find: + +- :ref:`int` **find** **(** :ref:`Vector3` value, :ref:`int` from=0 **)** |const| + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +---- + .. _class_PackedVector3Array_method_has: - :ref:`bool` **has** **(** :ref:`Vector3` value **)** |const| @@ -207,6 +225,14 @@ Reverses the order of the elements in the array. ---- +.. _class_PackedVector3Array_method_rfind: + +- :ref:`int` **rfind** **(** :ref:`Vector3` value, :ref:`int` from=-1 **)** |const| + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +---- + .. _class_PackedVector3Array_method_set: - void **set** **(** :ref:`int` index, :ref:`Vector3` value **)** @@ -252,10 +278,6 @@ Operator Descriptions .. _class_PackedVector3Array_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`PackedVector3Array` right **)** ---- @@ -274,10 +296,6 @@ Operator Descriptions .. _class_PackedVector3Array_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`PackedVector3Array` right **)** ---- diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index ef274fa16..d438e882d 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -38,7 +38,7 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_bound` **(** **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected_to_host` **(** **)** |const| | +| :ref:`bool` | :ref:`is_socket_connected` **(** **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`join_multicast_group` **(** :ref:`String` multicast_address, :ref:`String` interface_name **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -118,9 +118,9 @@ Returns whether this ``PacketPeerUDP`` is bound to an address and can receive pa ---- -.. _class_PacketPeerUDP_method_is_connected_to_host: +.. _class_PacketPeerUDP_method_is_socket_connected: -- :ref:`bool` **is_connected_to_host** **(** **)** |const| +- :ref:`bool` **is_socket_connected** **(** **)** |const| Returns ``true`` if the UDP socket is open and has been connected to a remote address. See :ref:`connect_to_host`. diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index 067cf7cea..f274fc749 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -23,6 +23,8 @@ Panel container type. This container fits controls inside of the delimited area Tutorials --------- +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + - `2D Role Playing Game Demo `__ Properties diff --git a/classes/class_particlesmaterial.rst b/classes/class_particlesmaterial.rst index 729037756..5cd64ed3c 100644 --- a/classes/class_particlesmaterial.rst +++ b/classes/class_particlesmaterial.rst @@ -269,6 +269,8 @@ enum **ParticleFlags**: .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_SPHERE: +.. _class_ParticlesMaterial_constant_EMISSION_SHAPE_SPHERE_SURFACE: + .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_BOX: .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_POINTS: @@ -285,15 +287,17 @@ enum **EmissionShape**: - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere. -- **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box. +- **EMISSION_SHAPE_SPHERE_SURFACE** = **2** --- Particles will be emitted on the surface of a sphere. -- **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. +- **EMISSION_SHAPE_BOX** = **3** --- Particles will be emitted in the volume of a box. -- **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. +- **EMISSION_SHAPE_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle color will be modulated by :ref:`emission_color_texture`. -- **EMISSION_SHAPE_RING** = **5** --- Particles will be emitted in a ring or cylinder. +- **EMISSION_SHAPE_DIRECTED_POINTS** = **5** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture`. Particle color will be modulated by :ref:`emission_color_texture`. -- **EMISSION_SHAPE_MAX** = **6** --- Represents the size of the :ref:`EmissionShape` enum. +- **EMISSION_SHAPE_RING** = **6** --- Particles will be emitted in a ring or cylinder. + +- **EMISSION_SHAPE_MAX** = **7** --- Represents the size of the :ref:`EmissionShape` enum. ---- diff --git a/classes/class_performance.rst b/classes/class_performance.rst index f892fa6b3..1f5d326d3 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -20,9 +20,9 @@ This class provides access to a number of different monitors related to performa You can add custom monitors using the :ref:`add_custom_monitor` method. Custom monitors are available in **Monitor** tab in the editor's **Debugger** panel together with built-in monitors. -\ **Note:** A few of these monitors are only available in debug mode and will always return 0 when used in a release build. +\ **Note:** Some of the built-in monitors are only available in debug mode and will always return ``0`` when used in a project exported in release mode. -\ **Note:** Many of these monitors are not updated in real-time, so there may be a short delay between changes. +\ **Note:** Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes. \ **Note:** Custom monitors do not support negative values. Negative values are clamped to 0. @@ -100,51 +100,51 @@ Enumerations enum **Monitor**: -- **TIME_FPS** = **0** --- Number of frames per second. +- **TIME_FPS** = **0** --- The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. *Higher is better.* -- **TIME_PROCESS** = **1** --- Time it took to complete one frame, in seconds. +- **TIME_PROCESS** = **1** --- Time it took to complete one frame, in seconds. *Lower is better.* -- **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame, in seconds. +- **TIME_PHYSICS_PROCESS** = **2** --- Time it took to complete one physics frame, in seconds. *Lower is better.* -- **MEMORY_STATIC** = **3** --- Static memory currently used, in bytes. Not available in release builds. +- **MEMORY_STATIC** = **3** --- Static memory currently used, in bytes. Not available in release builds. *Lower is better.* -- **MEMORY_STATIC_MAX** = **4** --- Available static memory. Not available in release builds. +- **MEMORY_STATIC_MAX** = **4** --- Available static memory. Not available in release builds. *Lower is better.* -- **MEMORY_MESSAGE_BUFFER_MAX** = **5** --- Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. +- **MEMORY_MESSAGE_BUFFER_MAX** = **5** --- Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. *Lower is better.* -- **OBJECT_COUNT** = **6** --- Number of objects currently instantiated (including nodes). +- **OBJECT_COUNT** = **6** --- Number of objects currently instantiated (including nodes). *Lower is better.* -- **OBJECT_RESOURCE_COUNT** = **7** --- Number of resources currently used. +- **OBJECT_RESOURCE_COUNT** = **7** --- Number of resources currently used. *Lower is better.* -- **OBJECT_NODE_COUNT** = **8** --- Number of nodes currently instantiated in the scene tree. This also includes the root node. +- **OBJECT_NODE_COUNT** = **8** --- Number of nodes currently instantiated in the scene tree. This also includes the root node. *Lower is better.* -- **OBJECT_ORPHAN_NODE_COUNT** = **9** --- Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. +- **OBJECT_ORPHAN_NODE_COUNT** = **9** --- Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. *Lower is better.* -- **RENDER_TOTAL_OBJECTS_IN_FRAME** = **10** +- **RENDER_TOTAL_OBJECTS_IN_FRAME** = **10** --- The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). *Lower is better.* -- **RENDER_TOTAL_PRIMITIVES_IN_FRAME** = **11** +- **RENDER_TOTAL_PRIMITIVES_IN_FRAME** = **11** --- The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). *Lower is better.* -- **RENDER_TOTAL_DRAW_CALLS_IN_FRAME** = **12** +- **RENDER_TOTAL_DRAW_CALLS_IN_FRAME** = **12** --- The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. *Lower is better.* -- **RENDER_VIDEO_MEM_USED** = **13** --- The amount of video memory used, i.e. texture and vertex memory combined. +- **RENDER_VIDEO_MEM_USED** = **13** --- The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of :ref:`RENDER_TEXTURE_MEM_USED` and :ref:`RENDER_BUFFER_MEM_USED`. *Lower is better.* -- **RENDER_TEXTURE_MEM_USED** = **14** --- The amount of texture memory used. +- **RENDER_TEXTURE_MEM_USED** = **14** --- The amount of texture memory used (in bytes). *Lower is better.* -- **RENDER_BUFFER_MEM_USED** = **15** +- **RENDER_BUFFER_MEM_USED** = **15** --- The amount of render buffer memory used (in bytes). *Lower is better.* -- **PHYSICS_2D_ACTIVE_OBJECTS** = **16** --- Number of active :ref:`RigidDynamicBody2D` nodes in the game. +- **PHYSICS_2D_ACTIVE_OBJECTS** = **16** --- Number of active :ref:`RigidDynamicBody2D` nodes in the game. *Lower is better.* -- **PHYSICS_2D_COLLISION_PAIRS** = **17** --- Number of collision pairs in the 2D physics engine. +- **PHYSICS_2D_COLLISION_PAIRS** = **17** --- Number of collision pairs in the 2D physics engine. *Lower is better.* -- **PHYSICS_2D_ISLAND_COUNT** = **18** --- Number of islands in the 2D physics engine. +- **PHYSICS_2D_ISLAND_COUNT** = **18** --- Number of islands in the 2D physics engine. *Lower is better.* -- **PHYSICS_3D_ACTIVE_OBJECTS** = **19** --- Number of active :ref:`RigidDynamicBody3D` and :ref:`VehicleBody3D` nodes in the game. +- **PHYSICS_3D_ACTIVE_OBJECTS** = **19** --- Number of active :ref:`RigidDynamicBody3D` and :ref:`VehicleBody3D` nodes in the game. *Lower is better.* -- **PHYSICS_3D_COLLISION_PAIRS** = **20** --- Number of collision pairs in the 3D physics engine. +- **PHYSICS_3D_COLLISION_PAIRS** = **20** --- Number of collision pairs in the 3D physics engine. *Lower is better.* -- **PHYSICS_3D_ISLAND_COUNT** = **21** --- Number of islands in the 3D physics engine. +- **PHYSICS_3D_ISLAND_COUNT** = **21** --- Number of islands in the 3D physics engine. *Lower is better.* -- **AUDIO_OUTPUT_LATENCY** = **22** --- Output latency of the :ref:`AudioServer`. +- **AUDIO_OUTPUT_LATENCY** = **22** --- Output latency of the :ref:`AudioServer`. *Lower is better.* - **MONITOR_MAX** = **23** --- Represents the size of the :ref:`Monitor` enum. @@ -155,7 +155,7 @@ Method Descriptions - void **add_custom_monitor** **(** :ref:`StringName` id, :ref:`Callable` callable, :ref:`Array` arguments=[] **)** -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". +Adds a custom monitor with the name ``id``. You can specify the category of the monitor using slash delimiters in ``id`` (for example: ``"Game/NumberOfNPCs"``). If there is more than one slash delimiter, then the default category is used. The default category is ``"Custom"``. Prints an error if given ``id`` is already present. .. tabs:: @@ -169,11 +169,11 @@ Adds a custom monitor with name same as id. You can specify the category of moni 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. + # 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. + # 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". @@ -209,21 +209,17 @@ Adds a custom monitor with name same as id. You can specify the category of moni -The debugger calls the callable to get the value of custom monitor. The callable must return a number. +The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. Callables are called with arguments supplied in argument array. -\ **Note:** It throws an error if given id is already present. - ---- .. _class_Performance_method_get_custom_monitor: - :ref:`Variant` **get_custom_monitor** **(** :ref:`StringName` id **)** -Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. - -\ **Note:** It throws an error if the given id is absent. +Returns the value of custom monitor with given ``id``. The callable is called to get the value of custom monitor. See also :ref:`has_custom_monitor`. Prints an error if the given ``id`` is absent. ---- @@ -231,7 +227,7 @@ Returns the value of custom monitor with given id. The callable is called to get - :ref:`Array` **get_custom_monitor_names** **(** **)** -Returns the names of active custom monitors in an array. +Returns the names of active custom monitors in an :ref:`Array`. ---- @@ -239,7 +235,7 @@ Returns the names of active custom monitors in an array. - :ref:`float` **get_monitor** **(** :ref:`Monitor` monitor **)** |const| -Returns the value of one of the available monitors. You should provide one of the :ref:`Monitor` constants as the argument, like this: +Returns the value of one of the available built-in monitors. You should provide one of the :ref:`Monitor` constants as the argument, like this: .. tabs:: @@ -254,13 +250,15 @@ Returns the value of one of the available monitors. You should provide one of th +See :ref:`get_custom_monitor` to query custom performance monitors' values. + ---- .. _class_Performance_method_get_monitor_modification_time: - :ref:`int` **get_monitor_modification_time** **(** **)** -Returns the last tick in which custom monitor was added/removed. +Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to :ref:`Time.get_ticks_usec` when the monitor is updated. ---- @@ -268,7 +266,7 @@ Returns the last tick in which custom monitor was added/removed. - :ref:`bool` **has_custom_monitor** **(** :ref:`StringName` id **)** -Returns true if custom monitor with the given id is present otherwise returns false. +Returns ``true`` if custom monitor with the given ``id`` is present, ``false`` otherwise. ---- @@ -276,9 +274,7 @@ Returns true if custom monitor with the given id is present otherwise returns fa - void **remove_custom_monitor** **(** :ref:`StringName` id **)** -Removes the custom monitor with given id. - -\ **Note:** It throws an error if the given id is already absent. +Removes the custom monitor with given ``id``. Prints an error if the given ``id`` is already absent. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_physicalskymaterial.rst b/classes/class_physicalskymaterial.rst index f4a4793ea..f45128a12 100644 --- a/classes/class_physicalskymaterial.rst +++ b/classes/class_physicalskymaterial.rst @@ -25,8 +25,6 @@ As it is based on a daylight model, the sky fades to black as the sunset ends. I Properties ---------- -+-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ -| :ref:`float` | :ref:`dither_strength` | ``1.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`exposure` | ``0.1`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ @@ -48,26 +46,12 @@ Properties +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ | :ref:`float` | :ref:`turbidity` | ``10.0`` | +-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ +| :ref:`bool` | :ref:`use_debanding` | ``true`` | ++-----------------------------------+--------------------------------------------------------------------------------------+----------------------------------+ Property Descriptions --------------------- -.. _class_PhysicalSkyMaterial_property_dither_strength: - -- :ref:`float` **dither_strength** - -+-----------+----------------------------+ -| *Default* | ``1.0`` | -+-----------+----------------------------+ -| *Setter* | set_dither_strength(value) | -+-----------+----------------------------+ -| *Getter* | get_dither_strength() | -+-----------+----------------------------+ - -Sets the amount of dithering to use. Dithering helps reduce banding that appears from the smooth changes in color in the sky. Use the lowest value possible, higher amounts may add fuzziness to the sky. - ----- - .. _class_PhysicalSkyMaterial_property_exposure: - :ref:`float` **exposure** @@ -224,6 +208,22 @@ Sets the size of the sun disk. Default value is based on Sol's perceived size fr Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. +---- + +.. _class_PhysicalSkyMaterial_property_use_debanding: + +- :ref:`bool` **use_debanding** + ++-----------+--------------------------+ +| *Default* | ``true`` | ++-----------+--------------------------+ +| *Setter* | set_use_debanding(value) | ++-----------+--------------------------+ +| *Getter* | get_use_debanding() | ++-----------+--------------------------+ + +If ``true``, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index a0a5a3302..bf446cb28 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -11,6 +11,8 @@ PhysicsDirectBodyState3D **Inherits:** :ref:`Object` +**Inherited By:** :ref:`PhysicsDirectBodyState3DExtension` + Direct access object to a physics body in the :ref:`PhysicsServer3D`. Description diff --git a/classes/class_physicsdirectbodystate3dextension.rst b/classes/class_physicsdirectbodystate3dextension.rst new file mode 100644 index 000000000..8a65bbbb4 --- /dev/null +++ b/classes/class_physicsdirectbodystate3dextension.rst @@ -0,0 +1,379 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PhysicsDirectBodyState3DExtension.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PhysicsDirectBodyState3DExtension: + +PhysicsDirectBodyState3DExtension +================================= + +**Inherits:** :ref:`PhysicsDirectBodyState3D` **<** :ref:`Object` + + + +Methods +------- + ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_constant_central_force` **(** :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_central_force` **(** :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_central_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_torque` **(** :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_apply_torque_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Basis` | :ref:`_get_principal_inertia_axes` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState3D` | :ref:`_get_space_state` **(** **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`_get_transform` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_integrate_forces` **(** **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_angular_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_constant_force` **(** :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_linear_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_transform` **(** :ref:`Transform3D` transform **)** |virtual| | ++-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_central_force: + +- void **_add_constant_central_force** **(** :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_force: + +- void **_add_constant_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_torque: + +- void **_add_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_force: + +- void **_apply_central_force** **(** :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_impulse: + +- void **_apply_central_impulse** **(** :ref:`Vector3` impulse **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_force: + +- void **_apply_force** **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_impulse: + +- void **_apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque: + +- void **_apply_torque** **(** :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque_impulse: + +- void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_angular_velocity: + +- :ref:`Vector3` **_get_angular_velocity** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass: + +- :ref:`Vector3` **_get_center_of_mass** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass_local: + +- :ref:`Vector3` **_get_center_of_mass_local** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_force: + +- :ref:`Vector3` **_get_constant_force** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_torque: + +- :ref:`Vector3` **_get_constant_torque** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider: + +- :ref:`RID` **_get_contact_collider** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_id: + +- :ref:`int` **_get_contact_collider_id** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_object: + +- :ref:`Object` **_get_contact_collider_object** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_position: + +- :ref:`Vector3` **_get_contact_collider_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_shape: + +- :ref:`int` **_get_contact_collider_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_velocity_at_position: + +- :ref:`Vector3` **_get_contact_collider_velocity_at_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_count: + +- :ref:`int` **_get_contact_count** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_impulse: + +- :ref:`float` **_get_contact_impulse** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_normal: + +- :ref:`Vector3` **_get_contact_local_normal** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_position: + +- :ref:`Vector3` **_get_contact_local_position** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_shape: + +- :ref:`int` **_get_contact_local_shape** **(** :ref:`int` contact_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: + +- :ref:`Vector3` **_get_inverse_inertia** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_mass: + +- :ref:`float` **_get_inverse_mass** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_linear_velocity: + +- :ref:`Vector3` **_get_linear_velocity** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_principal_inertia_axes: + +- :ref:`Basis` **_get_principal_inertia_axes** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_space_state: + +- :ref:`PhysicsDirectSpaceState3D` **_get_space_state** **(** **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_step: + +- :ref:`float` **_get_step** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_total_angular_damp: + +- :ref:`float` **_get_total_angular_damp** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_total_gravity: + +- :ref:`Vector3` **_get_total_gravity** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_total_linear_damp: + +- :ref:`float` **_get_total_linear_damp** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_transform: + +- :ref:`Transform3D` **_get_transform** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__get_velocity_at_local_position: + +- :ref:`Vector3` **_get_velocity_at_local_position** **(** :ref:`Vector3` local_position **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__integrate_forces: + +- void **_integrate_forces** **(** **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__is_sleeping: + +- :ref:`bool` **_is_sleeping** **(** **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_angular_velocity: + +- void **_set_angular_velocity** **(** :ref:`Vector3` velocity **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_force: + +- void **_set_constant_force** **(** :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_torque: + +- void **_set_constant_torque** **(** :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_linear_velocity: + +- void **_set_linear_velocity** **(** :ref:`Vector3` velocity **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_sleep_state: + +- void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| + +---- + +.. _class_PhysicsDirectBodyState3DExtension_method__set_transform: + +- void **_set_transform** **(** :ref:`Transform3D` transform **)** |virtual| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index 025436dcf..9a534a6dc 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -11,6 +11,8 @@ PhysicsDirectSpaceState3D **Inherits:** :ref:`Object` +**Inherited By:** :ref:`PhysicsDirectSpaceState3DExtension` + Direct access object to a space in the :ref:`PhysicsServer3D`. Description diff --git a/classes/class_physicsdirectspacestate3dextension.rst b/classes/class_physicsdirectspacestate3dextension.rst new file mode 100644 index 000000000..6b5e11fcf --- /dev/null +++ b/classes/class_physicsdirectspacestate3dextension.rst @@ -0,0 +1,83 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PhysicsDirectSpaceState3DExtension.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PhysicsDirectSpaceState3DExtension: + +PhysicsDirectSpaceState3DExtension +================================== + +**Inherits:** :ref:`PhysicsDirectSpaceState3D` **<** :ref:`Object` + + + +Methods +------- + ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_get_closest_point_to_object_volume` **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | ++-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_PhysicsDirectSpaceState3DExtension_method__cast_motion: + +- :ref:`bool` **_cast_motion** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__collide_shape: + +- :ref:`bool` **_collide_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__get_closest_point_to_object_volume: + +- :ref:`Vector3` **_get_closest_point_to_object_volume** **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_point: + +- :ref:`int` **_intersect_point** **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_ray: + +- :ref:`bool` **_intersect_ray** **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, PhysicsServer3DExtensionRayResult* result **)** |virtual| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_shape: + +- :ref:`int` **_intersect_shape** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| + +---- + +.. _class_PhysicsDirectSpaceState3DExtension_method__rest_info: + +- :ref:`bool` **_rest_info** **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 107f334e3..0a24794df 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -11,6 +11,8 @@ PhysicsServer3D **Inherits:** :ref:`Object` +**Inherited By:** :ref:`PhysicsServer3DExtension` + Server interface for low-level physics access. Description @@ -1711,7 +1713,7 @@ Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam` **get_process_info** **(** :ref:`ProcessInfo` process_info **)** -Returns an Info defined by the :ref:`ProcessInfo` input given. +Returns information about the current state of the 3D physics engine. See :ref:`ProcessInfo` for a list of available states. ---- diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst new file mode 100644 index 000000000..400e34c91 --- /dev/null +++ b/classes/class_physicsserver3dextension.rst @@ -0,0 +1,1051 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PhysicsServer3DExtension.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PhysicsServer3DExtension: + +PhysicsServer3DExtension +======================== + +**Inherits:** :ref:`PhysicsServer3D` **<** :ref:`Object` + + + +Methods +------- + ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | ++-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_PhysicsServer3DExtension_method__area_add_shape: + +- void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_attach_object_instance_id: + +- void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref:`int` id **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_clear_shapes: + +- void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_create: + +- :ref:`RID` **_area_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_object_instance_id: + +- :ref:`int` **_area_get_object_instance_id** **(** :ref:`RID` area **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_param: + +- :ref:`Variant` **_area_get_param** **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_shape: + +- :ref:`RID` **_area_get_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_shape_count: + +- :ref:`int` **_area_get_shape_count** **(** :ref:`RID` area **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_shape_transform: + +- :ref:`Transform3D` **_area_get_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_space: + +- :ref:`RID` **_area_get_space** **(** :ref:`RID` area **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_get_transform: + +- :ref:`Transform3D` **_area_get_transform** **(** :ref:`RID` area **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__area_remove_shape: + +- void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_area_monitor_callback: + +- void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_collision_layer: + +- void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_collision_mask: + +- void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_monitor_callback: + +- void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_monitorable: + +- void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_param: + +- void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_ray_pickable: + +- void **_area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_shape: + +- void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_shape_disabled: + +- void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_shape_transform: + +- void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_space: + +- void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__area_set_transform: + +- void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_add_collision_exception: + +- void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_add_constant_central_force: + +- void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_add_constant_force: + +- void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_add_constant_torque: + +- void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_add_shape: + +- void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_central_force: + +- void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_central_impulse: + +- void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_force: + +- void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_impulse: + +- void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_torque: + +- void **_body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_apply_torque_impulse: + +- void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_attach_object_instance_id: + +- void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref:`int` id **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_clear_shapes: + +- void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_create: + +- :ref:`RID` **_body_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_collision_layer: + +- :ref:`int` **_body_get_collision_layer** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_collision_mask: + +- :ref:`int` **_body_get_collision_mask** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_constant_force: + +- :ref:`Vector3` **_body_get_constant_force** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_constant_torque: + +- :ref:`Vector3` **_body_get_constant_torque** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_direct_state: + +- :ref:`PhysicsDirectBodyState3D` **_body_get_direct_state** **(** :ref:`RID` body **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_max_contacts_reported: + +- :ref:`int` **_body_get_max_contacts_reported** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_mode: + +- :ref:`BodyMode` **_body_get_mode** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_object_instance_id: + +- :ref:`int` **_body_get_object_instance_id** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_param: + +- :ref:`Variant` **_body_get_param** **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_shape: + +- :ref:`RID` **_body_get_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_shape_count: + +- :ref:`int` **_body_get_shape_count** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_shape_transform: + +- :ref:`Transform3D` **_body_get_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_space: + +- :ref:`RID` **_body_get_space** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_get_state: + +- :ref:`Variant` **_body_get_state** **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_is_axis_locked: + +- :ref:`bool` **_body_is_axis_locked** **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_is_continuous_collision_detection_enabled: + +- :ref:`bool` **_body_is_continuous_collision_detection_enabled** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_is_omitting_force_integration: + +- :ref:`bool` **_body_is_omitting_force_integration** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__body_remove_collision_exception: + +- void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_remove_shape: + +- void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_reset_mass_properties: + +- void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_axis_lock: + +- void **_body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_axis_velocity: + +- void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_collision_layer: + +- void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_collision_mask: + +- void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_constant_force: + +- void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_constant_torque: + +- void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_enable_continuous_collision_detection: + +- void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_force_integration_callback: + +- void **_body_set_force_integration_callback** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_max_contacts_reported: + +- void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_mode: + +- void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_omit_force_integration: + +- void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_param: + +- void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_ray_pickable: + +- void **_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_shape: + +- void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_shape_disabled: + +- void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_shape_transform: + +- void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_space: + +- void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_set_state: + +- void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__body_test_motion: + +- :ref:`bool` **_body_test_motion** **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__box_shape_create: + +- :ref:`RID` **_box_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__capsule_shape_create: + +- :ref:`RID` **_capsule_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__concave_polygon_shape_create: + +- :ref:`RID` **_concave_polygon_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__cone_twist_joint_get_param: + +- :ref:`float` **_cone_twist_joint_get_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__cone_twist_joint_set_param: + +- void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__convex_polygon_shape_create: + +- :ref:`RID` **_convex_polygon_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__custom_shape_create: + +- :ref:`RID` **_custom_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__cylinder_shape_create: + +- :ref:`RID` **_cylinder_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__free_rid: + +- void **_free_rid** **(** :ref:`RID` rid **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_flag: + +- :ref:`bool` **_generic_6dof_joint_get_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_param: + +- :ref:`float` **_generic_6dof_joint_get_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_flag: + +- void **_generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_param: + +- void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__get_process_info: + +- :ref:`int` **_get_process_info** **(** :ref:`ProcessInfo` process_info **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__heightmap_shape_create: + +- :ref:`RID` **_heightmap_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__hinge_joint_get_flag: + +- :ref:`bool` **_hinge_joint_get_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__hinge_joint_get_param: + +- :ref:`float` **_hinge_joint_get_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__hinge_joint_set_flag: + +- void **_hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__hinge_joint_set_param: + +- void **_hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_clear: + +- void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_create: + +- :ref:`RID` **_joint_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_get_solver_priority: + +- :ref:`int` **_joint_get_solver_priority** **(** :ref:`RID` joint **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_get_type: + +- :ref:`JointType` **_joint_get_type** **(** :ref:`RID` joint **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_make_cone_twist: + +- void **_joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_make_generic_6dof: + +- void **_joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_make_hinge: + +- void **_joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_make_pin: + +- void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_make_slider: + +- void **_joint_make_slider** **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__joint_set_solver_priority: + +- void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_a: + +- :ref:`Vector3` **_pin_joint_get_local_a** **(** :ref:`RID` joint **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_b: + +- :ref:`Vector3` **_pin_joint_get_local_b** **(** :ref:`RID` joint **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_get_param: + +- :ref:`float` **_pin_joint_get_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_a: + +- void **_pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_b: + +- void **_pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__pin_joint_set_param: + +- void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__separation_ray_shape_create: + +- :ref:`RID` **_separation_ray_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__set_active: + +- void **_set_active** **(** :ref:`bool` active **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__shape_get_data: + +- :ref:`Variant` **_shape_get_data** **(** :ref:`RID` shape **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__shape_get_type: + +- :ref:`ShapeType` **_shape_get_type** **(** :ref:`RID` shape **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__shape_set_data: + +- void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__slider_joint_get_param: + +- :ref:`float` **_slider_joint_get_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__slider_joint_set_param: + +- void **_slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__soft_body_get_bounds: + +- :ref:`AABB` **_soft_body_get_bounds** **(** :ref:`RID` body **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__space_create: + +- :ref:`RID` **_space_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__space_get_direct_state: + +- :ref:`PhysicsDirectSpaceState3D` **_space_get_direct_state** **(** :ref:`RID` space **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__space_get_param: + +- :ref:`float` **_space_get_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__space_is_active: + +- :ref:`bool` **_space_is_active** **(** :ref:`RID` space **)** |virtual| |const| + +---- + +.. _class_PhysicsServer3DExtension_method__space_set_active: + +- void **_space_set_active** **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__space_set_param: + +- void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__sphere_shape_create: + +- :ref:`RID` **_sphere_shape_create** **(** **)** |virtual| + +---- + +.. _class_PhysicsServer3DExtension_method__world_boundary_shape_create: + +- :ref:`RID` **_world_boundary_shape_create** **(** **)** |virtual| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst new file mode 100644 index 000000000..bfef22e26 --- /dev/null +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -0,0 +1,51 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PhysicsServer3DRenderingServerHandler.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PhysicsServer3DRenderingServerHandler: + +PhysicsServer3DRenderingServerHandler +===================================== + +**Inherits:** :ref:`Object` + + + +Methods +------- + ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_normal` **(** :ref:`int` vertex_id, const void* normals **)** |virtual| | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_PhysicsServer3DRenderingServerHandler_method__set_aabb: + +- void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method__set_normal: + +- void **_set_normal** **(** :ref:`int` vertex_id, const void* normals **)** |virtual| + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method__set_vertex: + +- void **_set_vertex** **(** :ref:`int` vertex_id, const void* vertices **)** |virtual| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_physicstestmotionparameters2d.rst b/classes/class_physicstestmotionparameters2d.rst index d70483a4c..3373a2eb4 100644 --- a/classes/class_physicstestmotionparameters2d.rst +++ b/classes/class_physicstestmotionparameters2d.rst @@ -34,6 +34,8 @@ Properties +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Vector2` | :ref:`motion` | ``Vector2(0, 0)`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | ++---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ Property Descriptions --------------------- @@ -134,6 +136,24 @@ Increases the size of the shapes involved in the collision detection. Motion vector to define the length and direction of the motion to test. +---- + +.. _class_PhysicsTestMotionParameters2D_property_recovery_as_collision: + +- :ref:`bool` **recovery_as_collision** + ++-----------+------------------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------------------+ +| *Setter* | set_recovery_as_collision_enabled(value) | ++-----------+------------------------------------------+ +| *Getter* | is_recovery_as_collision_enabled() | ++-----------+------------------------------------------+ + +If set to ``true``, any depenetration from the recovery phase is reported as a collision; this is used e.g. by :ref:`CharacterBody2D.move_and_slide` for improving floor detection when floor snapping is disabled. + +If set to ``false``, only collisions resulting from the motion are reported; this is used e.g. by :ref:`PhysicsBody2D.move_and_collide`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_physicstestmotionparameters3d.rst b/classes/class_physicstestmotionparameters3d.rst index 8c89799eb..3d607df2b 100644 --- a/classes/class_physicstestmotionparameters3d.rst +++ b/classes/class_physicstestmotionparameters3d.rst @@ -36,6 +36,8 @@ Properties +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3` | :ref:`motion` | ``Vector3(0, 0, 0)`` | +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ +| :ref:`bool` | :ref:`recovery_as_collision` | ``false`` | ++---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ Property Descriptions --------------------- @@ -152,6 +154,24 @@ Maximum number of returned collisions, between ``1`` and ``32``. Always returns Motion vector to define the length and direction of the motion to test. +---- + +.. _class_PhysicsTestMotionParameters3D_property_recovery_as_collision: + +- :ref:`bool` **recovery_as_collision** + ++-----------+------------------------------------------+ +| *Default* | ``false`` | ++-----------+------------------------------------------+ +| *Setter* | set_recovery_as_collision_enabled(value) | ++-----------+------------------------------------------+ +| *Getter* | is_recovery_as_collision_enabled() | ++-----------+------------------------------------------+ + +If set to ``true``, any depenetration from the recovery phase is reported as a collision; this is used e.g. by :ref:`CharacterBody3D.move_and_slide` for improving floor detection when floor snapping is disabled. + +If set to ``false``, only collisions resulting from the motion are detected; this is used e.g. by :ref:`PhysicsBody3D.move_and_collide`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_placeholdercubemap.rst b/classes/class_placeholdercubemap.rst new file mode 100644 index 000000000..77c15674a --- /dev/null +++ b/classes/class_placeholdercubemap.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderCubemap.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderCubemap: + +PlaceholderCubemap +================== + +**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdercubemaparray.rst b/classes/class_placeholdercubemaparray.rst new file mode 100644 index 000000000..c7b5d5822 --- /dev/null +++ b/classes/class_placeholdercubemaparray.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderCubemapArray.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderCubemapArray: + +PlaceholderCubemapArray +======================= + +**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdermaterial.rst b/classes/class_placeholdermaterial.rst new file mode 100644 index 000000000..e4500cd63 --- /dev/null +++ b/classes/class_placeholdermaterial.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderMaterial.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderMaterial: + +PlaceholderMaterial +=================== + +**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdermesh.rst b/classes/class_placeholdermesh.rst new file mode 100644 index 000000000..6556ffc23 --- /dev/null +++ b/classes/class_placeholdermesh.rst @@ -0,0 +1,43 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderMesh.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderMesh: + +PlaceholderMesh +=============== + +**Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +Properties +---------- + ++-------------------------+--------------------------------------------------+----------------------------+ +| :ref:`AABB` | :ref:`aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | ++-------------------------+--------------------------------------------------+----------------------------+ + +Property Descriptions +--------------------- + +.. _class_PlaceholderMesh_property_aabb: + +- :ref:`AABB` **aabb** + ++-----------+----------------------------+ +| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | ++-----------+----------------------------+ +| *Setter* | set_aabb(value) | ++-----------+----------------------------+ +| *Getter* | get_aabb() | ++-----------+----------------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdertexture2d.rst b/classes/class_placeholdertexture2d.rst new file mode 100644 index 000000000..8ea08a56b --- /dev/null +++ b/classes/class_placeholdertexture2d.rst @@ -0,0 +1,43 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderTexture2D.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderTexture2D: + +PlaceholderTexture2D +==================== + +**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +Properties +---------- + ++-------------------------------+-------------------------------------------------------+-------------------+ +| :ref:`Vector2` | :ref:`size` | ``Vector2(1, 1)`` | ++-------------------------------+-------------------------------------------------------+-------------------+ + +Property Descriptions +--------------------- + +.. _class_PlaceholderTexture2D_property_size: + +- :ref:`Vector2` **size** + ++-----------+-------------------+ +| *Default* | ``Vector2(1, 1)`` | ++-----------+-------------------+ +| *Setter* | set_size(value) | ++-----------+-------------------+ +| *Getter* | get_size() | ++-----------+-------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdertexture2darray.rst b/classes/class_placeholdertexture2darray.rst new file mode 100644 index 000000000..a3fd720a8 --- /dev/null +++ b/classes/class_placeholdertexture2darray.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderTexture2DArray.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderTexture2DArray: + +PlaceholderTexture2DArray +========================= + +**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdertexture3d.rst b/classes/class_placeholdertexture3d.rst new file mode 100644 index 000000000..89f54c6e4 --- /dev/null +++ b/classes/class_placeholdertexture3d.rst @@ -0,0 +1,43 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderTexture3D.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderTexture3D: + +PlaceholderTexture3D +==================== + +**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +Properties +---------- + ++---------------------------------+-------------------------------------------------------+-----------------------+ +| :ref:`Vector3i` | :ref:`size` | ``Vector3i(1, 1, 1)`` | ++---------------------------------+-------------------------------------------------------+-----------------------+ + +Property Descriptions +--------------------- + +.. _class_PlaceholderTexture3D_property_size: + +- :ref:`Vector3i` **size** + ++-----------+-----------------------+ +| *Default* | ``Vector3i(1, 1, 1)`` | ++-----------+-----------------------+ +| *Setter* | set_size(value) | ++-----------+-----------------------+ +| *Getter* | get_size() | ++-----------+-----------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_placeholdertexturelayered.rst b/classes/class_placeholdertexturelayered.rst new file mode 100644 index 000000000..6e0af3e22 --- /dev/null +++ b/classes/class_placeholdertexturelayered.rst @@ -0,0 +1,61 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PlaceholderTextureLayered.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PlaceholderTextureLayered: + +PlaceholderTextureLayered +========================= + +**Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`PlaceholderCubemap`, :ref:`PlaceholderCubemapArray`, :ref:`PlaceholderTexture2DArray` + + + +Properties +---------- + ++---------------------------------+----------------------------------------------------------------+--------------------+ +| :ref:`int` | :ref:`layers` | ``1`` | ++---------------------------------+----------------------------------------------------------------+--------------------+ +| :ref:`Vector2i` | :ref:`size` | ``Vector2i(1, 1)`` | ++---------------------------------+----------------------------------------------------------------+--------------------+ + +Property Descriptions +--------------------- + +.. _class_PlaceholderTextureLayered_property_layers: + +- :ref:`int` **layers** + ++-----------+-------------------+ +| *Default* | ``1`` | ++-----------+-------------------+ +| *Setter* | set_layers(value) | ++-----------+-------------------+ +| *Getter* | get_layers() | ++-----------+-------------------+ + +---- + +.. _class_PlaceholderTextureLayered_property_size: + +- :ref:`Vector2i` **size** + ++-----------+--------------------+ +| *Default* | ``Vector2i(1, 1)`` | ++-----------+--------------------+ +| *Setter* | set_size(value) | ++-----------+--------------------+ +| *Getter* | get_size() | ++-----------+--------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_plane.rst b/classes/class_plane.rst index f815e2eea..085f54f7e 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -83,13 +83,9 @@ Methods Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Plane` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Plane` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------+ | :ref:`Plane` | :ref:`operator unary+` **(** **)** | @@ -308,10 +304,6 @@ Operator Descriptions .. _class_Plane_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Plane` right **)** Returns ``true`` if the planes are not equal. @@ -322,10 +314,6 @@ Returns ``true`` if the planes are not equal. .. _class_Plane_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Plane` right **)** Returns ``true`` if the planes are exactly equal. diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index c82d9ec79..5203430e5 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -22,6 +22,8 @@ The size of a ``PopupMenu`` can be limited by using :ref:`Window.max_size` | :ref:`font_accelerator_color` | ``Color(0.7, 0.7, 0.7, 0.8)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.4, 0.4, 0.4, 0.8)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Color` | :ref:`font_separator_color` | ``Color(0.875, 0.875, 0.875, 1)`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`item_end_padding` | ``2`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`item_start_padding` | ``2`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`outline_size` | ``0`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`vseparation` | ``4`` | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Font` | :ref:`font` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`font_size` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`checked` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`radio_checked` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`radio_unchecked` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`submenu` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`submenu_mirrored` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`Texture2D` | :ref:`unchecked` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`hover` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`labeled_separator_left` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`labeled_separator_right` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`panel` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`panel_disabled` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`StyleBox` | :ref:`separator` | | -+-----------------------------------+-------------------------------------------------------------------------------------+-----------------------------------+ ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_accelerator_color` | ``Color(0.7, 0.7, 0.7, 0.8)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.4, 0.4, 0.4, 0.8)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_hover_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_separator_color` | ``Color(0.875, 0.875, 0.875, 1)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Color` | :ref:`font_separator_outline_color` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`h_separation` | ``4`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`item_end_padding` | ``2`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`item_start_padding` | ``2`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`outline_size` | ``0`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`separator_outline_size` | ``0`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`v_separation` | ``4`` | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Font` | :ref:`font` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Font` | :ref:`font_separator` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`font_separator_size` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`int` | :ref:`font_size` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`checked` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`radio_checked` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`radio_unchecked` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`submenu` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`submenu_mirrored` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`Texture2D` | :ref:`unchecked` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`hover` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`labeled_separator_left` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`labeled_separator_right` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`panel` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`panel_disabled` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ +| :ref:`StyleBox` | :ref:`separator` | | ++-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ Signals ------- @@ -941,15 +951,27 @@ The tint of text outline of the menu item. ---- -.. _class_PopupMenu_theme_constant_hseparation: +.. _class_PopupMenu_theme_color_font_separator_outline_color: -- :ref:`int` **hseparation** +- :ref:`Color` **font_separator_outline_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +The tint of text outline of the labeled separator. + +---- + +.. _class_PopupMenu_theme_constant_h_separation: + +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | +-----------+-------+ -The horizontal space between the item's name and the shortcut text/submenu arrow. +The horizontal space between the item's elements. ---- @@ -985,9 +1007,21 @@ The size of the item text outline. ---- -.. _class_PopupMenu_theme_constant_vseparation: +.. _class_PopupMenu_theme_constant_separator_outline_size: -- :ref:`int` **vseparation** +- :ref:`int` **separator_outline_size** + ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ + +The size of the labeled separator text outline. + +---- + +.. _class_PopupMenu_theme_constant_v_separation: + +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``4`` | @@ -1005,6 +1039,22 @@ The vertical space between each menu item. ---- +.. _class_PopupMenu_theme_font_font_separator: + +- :ref:`Font` **font_separator** + +:ref:`Font` used for the labeled separator. + +---- + +.. _class_PopupMenu_theme_font_size_font_separator_size: + +- :ref:`int` **font_separator_size** + +Font size of the labeled separator. + +---- + .. _class_PopupMenu_theme_font_size_font_size: - :ref:`int` **font_size** diff --git a/classes/class_portablecompressedtexture2d.rst b/classes/class_portablecompressedtexture2d.rst new file mode 100644 index 000000000..f0339fb80 --- /dev/null +++ b/classes/class_portablecompressedtexture2d.rst @@ -0,0 +1,181 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the PortableCompressedTexture2D.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_PortableCompressedTexture2D: + +PortableCompressedTexture2D +=========================== + +**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Provides a compressed texture for disk and/or VRAM in a way that is portable. + +Description +----------- + +This class allows storing compressed textures as self contained (not imported) resources. + +For 2D usage (compressed on disk, uncompressed on VRAM), the lossy and lossless modes are recommended. For 3D usage (compressed on VRAM) it depends on the target platform. + +If you intend to only use desktop, S3TC or BPTC are recommended. For only mobile, ETC2 is recommended. + +For portable, self contained 3D textures that work on both desktop and mobile, Basis Universal is recommended (although it has a small quality cost and longer compression time as a tradeoff). + +This resource is intended to be created from code. + +Properties +---------- + ++-----------------------------------------------+--------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`PackedByteArray` | :ref:`_data` | ``PackedByteArray()`` | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`keep_compressed_buffer` | ``false`` | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`size_override` | ``Vector2(0, 0)`` | ++-----------------------------------------------+--------------------------------------------------------------------------------------------------+-----------------------+ + +Methods +------- + ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`create_from_image` **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** | ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CompressionMode` | :ref:`get_compression_mode` **(** **)** |const| | ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Format` | :ref:`get_format` **(** **)** |const| | ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_keeping_all_compressed_buffers` **(** **)** |static| | ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_keep_all_compressed_buffers` **(** :ref:`bool` keep **)** |static| | ++--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_PortableCompressedTexture2D_CompressionMode: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSLESS: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSY: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BASIS_UNIVERSAL: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_S3TC: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_ETC2: + +.. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BPTC: + +enum **CompressionMode**: + +- **COMPRESSION_MODE_LOSSLESS** = **0** + +- **COMPRESSION_MODE_LOSSY** = **1** + +- **COMPRESSION_MODE_BASIS_UNIVERSAL** = **2** + +- **COMPRESSION_MODE_S3TC** = **3** + +- **COMPRESSION_MODE_ETC2** = **4** + +- **COMPRESSION_MODE_BPTC** = **5** + +Property Descriptions +--------------------- + +.. _class_PortableCompressedTexture2D_property__data: + +- :ref:`PackedByteArray` **_data** + ++-----------+-----------------------+ +| *Default* | ``PackedByteArray()`` | ++-----------+-----------------------+ + +---- + +.. _class_PortableCompressedTexture2D_property_keep_compressed_buffer: + +- :ref:`bool` **keep_compressed_buffer** + ++-----------+-----------------------------------+ +| *Default* | ``false`` | ++-----------+-----------------------------------+ +| *Setter* | set_keep_compressed_buffer(value) | ++-----------+-----------------------------------+ +| *Getter* | is_keeping_compressed_buffer() | ++-----------+-----------------------------------+ + +When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved. + +This flag allows to keep the compressed data in memory if you intend it to persist after loading. + +---- + +.. _class_PortableCompressedTexture2D_property_size_override: + +- :ref:`Vector2` **size_override** + ++-----------+--------------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+--------------------------+ +| *Setter* | set_size_override(value) | ++-----------+--------------------------+ +| *Getter* | get_size_override() | ++-----------+--------------------------+ + +Allow overriding the texture size (for 2D only). + +Method Descriptions +------------------- + +.. _class_PortableCompressedTexture2D_method_create_from_image: + +- void **create_from_image** **(** :ref:`Image` image, :ref:`CompressionMode` compression_mode, :ref:`bool` normal_map=false, :ref:`float` lossy_quality=0.8 **)** + +Initializes the compressed texture from a base image. The compression mode must be provided. + +If this image will be used as a normal map, the "normal map" flag is recommended, to ensure optimum quality. + +If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WEBP compression quality. + +---- + +.. _class_PortableCompressedTexture2D_method_get_compression_mode: + +- :ref:`CompressionMode` **get_compression_mode** **(** **)** |const| + +Return the compression mode used (valid after initialized). + +---- + +.. _class_PortableCompressedTexture2D_method_get_format: + +- :ref:`Format` **get_format** **(** **)** |const| + +Return the image format used (valid after initialized). + +---- + +.. _class_PortableCompressedTexture2D_method_is_keeping_all_compressed_buffers: + +- :ref:`bool` **is_keeping_all_compressed_buffers** **(** **)** |static| + +Return whether the flag is overridden for all textures of this type. + +---- + +.. _class_PortableCompressedTexture2D_method_set_keep_all_compressed_buffers: + +- void **set_keep_all_compressed_buffers** **(** :ref:`bool` keep **)** |static| + +Overrides the flag globally for all textures of this type. This is used primarily by the editor. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_position2d.rst b/classes/class_position2d.rst index 28883ee75..40899a889 100644 --- a/classes/class_position2d.rst +++ b/classes/class_position2d.rst @@ -18,6 +18,30 @@ Description Generic 2D position hint for editing. It's just like a plain :ref:`Node2D`, but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. +Properties +---------- + ++---------------------------+---------------------------------------------------------------+----------+ +| :ref:`float` | :ref:`gizmo_extents` | ``10.0`` | ++---------------------------+---------------------------------------------------------------+----------+ + +Property Descriptions +--------------------- + +.. _class_Position2D_property_gizmo_extents: + +- :ref:`float` **gizmo_extents** + ++-----------+--------------------------+ +| *Default* | ``10.0`` | ++-----------+--------------------------+ +| *Setter* | set_gizmo_extents(value) | ++-----------+--------------------------+ +| *Getter* | get_gizmo_extents() | ++-----------+--------------------------+ + +Size of the gizmo cross that appears in the editor. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index 8f9337247..a86e37ecf 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -11,7 +11,7 @@ PrimitiveMesh **Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TubeTrailMesh` +**Inherited By:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`QuadMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TextMesh`, :ref:`TubeTrailMesh` Base class for all primitive meshes. Handles applying a :ref:`Material` to a primitive mesh. @@ -23,13 +23,13 @@ Base class for all primitive meshes. Handles applying a :ref:`Material` | :ref:`custom_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`bool` | :ref:`flip_faces` | ``false`` | -+---------------------------------+--------------------------------------------------------------+----------------------------+ -| :ref:`Material` | :ref:`material` | | -+---------------------------------+--------------------------------------------------------------+----------------------------+ ++---------------------------------+--------------------------------------------------------------+ +| :ref:`AABB` | :ref:`custom_aabb` | ++---------------------------------+--------------------------------------------------------------+ +| :ref:`bool` | :ref:`flip_faces` | ++---------------------------------+--------------------------------------------------------------+ +| :ref:`Material` | :ref:`material` | ++---------------------------------+--------------------------------------------------------------+ Methods ------- @@ -47,13 +47,11 @@ Property Descriptions - :ref:`AABB` **custom_aabb** -+-----------+----------------------------+ -| *Default* | ``AABB(0, 0, 0, 0, 0, 0)`` | -+-----------+----------------------------+ -| *Setter* | set_custom_aabb(value) | -+-----------+----------------------------+ -| *Getter* | get_custom_aabb() | -+-----------+----------------------------+ ++----------+------------------------+ +| *Setter* | set_custom_aabb(value) | ++----------+------------------------+ +| *Getter* | get_custom_aabb() | ++----------+------------------------+ Overrides the :ref:`AABB` with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. @@ -63,13 +61,11 @@ Overrides the :ref:`AABB` with one defined by user for use with frus - :ref:`bool` **flip_faces** -+-----------+-----------------------+ -| *Default* | ``false`` | -+-----------+-----------------------+ -| *Setter* | set_flip_faces(value) | -+-----------+-----------------------+ -| *Getter* | get_flip_faces() | -+-----------+-----------------------+ ++----------+-----------------------+ +| *Setter* | set_flip_faces(value) | ++----------+-----------------------+ +| *Getter* | get_flip_faces() | ++----------+-----------------------+ If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. diff --git a/classes/class_prismmesh.rst b/classes/class_prismmesh.rst index e77fd9fa0..e83e9363b 100644 --- a/classes/class_prismmesh.rst +++ b/classes/class_prismmesh.rst @@ -24,7 +24,7 @@ Properties +-------------------------------+--------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`left_to_right` | ``0.5`` | +-------------------------------+--------------------------------------------------------------------+----------------------+ -| :ref:`Vector3` | :ref:`size` | ``Vector3(2, 2, 2)`` | +| :ref:`Vector3` | :ref:`size` | ``Vector3(1, 1, 1)`` | +-------------------------------+--------------------------------------------------------------------+----------------------+ | :ref:`int` | :ref:`subdivide_depth` | ``0`` | +-------------------------------+--------------------------------------------------------------------+----------------------+ @@ -57,7 +57,7 @@ Displacement of the upper edge along the X axis. 0.0 positions edge straight abo - :ref:`Vector3` **size** +-----------+----------------------+ -| *Default* | ``Vector3(2, 2, 2)`` | +| *Default* | ``Vector3(1, 1, 1)`` | +-----------+----------------------+ | *Setter* | set_size(value) | +-----------+----------------------+ diff --git a/classes/class_proceduralskymaterial.rst b/classes/class_proceduralskymaterial.rst index d8c6810cb..ffafe0cfc 100644 --- a/classes/class_proceduralskymaterial.rst +++ b/classes/class_proceduralskymaterial.rst @@ -25,27 +25,33 @@ The ``ProceduralSkyMaterial`` supports up to 4 suns. Each sun takes its color, e Properties ---------- -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`ground_curve` | ``0.02`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`ground_energy` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`ground_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sky_curve` | ``0.15`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sky_energy` | ``1.0`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`sky_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`Color` | :ref:`sky_top_color` | ``Color(0.385, 0.454, 0.55, 1)`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sun_angle_max` | ``30.0`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ -| :ref:`float` | :ref:`sun_curve` | ``0.15`` | -+---------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Color` | :ref:`ground_bottom_color` | ``Color(0.2, 0.169, 0.133, 1)`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`ground_curve` | ``0.02`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`ground_energy` | ``1.0`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Color` | :ref:`ground_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Texture2D` | :ref:`sky_cover` | | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Color` | :ref:`sky_cover_modulate` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`sky_curve` | ``0.15`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`sky_energy` | ``1.0`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Color` | :ref:`sky_horizon_color` | ``Color(0.6463, 0.6558, 0.6708, 1)`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`Color` | :ref:`sky_top_color` | ``Color(0.385, 0.454, 0.55, 1)`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`sun_angle_max` | ``30.0`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`float` | :ref:`sun_curve` | ``0.15`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ +| :ref:`bool` | :ref:`use_debanding` | ``true`` | ++-----------------------------------+----------------------------------------------------------------------------------------+--------------------------------------+ Property Descriptions --------------------- @@ -114,6 +120,36 @@ Color of the ground at the horizon. Blends with :ref:`ground_bottom_color` **sky_cover** + ++----------+----------------------+ +| *Setter* | set_sky_cover(value) | ++----------+----------------------+ +| *Getter* | get_sky_cover() | ++----------+----------------------+ + +The sky cover texture to use. This texture must use an equirectangular projection (similar to :ref:`PanoramaSkyMaterial`). The texture's colors will be *added* to the existing sky color, and will be multiplied by :ref:`sky_energy` and :ref:`sky_cover_modulate`. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). + +---- + +.. _class_ProceduralSkyMaterial_property_sky_cover_modulate: + +- :ref:`Color` **sky_cover_modulate** + ++-----------+-------------------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-------------------------------+ +| *Setter* | set_sky_cover_modulate(value) | ++-----------+-------------------------------+ +| *Getter* | get_sky_cover_modulate() | ++-----------+-------------------------------+ + +The tint to apply to the :ref:`sky_cover` texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in :ref:`sky_cover`. + +---- + .. _class_ProceduralSkyMaterial_property_sky_curve: - :ref:`float` **sky_curve** @@ -208,6 +244,22 @@ Distance from center of sun where it fades out completely. How quickly the sun fades away between the edge of the sun disk and :ref:`sun_angle_max`. +---- + +.. _class_ProceduralSkyMaterial_property_use_debanding: + +- :ref:`bool` **use_debanding** + ++-----------+--------------------------+ +| *Default* | ``true`` | ++-----------+--------------------------+ +| *Setter* | set_use_debanding(value) | ++-----------+--------------------------+ +| *Getter* | get_use_debanding() | ++-----------+--------------------------+ + +If ``true``, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 36c851c5e..9ad3f60bc 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -21,13 +21,11 @@ General-purpose progress bar. Shows fill percentage from right to left. Properties ---------- -+---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`percent_visible` | ``true`` | -+---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``0`` (overrides :ref:`Control`) | -+---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | step | ``0.01`` (overrides :ref:`Range`) | -+---------------------------+--------------------------------------------------------------------+------------------------------------------------------------------------------+ ++-------------------------+--------------------------------------------------------------------+----------+ +| :ref:`int` | :ref:`fill_mode` | ``0`` | ++-------------------------+--------------------------------------------------------------------+----------+ +| :ref:`bool` | :ref:`percent_visible` | ``true`` | ++-------------------------+--------------------------------------------------------------------+----------+ Theme Properties ---------------- @@ -50,9 +48,48 @@ Theme Properties | :ref:`StyleBox` | :ref:`fg` | | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ +Enumerations +------------ + +.. _enum_ProgressBar_FillMode: + +.. _class_ProgressBar_constant_FILL_BEGIN_TO_END: + +.. _class_ProgressBar_constant_FILL_END_TO_BEGIN: + +.. _class_ProgressBar_constant_FILL_TOP_TO_BOTTOM: + +.. _class_ProgressBar_constant_FILL_BOTTOM_TO_TOP: + +enum **FillMode**: + +- **FILL_BEGIN_TO_END** = **0** --- The progress bar fills from begin to end horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from left to right, and if it returns ``true``, it fills from right to left. + +- **FILL_END_TO_BEGIN** = **1** --- The progress bar fills from end to begin horizontally, according to the language direction. If :ref:`Control.is_layout_rtl` returns ``false``, it fills from right to left, and if it returns ``true``, it fills from left to right. + +- **FILL_TOP_TO_BOTTOM** = **2** --- The progress fills from top to bottom. + +- **FILL_BOTTOM_TO_TOP** = **3** --- The progress fills from bottom to top. + Property Descriptions --------------------- +.. _class_ProgressBar_property_fill_mode: + +- :ref:`int` **fill_mode** + ++-----------+----------------------+ +| *Default* | ``0`` | ++-----------+----------------------+ +| *Setter* | set_fill_mode(value) | ++-----------+----------------------+ +| *Getter* | get_fill_mode() | ++-----------+----------------------+ + +The fill direction. See :ref:`FillMode` for possible values. + +---- + .. _class_ProgressBar_property_percent_visible: - :ref:`bool` **percent_visible** diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 9515f33c4..add7b3436 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -51,6 +51,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/description` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`application/config/features` | | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/icon` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/config/macos_native_icon` | ``""`` | @@ -121,75 +123,75 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/file_logging/max_log_files` | ``5`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/assert_always_false` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_false` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/assert_always_true` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/assert_always_true` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/constant_used_as_function` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/constant_used_as_function` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/deprecated_keyword` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/deprecated_keyword` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/empty_file` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/empty_file` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/enable` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/exclude_addons` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/function_used_as_property` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/function_used_as_property` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/incompatible_ternary` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/incompatible_ternary` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/int_assigned_to_enum` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/int_assigned_to_enum` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/integer_division` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/integer_division` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/narrowing_conversion` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/narrowing_conversion` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/property_used_as_function` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/property_used_as_function` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/redundant_await` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/redundant_await` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/return_value_discarded` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/return_value_discarded` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/shadowed_global_identifier` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_global_identifier` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/shadowed_variable` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/shadowed_variable_base_class` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/shadowed_variable_base_class` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/standalone_expression` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/standalone_expression` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/standalone_ternary` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/standalone_ternary` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/gdscript/warnings/treat_warnings_as_errors` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unassigned_variable` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unassigned_variable_op_assign` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unassigned_variable_op_assign` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unreachable_code` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_code` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unreachable_pattern` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unreachable_pattern` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unsafe_call_argument` | ``false`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_call_argument` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unsafe_cast` | ``false`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_cast` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unsafe_method_access` | ``false`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_method_access` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unsafe_property_access` | ``false`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unsafe_property_access` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unused_local_constant` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unused_local_constant` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unused_parameter` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unused_parameter` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unused_private_class_variable` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unused_private_class_variable` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unused_signal` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unused_signal` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/unused_variable` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/unused_variable` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`debug/gdscript/warnings/void_assignment` | ``true`` | +| :ref:`int` | :ref:`debug/gdscript/warnings/void_assignment` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`debug/settings/crash_handler/message` | ``"Please include this when reporting the bug on https://github.com/godotengine/godot/issues"`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ @@ -261,6 +263,10 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`editor/script/templates_search_path` | ``"res://script_templates"`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`filesystem/import/blender/enabled` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`filesystem/import/fbx/enabled` | ``true`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/common/default_scroll_deadzone` | ``0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui/common/swap_cancel_ok` | | @@ -273,8 +279,12 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gui/theme/default_font_antialiased` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`gui/theme/default_font_generate_mipmaps` | ``false`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/theme/default_font_hinting` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`gui/theme/default_font_multichannel_signed_distance_field` | ``false`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gui/theme/default_font_subpixel_positioning` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`gui/theme/default_theme_scale` | ``1.0`` | @@ -441,6 +451,10 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`internationalization/locale/test` | ``""`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`internationalization/locale/translation_remaps` | | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`internationalization/locale/translations` | | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`internationalization/pseudolocalization/double_vowels` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`internationalization/pseudolocalization/expansion_ratio` | ``0.0`` | @@ -907,18 +921,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`physics/common/physics_ticks_per_second` | ``60`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/opengl/batching_send_null` | ``0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/opengl/batching_stream` | ``0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/opengl/legacy_orphan_buffers` | ``0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/opengl/legacy_stream` | ``0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/2d/options/ninepatch_mode` | ``1`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/2d/options/use_software_skinning` | ``true`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/scale` | ``1`` | @@ -935,44 +937,22 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_debanding` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`rendering/anti_aliasing/quality/use_taa` | ``false`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/amount` | ``0.25`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/enabled` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/anti_aliasing/screen_space_roughness_limiter/limit` | ``0.18`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/debug/diagnose_frame` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/debug/flash_batching` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/batching/lights/max_join_items` | ``32`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/batching/lights/scissor_area_threshold` | ``1.0`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/options/single_rect_fallback` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/options/use_batching` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/options/use_batching_in_editor` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/batching/parameters/batch_buffer_size` | ``16384`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`rendering/batching/parameters/colored_vertex_format_threshold` | ``0.25`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/batching/parameters/item_reordering_lookahead` | ``4`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/batching/parameters/max_join_item_commands` | ``16`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/batching/precision/uv_contract` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rendering/batching/precision/uv_contract_amount` | ``100`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_quality` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/camera/depth_of_field/depth_of_field_bokeh_shape` | ``1`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/camera/depth_of_field/depth_of_field_use_jitter` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`rendering/driver/depth_prepass/disable_for_vendors` | ``"PowerVR,Mali,Adreno,Apple"`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/driver/depth_prepass/enable` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/driver/driver_name` | ``"vulkan"`` | @@ -999,9 +979,7 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/environment/ssao/fadeout_to` | ``300.0`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/environment/ssao/half_size` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/environment/ssao/half_size.mobile` | ``true`` | +| :ref:`bool` | :ref:`rendering/environment/ssao/half_size` | ``true`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/environment/ssao/quality` | ``2`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ @@ -1029,10 +1007,6 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_size` | ``64`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/gles2/compatibility/disable_half_float` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`rendering/gles2/compatibility/enable_high_float.Android` | ``false`` | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`rendering/global_illumination/gi/use_half_resolution` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/global_illumination/sdfgi/frames_to_converge` | ``5`` | @@ -1073,6 +1047,12 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/limits/global_shader_variables/buffer_size` | ``65536`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rendering/limits/opengl/max_lights_per_object` | ``8`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_elements` | ``65536`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rendering/limits/opengl/max_renderable_lights` | ``32`` | ++---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/limits/spatial_indexer/threaded_cull_minimum_instances` | ``1000`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/limits/spatial_indexer/update_iterations_per_frame` | ``10`` | @@ -1191,7 +1171,7 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/vulkan/staging_buffer/texture_upload_region_size_px` | ``64`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://default_action_map.tres"`` | +| :ref:`String` | :ref:`xr/openxr/default_action_map` | ``"res://openxr_action_map.tres"`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/enabled` | ``false`` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ @@ -1330,6 +1310,14 @@ The project's description, displayed as a tooltip in the Project Manager when ho ---- +.. _class_ProjectSettings_property_application/config/features: + +- :ref:`PackedStringArray` **application/config/features** + +List of internal features associated with the project, like ``Double Precision`` or ``C#``. Not to be confused with feature tags. + +---- + .. _class_ProjectSettings_property_application/config/icon: - :ref:`String` **application/config/icon** @@ -1774,57 +1762,61 @@ Specifies the maximum amount of log files allowed (used for rotation). .. _class_ProjectSettings_property_debug/gdscript/warnings/assert_always_false: -- :ref:`bool` **debug/gdscript/warnings/assert_always_false** +- :ref:`int` **debug/gdscript/warnings/assert_always_false** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when an ``assert`` call always returns false. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/assert_always_true: -- :ref:`bool` **debug/gdscript/warnings/assert_always_true** +- :ref:`int` **debug/gdscript/warnings/assert_always_true** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when an ``assert`` call always returns true. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function: -- :ref:`bool` **debug/gdscript/warnings/constant_used_as_function** +- :ref:`int` **debug/gdscript/warnings/constant_used_as_function** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when a constant is used as a function. +If ``enabled``, prints a warning or an error when a constant is used as a function. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/deprecated_keyword: -- :ref:`bool` **debug/gdscript/warnings/deprecated_keyword** +- :ref:`int` **debug/gdscript/warnings/deprecated_keyword** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when deprecated keywords are used. +If ``enabled``, prints a warning or an error when deprecated keywords are used. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/empty_file: -- :ref:`bool` **debug/gdscript/warnings/empty_file** +- :ref:`int` **debug/gdscript/warnings/empty_file** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when an empty file is parsed. +If ``enabled``, prints a warning or an error when an empty file is parsed. ---- @@ -1854,151 +1846,155 @@ If ``true``, scripts in the ``res://addons`` folder will not generate warnings. .. _class_ProjectSettings_property_debug/gdscript/warnings/function_used_as_property: -- :ref:`bool` **debug/gdscript/warnings/function_used_as_property** +- :ref:`int` **debug/gdscript/warnings/function_used_as_property** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when using a function as if it was a property. +If ``enabled``, prints a warning or an error when using a function as if it was a property. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/incompatible_ternary: -- :ref:`bool` **debug/gdscript/warnings/incompatible_ternary** +- :ref:`int` **debug/gdscript/warnings/incompatible_ternary** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when a ternary operator may emit values with incompatible types. +If ``enabled``, prints a warning or an error when a ternary operator may emit values with incompatible types. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/int_assigned_to_enum: -- :ref:`bool` **debug/gdscript/warnings/int_assigned_to_enum** +- :ref:`int` **debug/gdscript/warnings/int_assigned_to_enum** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when trying to assign an integer to a variable that expects an enum value. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/integer_division: -- :ref:`bool` **debug/gdscript/warnings/integer_division** +- :ref:`int` **debug/gdscript/warnings/integer_division** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when dividing an integer by another integer (the decimal part will be discarded). +If ``enabled``, prints a warning or an error when dividing an integer by another integer (the decimal part will be discarded). ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/narrowing_conversion: -- :ref:`bool` **debug/gdscript/warnings/narrowing_conversion** +- :ref:`int` **debug/gdscript/warnings/narrowing_conversion** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). +If ``enabled``, prints a warning or an error when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/property_used_as_function: -- :ref:`bool` **debug/gdscript/warnings/property_used_as_function** +- :ref:`int` **debug/gdscript/warnings/property_used_as_function** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when using a property as if it was a function. +If ``enabled``, prints a warning or an error when using a property as if it was a function. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/redundant_await: -- :ref:`bool` **debug/gdscript/warnings/redundant_await** +- :ref:`int` **debug/gdscript/warnings/redundant_await** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when a function that is not a coroutine is called with await. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/return_value_discarded: -- :ref:`bool` **debug/gdscript/warnings/return_value_discarded** +- :ref:`int` **debug/gdscript/warnings/return_value_discarded** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the :ref:`Error` enum. +If ``enabled``, prints a warning or an error when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the :ref:`Error` enum. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_global_identifier: -- :ref:`bool` **debug/gdscript/warnings/shadowed_global_identifier** +- :ref:`int` **debug/gdscript/warnings/shadowed_global_identifier** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it. +If ``enabled``, prints a warning or an error when defining a local or subclass member variable, signal, or enum that would have the same name as a built-in function or global class name, which possibly shadow it. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable: -- :ref:`bool` **debug/gdscript/warnings/shadowed_variable** +- :ref:`int` **debug/gdscript/warnings/shadowed_variable** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). +If ``enabled``, prints a warning or an error when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable_base_class: -- :ref:`bool` **debug/gdscript/warnings/shadowed_variable_base_class** +- :ref:`int` **debug/gdscript/warnings/shadowed_variable_base_class** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_expression: -- :ref:`bool` **debug/gdscript/warnings/standalone_expression** +- :ref:`int` **debug/gdscript/warnings/standalone_expression** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when calling an expression that has no effect on the surrounding code, such as writing ``2 + 2`` as a statement. +If ``enabled``, prints a warning or an error when calling an expression that has no effect on the surrounding code, such as writing ``2 + 2`` as a statement. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/standalone_ternary: -- :ref:`bool` **debug/gdscript/warnings/standalone_ternary** +- :ref:`int` **debug/gdscript/warnings/standalone_ternary** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing ``42 if active else 0`` as a statement. +If ``enabled``, prints a warning or an error when calling a ternary expression that has no effect on the surrounding code, such as writing ``42 if active else 0`` as a statement. ---- @@ -2016,161 +2012,169 @@ If ``true``, all warnings will be reported as if they were errors. .. _class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable: -- :ref:`bool` **debug/gdscript/warnings/unassigned_variable** +- :ref:`int` **debug/gdscript/warnings/unassigned_variable** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when using a variable that wasn't previously assigned. +If ``enabled``, prints a warning or an error when using a variable that wasn't previously assigned. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable_op_assign: -- :ref:`bool` **debug/gdscript/warnings/unassigned_variable_op_assign** +- :ref:`int` **debug/gdscript/warnings/unassigned_variable_op_assign** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when assigning a variable using an assignment operator like ``+=`` if the variable wasn't previously assigned. +If ``enabled``, prints a warning or an error when assigning a variable using an assignment operator like ``+=`` if the variable wasn't previously assigned. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unreachable_code: -- :ref:`bool` **debug/gdscript/warnings/unreachable_code** +- :ref:`int` **debug/gdscript/warnings/unreachable_code** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when unreachable code is detected (such as after a ``return`` statement that will always be executed). +If ``enabled``, prints a warning or an error when unreachable code is detected (such as after a ``return`` statement that will always be executed). ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unreachable_pattern: -- :ref:`bool` **debug/gdscript/warnings/unreachable_pattern** +- :ref:`int` **debug/gdscript/warnings/unreachable_pattern** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when an unreachable ``match`` pattern is detected. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_call_argument: -- :ref:`bool` **debug/gdscript/warnings/unsafe_call_argument** +- :ref:`int` **debug/gdscript/warnings/unsafe_call_argument** -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ -If ``true``, enables warnings when using an expression whose type may not be compatible with the function parameter expected. +If ``enabled``, prints a warning or an error when using an expression whose type may not be compatible with the function parameter expected. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_cast: -- :ref:`bool` **debug/gdscript/warnings/unsafe_cast** +- :ref:`int` **debug/gdscript/warnings/unsafe_cast** -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ -If ``true``, enables warnings when performing an unsafe cast. +If ``enabled``, prints a warning or an error when performing an unsafe cast. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_method_access: -- :ref:`bool` **debug/gdscript/warnings/unsafe_method_access** +- :ref:`int` **debug/gdscript/warnings/unsafe_method_access** -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ -If ``true``, enables warnings when calling a method whose presence is not guaranteed at compile-time in the class. +If ``enabled``, prints a warning or an error when calling a method whose presence is not guaranteed at compile-time in the class. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unsafe_property_access: -- :ref:`bool` **debug/gdscript/warnings/unsafe_property_access** +- :ref:`int` **debug/gdscript/warnings/unsafe_property_access** -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ ++-----------+-------+ +| *Default* | ``0`` | ++-----------+-------+ -If ``true``, enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class. +If ``enabled``, prints a warning or an error when accessing a property whose presence is not guaranteed at compile-time in the class. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant: -- :ref:`bool` **debug/gdscript/warnings/unused_local_constant** +- :ref:`int` **debug/gdscript/warnings/unused_local_constant** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when a local constant is never used. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_parameter: -- :ref:`bool` **debug/gdscript/warnings/unused_parameter** +- :ref:`int` **debug/gdscript/warnings/unused_parameter** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when a function parameter is never used. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_private_class_variable: -- :ref:`bool` **debug/gdscript/warnings/unused_private_class_variable** +- :ref:`int` **debug/gdscript/warnings/unused_private_class_variable** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ + +If ``enabled``, prints a warning or an error when a class variable is never used. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_signal: -- :ref:`bool` **debug/gdscript/warnings/unused_signal** +- :ref:`int` **debug/gdscript/warnings/unused_signal** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when a signal is unused. +If ``enabled``, prints a warning or an error when a signal is unused. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/unused_variable: -- :ref:`bool` **debug/gdscript/warnings/unused_variable** +- :ref:`int` **debug/gdscript/warnings/unused_variable** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when a local variable is unused. +If ``enabled``, prints a warning or an error when a local variable is unused. ---- .. _class_ProjectSettings_property_debug/gdscript/warnings/void_assignment: -- :ref:`bool` **debug/gdscript/warnings/void_assignment** +- :ref:`int` **debug/gdscript/warnings/void_assignment** -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ ++-----------+-------+ +| *Default* | ``1`` | ++-----------+-------+ -If ``true``, enables warnings when assigning the result of a function that returns ``void`` to a variable. +If ``enabled``, prints a warning or an error when assigning the result of a function that returns ``void`` to a variable. ---- @@ -2488,7 +2492,7 @@ Regardless of the platform, enabling fullscreen will change the window size to m Allows the window to be resizable by default. -\ **Note:** This setting is ignored on iOS and Android. +\ **Note:** This setting is ignored on iOS. ---- @@ -2628,6 +2632,34 @@ Search path for project-specific script templates. Godot will search for script ---- +.. _class_ProjectSettings_property_filesystem/import/blender/enabled: + +- :ref:`bool` **filesystem/import/blender/enabled** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If ``true``, Blender 3D scene files with the ``.blend`` extension will be imported by converting them to glTF 2.0. + +This requires configuring a path to a Blender executable in the editor settings at ``filesystem/import/blender/blender3_path``. Blender 3.0 or later is required. + +---- + +.. _class_ProjectSettings_property_filesystem/import/fbx/enabled: + +- :ref:`bool` **filesystem/import/fbx/enabled** + ++-----------+----------+ +| *Default* | ``true`` | ++-----------+----------+ + +If ``true``, Autodesk FBX 3D scene files with the ``.fbx`` extension will be imported by converting them to glTF 2.0. + +This requires configuring a path to a FBX2glTF executable in the editor settings at ``filesystem/import/fbx/fbx2gltf_path``. + +---- + .. _class_ProjectSettings_property_gui/common/default_scroll_deadzone: - :ref:`int` **gui/common/default_scroll_deadzone** @@ -2694,6 +2726,22 @@ If set to ``true``, default font uses 8-bit anitialiased glyph rendering. See : ---- +.. _class_ProjectSettings_property_gui/theme/default_font_generate_mipmaps: + +- :ref:`bool` **gui/theme/default_font_generate_mipmaps** + ++-----------+-----------+ +| *Default* | ``false`` | ++-----------+-----------+ + +If set to ``true``, the default font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control` is scaled down, or when a :ref:`Label3D` is viewed from a long distance (if :ref:`Label3D.texture_filter` is set to a mode that displays mipmaps). + +Enabling :ref:`gui/theme/default_font_generate_mipmaps` increases font generation time and memory usage. Only enable this setting if you actually need it. + +\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. + +---- + .. _class_ProjectSettings_property_gui/theme/default_font_hinting: - :ref:`int` **gui/theme/default_font_hinting** @@ -2706,6 +2754,22 @@ Default font hinting mode. See :ref:`FontData.hinting` **gui/theme/default_font_multichannel_signed_distance_field** + ++-----------+-----------+ +| *Default* | ``false`` | ++-----------+-----------+ + +If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). + +MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_mipmaps` to further improve font rendering quality when scaled down. + +\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. + +---- + .. _class_ProjectSettings_property_gui/theme/default_font_subpixel_positioning: - :ref:`int` **gui/theme/default_font_subpixel_positioning** @@ -3344,6 +3408,22 @@ If non-empty, this locale will be used when running the project from the editor. ---- +.. _class_ProjectSettings_property_internationalization/locale/translation_remaps: + +- :ref:`PackedStringArray` **internationalization/locale/translation_remaps** + +Locale-dependent resource remaps. Edit them in the "Localization" tab of Project Settings editor. + +---- + +.. _class_ProjectSettings_property_internationalization/locale/translations: + +- :ref:`PackedStringArray` **internationalization/locale/translations** + +List of translation files available in the project. Edit them in the "Localization" tab of Project Settings editor. + +---- + .. _class_ProjectSettings_property_internationalization/pseudolocalization/double_vowels: - :ref:`bool` **internationalization/pseudolocalization/double_vowels** @@ -6230,66 +6310,6 @@ The number of fixed iterations per second. This controls how often physics simul ---- -.. _class_ProjectSettings_property_rendering/2d/opengl/batching_send_null: - -- :ref:`int` **rendering/2d/opengl/batching_send_null** - -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/2d/opengl/batching_stream: - -- :ref:`int` **rendering/2d/opengl/batching_stream** - -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/2d/opengl/legacy_orphan_buffers: - -- :ref:`int` **rendering/2d/opengl/legacy_orphan_buffers** - -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/2d/opengl/legacy_stream: - -- :ref:`int` **rendering/2d/opengl/legacy_stream** - -+-----------+-------+ -| *Default* | ``0`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/2d/options/ninepatch_mode: - -- :ref:`int` **rendering/2d/options/ninepatch_mode** - -+-----------+-------+ -| *Default* | ``1`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/2d/options/use_software_skinning: - -- :ref:`bool` **rendering/2d/options/use_software_skinning** - -+-----------+----------+ -| *Default* | ``true`` | -+-----------+----------+ - ----- - .. _class_ProjectSettings_property_rendering/2d/sdf/oversize: - :ref:`int` **rendering/2d/sdf/oversize** @@ -6376,6 +6396,20 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi ---- +.. _class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa: + +- :ref:`bool` **rendering/anti_aliasing/quality/use_taa** + ++-----------+-----------+ +| *Default* | ``false`` | ++-----------+-----------+ + +Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. + +\ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. + +---- + .. _class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/amount: - :ref:`float` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** @@ -6406,136 +6440,6 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi ---- -.. _class_ProjectSettings_property_rendering/batching/debug/diagnose_frame: - -- :ref:`bool` **rendering/batching/debug/diagnose_frame** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/debug/flash_batching: - -- :ref:`bool` **rendering/batching/debug/flash_batching** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/lights/max_join_items: - -- :ref:`int` **rendering/batching/lights/max_join_items** - -+-----------+--------+ -| *Default* | ``32`` | -+-----------+--------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/lights/scissor_area_threshold: - -- :ref:`float` **rendering/batching/lights/scissor_area_threshold** - -+-----------+---------+ -| *Default* | ``1.0`` | -+-----------+---------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/options/single_rect_fallback: - -- :ref:`bool` **rendering/batching/options/single_rect_fallback** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/options/use_batching: - -- :ref:`bool` **rendering/batching/options/use_batching** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/options/use_batching_in_editor: - -- :ref:`bool` **rendering/batching/options/use_batching_in_editor** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/parameters/batch_buffer_size: - -- :ref:`int` **rendering/batching/parameters/batch_buffer_size** - -+-----------+-----------+ -| *Default* | ``16384`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/parameters/colored_vertex_format_threshold: - -- :ref:`float` **rendering/batching/parameters/colored_vertex_format_threshold** - -+-----------+----------+ -| *Default* | ``0.25`` | -+-----------+----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/parameters/item_reordering_lookahead: - -- :ref:`int` **rendering/batching/parameters/item_reordering_lookahead** - -+-----------+-------+ -| *Default* | ``4`` | -+-----------+-------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/parameters/max_join_item_commands: - -- :ref:`int` **rendering/batching/parameters/max_join_item_commands** - -+-----------+--------+ -| *Default* | ``16`` | -+-----------+--------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/precision/uv_contract: - -- :ref:`bool` **rendering/batching/precision/uv_contract** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/batching/precision/uv_contract_amount: - -- :ref:`int` **rendering/batching/precision/uv_contract_amount** - -+-----------+---------+ -| *Default* | ``100`` | -+-----------+---------+ - ----- - .. _class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_bokeh_quality: - :ref:`int` **rendering/camera/depth_of_field/depth_of_field_bokeh_quality** @@ -6572,6 +6476,18 @@ If ``true``, jitters DOF samples to make effect slightly blurrier and hide lines ---- +.. _class_ProjectSettings_property_rendering/driver/depth_prepass/disable_for_vendors: + +- :ref:`String` **rendering/driver/depth_prepass/disable_for_vendors** + ++-----------+---------------------------------+ +| *Default* | ``"PowerVR,Mali,Adreno,Apple"`` | ++-----------+---------------------------------+ + +Disables :ref:`rendering/driver/depth_prepass/enable` conditionally for certain vendors. By default, disables the depth prepass for mobile devices as mobile devices do not benefit from the depth prepass due to their unique architecture. + +---- + .. _class_ProjectSettings_property_rendering/driver/depth_prepass/enable: - :ref:`bool` **rendering/driver/depth_prepass/enable** @@ -6582,7 +6498,7 @@ If ``true``, jitters DOF samples to make effect slightly blurrier and hide lines If ``true``, performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed. -\ **Note:** Only supported when using the Vulkan Clustered backend (not Vulkan Mobile or OpenGL). When using Vulkan Mobile or OpenGL, there is no depth prepass performed. +\ **Note:** Only supported when using the Vulkan Clustered backend or the OpenGL backend. When using Vulkan Mobile there is no depth prepass performed. ---- @@ -6596,7 +6512,7 @@ If ``true``, performs a previous depth pass before rendering 3D materials. This The video driver to use. -\ **Note:** OpenGL support is currently incomplete. Only basic 2D rendering is supported, and single-window mode is required for correct operation. +\ **Note:** OpenGL support is currently incomplete. Only basic rendering is supported. \ **Note:** The backend in use can be overridden at runtime via the ``--rendering-driver`` command line argument. @@ -6742,23 +6658,11 @@ Distance at which the screen-space ambient occlusion is fully faded out. Use thi - :ref:`bool` **rendering/environment/ssao/half_size** -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - -If ``true``, 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. - ----- - -.. _class_ProjectSettings_property_rendering/environment/ssao/half_size.mobile: - -- :ref:`bool` **rendering/environment/ssao/half_size.mobile** - +-----------+----------+ | *Default* | ``true`` | +-----------+----------+ -Lower-end override for :ref:`rendering/environment/ssao/half_size` on mobile devices, due to performance concerns. +If ``true``, 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. If ``false``, screen-space ambient occlusion will be rendered at full size. ---- @@ -6918,26 +6822,6 @@ Base size used to determine size of froxel buffer in the camera X-axis and Y-axi ---- -.. _class_ProjectSettings_property_rendering/gles2/compatibility/disable_half_float: - -- :ref:`bool` **rendering/gles2/compatibility/disable_half_float** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - -.. _class_ProjectSettings_property_rendering/gles2/compatibility/enable_high_float.Android: - -- :ref:`bool` **rendering/gles2/compatibility/enable_high_float.Android** - -+-----------+-----------+ -| *Default* | ``false`` | -+-----------+-----------+ - ----- - .. _class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution: - :ref:`bool` **rendering/global_illumination/gi/use_half_resolution** @@ -7142,6 +7026,42 @@ If ``true``, renders :ref:`VoxelGI` and SDFGI (:ref:`Environment. ---- +.. _class_ProjectSettings_property_rendering/limits/opengl/max_lights_per_object: + +- :ref:`int` **rendering/limits/opengl/max_lights_per_object** + ++-----------+-------+ +| *Default* | ``8`` | ++-----------+-------+ + +Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and :ref:`rendering/limits/opengl/max_renderable_lights`. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. + +---- + +.. _class_ProjectSettings_property_rendering/limits/opengl/max_renderable_elements: + +- :ref:`int` **rendering/limits/opengl/max_renderable_elements** + ++-----------+-----------+ +| *Default* | ``65536`` | ++-----------+-----------+ + +Max amount of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + +---- + +.. _class_ProjectSettings_property_rendering/limits/opengl/max_renderable_lights: + +- :ref:`int` **rendering/limits/opengl/max_renderable_lights** + ++-----------+--------+ +| *Default* | ``32`` | ++-----------+--------+ + +Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. + +---- + .. _class_ProjectSettings_property_rendering/limits/spatial_indexer/threaded_cull_minimum_instances: - :ref:`int` **rendering/limits/spatial_indexer/threaded_cull_minimum_instances** @@ -7844,9 +7764,9 @@ If ``true``, the texture importer will import VRAM-compressed textures using the - :ref:`String` **xr/openxr/default_action_map** -+-----------+-------------------------------------+ -| *Default* | ``"res://default_action_map.tres"`` | -+-----------+-------------------------------------+ ++-----------+------------------------------------+ +| *Default* | ``"res://openxr_action_map.tres"`` | ++-----------+------------------------------------+ Action map configuration to load by default. @@ -7896,7 +7816,7 @@ Specify the default reference space. | *Default* | ``"1"`` | +-----------+---------+ -Specify the view configuration with which to configure OpenXR settting up either Mono or Stereo rendering. +Specify the view configuration with which to configure OpenXR setting up either Mono or Stereo rendering. ---- diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index f3cd11a5e..d50a144a5 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -69,6 +69,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`dot` **(** :ref:`Quaternion` with **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`exp` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_angle` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_axis` **(** **)** |const| | @@ -85,6 +87,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`length_squared` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Quaternion` | :ref:`log` **(** **)** |const| | ++-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Quaternion` | :ref:`normalized` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Quaternion` | :ref:`slerp` **(** :ref:`Quaternion` to, :ref:`float` weight **)** |const| | @@ -95,8 +99,6 @@ Methods Operators --------- -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Quaternion` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ @@ -116,8 +118,6 @@ Operators +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`Quaternion` | :ref:`operator /` **(** :ref:`int` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Quaternion` right **)** | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -261,6 +261,12 @@ Returns the dot product of two quaternions. ---- +.. _class_Quaternion_method_exp: + +- :ref:`Quaternion` **exp** **(** **)** |const| + +---- + .. _class_Quaternion_method_get_angle: - :ref:`float` **get_angle** **(** **)** |const| @@ -321,6 +327,12 @@ Returns the length of the quaternion, squared. ---- +.. _class_Quaternion_method_log: + +- :ref:`Quaternion` **log** **(** **)** |const| + +---- + .. _class_Quaternion_method_normalized: - :ref:`Quaternion` **normalized** **(** **)** |const| @@ -350,10 +362,6 @@ Operator Descriptions .. _class_Quaternion_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Quaternion` right **)** Returns ``true`` if the quaternions are not equal. @@ -420,10 +428,6 @@ Divides each component of the ``Quaternion`` by the given value. This operation .. _class_Quaternion_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Quaternion` right **)** Returns ``true`` if the quaternions are exactly equal. diff --git a/classes/class_range.rst b/classes/class_range.rst index b1596a98a..ef654926b 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -18,43 +18,43 @@ Abstract base class for range-based controls. Description ----------- -Range is a base class for :ref:`Control` nodes that change a floating-point *value* between a *minimum* and a *maximum*, using *step* and *page*, for example a :ref:`ScrollBar`. +Range is a base class for :ref:`Control` nodes that change a floating-point :ref:`value` between a :ref:`min_value` and :ref:`max_value`, using a configured :ref:`step` and :ref:`page` size. See e.g. :ref:`ScrollBar` and :ref:`Slider` for examples of higher level nodes using Range. Properties ---------- -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`allow_greater` | ``false`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`allow_lesser` | ``false`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`exp_edit` | ``false`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`max_value` | ``100.0`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`min_value` | ``0.0`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`page` | ``0.0`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`ratio` | | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`rounded` | ``false`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`step` | ``1.0`` | -+---------------------------+----------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`value` | ``0.0`` | -+---------------------------+----------------------------------------------------------+-----------+ ++---------------------------+----------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_greater` | ++---------------------------+----------------------------------------------------------+ +| :ref:`bool` | :ref:`allow_lesser` | ++---------------------------+----------------------------------------------------------+ +| :ref:`bool` | :ref:`exp_edit` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`max_value` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`min_value` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`page` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`ratio` | ++---------------------------+----------------------------------------------------------+ +| :ref:`bool` | :ref:`rounded` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`step` | ++---------------------------+----------------------------------------------------------+ +| :ref:`float` | :ref:`value` | ++---------------------------+----------------------------------------------------------+ Methods ------- -+------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`_value_changed` **(** :ref:`float` **)** |virtual| | -+------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`share` **(** :ref:`Node` with **)** | -+------+-----------------------------------------------------------------------------------------------------------+ -| void | :ref:`unshare` **(** **)** | -+------+-----------------------------------------------------------------------------------------------------------+ ++------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_value_changed` **(** :ref:`float` new_value **)** |virtual| | ++------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`share` **(** :ref:`Node` with **)** | ++------+--------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`unshare` **(** **)** | ++------+--------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -71,7 +71,9 @@ Emitted when :ref:`min_value`, :ref:`max_value` value **)** -Emitted when :ref:`value` changes. +Emitted when :ref:`value` changes. When used on a :ref:`Slider`, this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to :ref:`value_changed`, consider using a *debouncing* :ref:`Timer` to call the function less often. + +\ **Note:** Unlike signals such as :ref:`LineEdit.text_changed`, :ref:`value_changed` is also emitted when ``value`` is set directly via code. Property Descriptions --------------------- @@ -80,13 +82,11 @@ Property Descriptions - :ref:`bool` **allow_greater** -+-----------+--------------------------+ -| *Default* | ``false`` | -+-----------+--------------------------+ -| *Setter* | set_allow_greater(value) | -+-----------+--------------------------+ -| *Getter* | is_greater_allowed() | -+-----------+--------------------------+ ++----------+--------------------------+ +| *Setter* | set_allow_greater(value) | ++----------+--------------------------+ +| *Getter* | is_greater_allowed() | ++----------+--------------------------+ If ``true``, :ref:`value` may be greater than :ref:`max_value`. @@ -96,13 +96,11 @@ If ``true``, :ref:`value` may be greater than :ref:` - :ref:`bool` **allow_lesser** -+-----------+-------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------+ -| *Setter* | set_allow_lesser(value) | -+-----------+-------------------------+ -| *Getter* | is_lesser_allowed() | -+-----------+-------------------------+ ++----------+-------------------------+ +| *Setter* | set_allow_lesser(value) | ++----------+-------------------------+ +| *Getter* | is_lesser_allowed() | ++----------+-------------------------+ If ``true``, :ref:`value` may be less than :ref:`min_value`. @@ -112,13 +110,11 @@ If ``true``, :ref:`value` may be less than :ref:`min - :ref:`bool` **exp_edit** -+-----------+----------------------+ -| *Default* | ``false`` | -+-----------+----------------------+ -| *Setter* | set_exp_ratio(value) | -+-----------+----------------------+ -| *Getter* | is_ratio_exp() | -+-----------+----------------------+ ++----------+----------------------+ +| *Setter* | set_exp_ratio(value) | ++----------+----------------------+ +| *Getter* | is_ratio_exp() | ++----------+----------------------+ If ``true``, and ``min_value`` is greater than 0, ``value`` will be represented exponentially rather than linearly. @@ -128,13 +124,11 @@ If ``true``, and ``min_value`` is greater than 0, ``value`` will be represented - :ref:`float` **max_value** -+-----------+----------------+ -| *Default* | ``100.0`` | -+-----------+----------------+ -| *Setter* | set_max(value) | -+-----------+----------------+ -| *Getter* | get_max() | -+-----------+----------------+ ++----------+----------------+ +| *Setter* | set_max(value) | ++----------+----------------+ +| *Getter* | get_max() | ++----------+----------------+ Maximum value. Range is clamped if ``value`` is greater than ``max_value``. @@ -144,13 +138,11 @@ Maximum value. Range is clamped if ``value`` is greater than ``max_value``. - :ref:`float` **min_value** -+-----------+----------------+ -| *Default* | ``0.0`` | -+-----------+----------------+ -| *Setter* | set_min(value) | -+-----------+----------------+ -| *Getter* | get_min() | -+-----------+----------------+ ++----------+----------------+ +| *Setter* | set_min(value) | ++----------+----------------+ +| *Getter* | get_min() | ++----------+----------------+ Minimum value. Range is clamped if ``value`` is less than ``min_value``. @@ -160,13 +152,11 @@ Minimum value. Range is clamped if ``value`` is less than ``min_value``. - :ref:`float` **page** -+-----------+-----------------+ -| *Default* | ``0.0`` | -+-----------+-----------------+ -| *Setter* | set_page(value) | -+-----------+-----------------+ -| *Getter* | get_page() | -+-----------+-----------------+ ++----------+-----------------+ +| *Setter* | set_page(value) | ++----------+-----------------+ +| *Getter* | get_page() | ++----------+-----------------+ Page size. Used mainly for :ref:`ScrollBar`. ScrollBar's length is its size multiplied by ``page`` over the difference between ``min_value`` and ``max_value``. @@ -190,13 +180,11 @@ The value mapped between 0 and 1. - :ref:`bool` **rounded** -+-----------+-------------------------------+ -| *Default* | ``false`` | -+-----------+-------------------------------+ -| *Setter* | set_use_rounded_values(value) | -+-----------+-------------------------------+ -| *Getter* | is_using_rounded_values() | -+-----------+-------------------------------+ ++----------+-------------------------------+ +| *Setter* | set_use_rounded_values(value) | ++----------+-------------------------------+ +| *Getter* | is_using_rounded_values() | ++----------+-------------------------------+ If ``true``, ``value`` will always be rounded to the nearest integer. @@ -206,13 +194,11 @@ If ``true``, ``value`` will always be rounded to the nearest integer. - :ref:`float` **step** -+-----------+-----------------+ -| *Default* | ``1.0`` | -+-----------+-----------------+ -| *Setter* | set_step(value) | -+-----------+-----------------+ -| *Getter* | get_step() | -+-----------+-----------------+ ++----------+-----------------+ +| *Setter* | set_step(value) | ++----------+-----------------+ +| *Getter* | get_step() | ++----------+-----------------+ If greater than 0, ``value`` will always be rounded to a multiple of ``step``. If ``rounded`` is also ``true``, ``value`` will first be rounded to a multiple of ``step`` then rounded to the nearest integer. @@ -222,13 +208,11 @@ If greater than 0, ``value`` will always be rounded to a multiple of ``step``. I - :ref:`float` **value** -+-----------+------------------+ -| *Default* | ``0.0`` | -+-----------+------------------+ -| *Setter* | set_value(value) | -+-----------+------------------+ -| *Getter* | get_value() | -+-----------+------------------+ ++----------+------------------+ +| *Setter* | set_value(value) | ++----------+------------------+ +| *Getter* | get_value() | ++----------+------------------+ Range's current value. @@ -237,7 +221,9 @@ Method Descriptions .. _class_Range_method__value_changed: -- void **_value_changed** **(** :ref:`float` **)** |virtual| +- void **_value_changed** **(** :ref:`float` new_value **)** |virtual| + +Called when the ``Range``'s value is changed (following the same conditions as :ref:`value_changed`). ---- @@ -245,7 +231,7 @@ Method Descriptions - void **share** **(** :ref:`Node` with **)** -Binds two ranges together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. +Binds two ``Range``\ s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. ---- @@ -253,7 +239,7 @@ Binds two ranges together along with any ranges previously grouped with either o - void **unshare** **(** **)** -Stops range from sharing its member variables with any other. +Stops the ``Range`` from sharing its member variables with any other. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 4b4f368e1..8947c448f 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -93,15 +93,11 @@ Methods Operators --------- -+---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`operator *` **(** :ref:`Transform2D` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2` right **)** | +---------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -324,10 +320,6 @@ Operator Descriptions .. _class_Rect2_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Rect2` right **)** Returns ``true`` if the rectangles are not equal. @@ -346,10 +338,6 @@ Inversely transforms (multiplies) the ``Rect2`` by the given :ref:`Transform2D` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Rect2` right **)** Returns ``true`` if the rectangles are exactly equal. diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index ff22cb802..318cb69cf 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -87,13 +87,9 @@ Methods Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Rect2i` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Rect2i` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ @@ -306,10 +302,6 @@ Operator Descriptions .. _class_Rect2i_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Rect2i` right **)** Returns ``true`` if the rectangles are not equal. @@ -318,10 +310,6 @@ Returns ``true`` if the rectangles are not equal. .. _class_Rect2i_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Rect2i` right **)** Returns ``true`` if the rectangles are equal. diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index 849f4e5cb..ba3d45380 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -11,12 +11,14 @@ RectangleShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Rectangle shape for 2D collisions. +Rectangle shape resource for 2D physics. Description ----------- -Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects. +2D rectangle shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. This shape is useful for modeling box-like 2D objects. + +\ **Performance:** Being a primitive collision shape, ``RectangleShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). Tutorials --------- diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 7cb551e38..3b4746433 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -11,7 +11,7 @@ RefCounted **Inherits:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar`, :ref:`AStar2D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OGGPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VelocityTracker3D`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` +**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AnimationTrackEditPlugin`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DTLSServer`, :ref:`Directory`, :ref:`ENetConnection`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`File`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`HashingContext`, :ref:`JSON`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`Node3DGizmo`, :ref:`OGGPacketSequencePlayback`, :ref:`PCKPacker`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RandomNumberGenerator`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`VelocityTracker3D`, :ref:`VisualScriptFunctionState`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker` Base class for reference-counted objects. diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 933b7c9c0..a083bd668 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -18,7 +18,7 @@ Description Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. -The ``ReflectionProbe`` is used to create high-quality reflections at a low performance cost (when :ref:`update_mode` is :ref:`UPDATE_ONCE`). ``ReflectionProbe``\ s can be blended together and with the rest of the scene smoothly. ``ReflectionProbe``\ s can also be combined with :ref:`VoxelGI`, SDFGI (:ref:`Environment.sdfgi_enabled`) and screen-space reflections (:ref:`Environment.ss_reflections_enabled`) to get more accurate reflections in specific areas. ``ReflectionProbe``\ s render all objects within their :ref:`cull_mask`, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. +The ``ReflectionProbe`` is used to create high-quality reflections at a low performance cost (when :ref:`update_mode` is :ref:`UPDATE_ONCE`). ``ReflectionProbe``\ s can be blended together and with the rest of the scene smoothly. ``ReflectionProbe``\ s can also be combined with :ref:`VoxelGI`, SDFGI (:ref:`Environment.sdfgi_enabled`) and screen-space reflections (:ref:`Environment.ssr_enabled`) to get more accurate reflections in specific areas. ``ReflectionProbe``\ s render all objects within their :ref:`cull_mask`, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. \ **Note:** Unlike :ref:`VoxelGI` and SDFGI, ``ReflectionProbe``\ s only source their environment from a :ref:`WorldEnvironment` node. If you specify an :ref:`Environment` resource within a :ref:`Camera3D` node, it will be ignored by the ``ReflectionProbe``. This can lead to incorrect lighting within the ``ReflectionProbe``. diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index 473bce717..a51d7964f 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -82,11 +82,13 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_create` **(** **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`canvas_item_add_animation_slice` **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0 **)** | +| void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`RID` texture **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -346,6 +348,8 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_test_texture` **(** **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_video_adapter_api_version` **(** **)** |const| | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_video_adapter_name` **(** **)** |const| | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`DeviceType` | :ref:`get_video_adapter_type` **(** **)** |const| | @@ -440,7 +444,7 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_directional_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightDirectionalShadowMode` mode **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`light_directional_set_sky_only` **(** :ref:`RID` light, :ref:`bool` enable **)** | +| void | :ref:`light_directional_set_sky_mode` **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`light_omni_set_shadow_mode` **(** :ref:`RID` light, :ref:`LightOmniShadowMode` mode **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -888,6 +892,8 @@ Methods +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_occlusion_culling` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`viewport_set_use_taa` **(** :ref:`RID` viewport, :ref:`bool` enable **)** | ++--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_xr` **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`visibility_notifier_create` **(** **)** | @@ -1475,6 +1481,24 @@ enum **LightDirectionalShadowMode**: ---- +.. _enum_RenderingServer_LightDirectionalSkyMode: + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY: + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY: + +.. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY: + +enum **LightDirectionalSkyMode**: + +- **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY** = **0** --- Use DirectionalLight3D in both sky rendering and scene lighting. + +- **LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY** = **1** --- Only use DirectionalLight3D in scene lighting. + +- **LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY** = **2** --- Only use DirectionalLight3D in sky rendering. + +---- + .. _enum_RenderingServer_ShadowQuality: .. _class_RenderingServer_constant_SHADOW_QUALITY_HARD: @@ -1739,17 +1763,29 @@ enum **ParticlesCollisionHeightfieldResolution**: .. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID: +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE: + +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER: + .. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX: .. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD: +.. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_MAX: + enum **FogVolumeShape**: -- **FOG_VOLUME_SHAPE_ELLIPSOID** = **0** --- :ref:`FogVolume` will be shaped like an ellipsoid. +- **FOG_VOLUME_SHAPE_ELLIPSOID** = **0** --- :ref:`FogVolume` will be shaped like an ellipsoid (stretched sphere). -- **FOG_VOLUME_SHAPE_BOX** = **1** --- :ref:`FogVolume` will be shaped like a box. +- **FOG_VOLUME_SHAPE_CONE** = **1** --- :ref:`FogVolume` will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the extents. The cone will be adjusted to fit within the extents. Rotate the :ref:`FogVolume` node to reorient the cone. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). -- **FOG_VOLUME_SHAPE_WORLD** = **2** --- :ref:`FogVolume` will have no shape, will cover the whole world and will not be culled. +- **FOG_VOLUME_SHAPE_CYLINDER** = **2** --- :ref:`FogVolume` will be shaped like an upright cylinder (in local coordinates). Rotate the :ref:`FogVolume` node to reorient the cylinder. The cylinder will be adjusted to fit within the extents. Non-uniform scaling via extents is not supported (scale the :ref:`FogVolume` node instead). + +- **FOG_VOLUME_SHAPE_BOX** = **3** --- :ref:`FogVolume` will be shaped like a box. + +- **FOG_VOLUME_SHAPE_WORLD** = **4** --- :ref:`FogVolume` will have no shape, will cover the whole world and will not be culled. + +- **FOG_VOLUME_SHAPE_MAX** = **5** ---- @@ -1763,9 +1799,9 @@ enum **FogVolumeShape**: enum **ViewportScaling3DMode**: -- **VIEWPORT_SCALING_3D_MODE_BILINEAR** = **0** --- Enables bilinear scaling on 3D viewports. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +- **VIEWPORT_SCALING_3D_MODE_BILINEAR** = **0** --- Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. -- **VIEWPORT_SCALING_3D_MODE_FSR** = **1** --- Enables FSR upscaling on 3D viewports. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear supersampling will be used instead. A value of ``1.0`` disables scaling. +- **VIEWPORT_SCALING_3D_MODE_FSR** = **1** --- Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. - **VIEWPORT_SCALING_3D_MODE_MAX** = **2** @@ -2017,6 +2053,8 @@ enum **ViewportRenderInfoType**: .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_OCCLUDERS: +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_MOTION_VECTORS: + enum **ViewportDebugDraw**: - **VIEWPORT_DEBUG_DRAW_DISABLED** = **0** --- Debug draw is disabled. Default setting. @@ -2071,6 +2109,8 @@ enum **ViewportDebugDraw**: - **VIEWPORT_DEBUG_DRAW_OCCLUDERS** = **24** +- **VIEWPORT_DEBUG_DRAW_MOTION_VECTORS** = **25** + ---- .. _enum_RenderingServer_SkyMode: @@ -2209,13 +2249,15 @@ enum **EnvironmentGlowBlendMode**: enum **EnvironmentToneMapper**: -- **ENV_TONE_MAPPER_LINEAR** = **0** --- Output color as they came in. +- **ENV_TONE_MAPPER_LINEAR** = **0** --- Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. -- **ENV_TONE_MAPPER_REINHARD** = **1** --- Use the Reinhard tonemapper. +- **ENV_TONE_MAPPER_REINHARD** = **1** --- Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: ``color = color / (1 + color)``. This avoids clipping bright highlights, but the resulting image can look a bit dull. -- **ENV_TONE_MAPPER_FILMIC** = **2** --- Use the filmic tonemapper. +- **ENV_TONE_MAPPER_FILMIC** = **2** --- Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than :ref:`ENV_TONE_MAPPER_REINHARD`. -- **ENV_TONE_MAPPER_ACES** = **3** --- Use the ACES tonemapper. +- **ENV_TONE_MAPPER_ACES** = **3** --- Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to :ref:`ENV_TONE_MAPPER_REINHARD` and :ref:`ENV_TONE_MAPPER_FILMIC`. + +\ **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. ---- @@ -3182,6 +3224,14 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_item_add_animation_slice: + +- void **canvas_item_add_animation_slice** **(** :ref:`RID` item, :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** + +Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. + +---- + .. _class_RenderingServer_method_canvas_item_add_circle: - void **canvas_item_add_circle** **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** @@ -3196,7 +3246,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. _class_RenderingServer_method_canvas_item_add_line: -- void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0 **)** +- void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** ---- @@ -4034,7 +4084,7 @@ Creates a new fog volume and allocates an RID. - void **fog_volume_set_extents** **(** :ref:`RID` fog_volume, :ref:`Vector3` extents **)** -Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID` or :ref:`FOG_VOLUME_SHAPE_BOX`. +Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`FOG_VOLUME_SHAPE_CONE`, :ref:`FOG_VOLUME_SHAPE_CYLINDER` or :ref:`FOG_VOLUME_SHAPE_BOX`. ---- @@ -4050,7 +4100,7 @@ Sets the :ref:`Material` of the fog volume. Can be either a :ref - void **fog_volume_set_shape** **(** :ref:`RID` fog_volume, :ref:`FogVolumeShape` shape **)** -Sets the shape of the fog volume to either :ref:`FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`FOG_VOLUME_SHAPE_BOX`, or :ref:`FOG_VOLUME_SHAPE_ELLIPSOID` or :ref:`FOG_VOLUME_SHAPE_WORLD`. +Sets the shape of the fog volume to either :ref:`FOG_VOLUME_SHAPE_ELLIPSOID`, :ref:`FOG_VOLUME_SHAPE_CONE`, :ref:`FOG_VOLUME_SHAPE_CYLINDER`, :ref:`FOG_VOLUME_SHAPE_BOX` or :ref:`FOG_VOLUME_SHAPE_WORLD`. ---- @@ -4108,6 +4158,16 @@ Returns the id of the test texture. Creates one if none exists. ---- +.. _class_RenderingServer_method_get_video_adapter_api_version: + +- :ref:`String` **get_video_adapter_api_version** **(** **)** |const| + +Returns the version of the graphics video adapter *currently in use* (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. + +\ **Note:** When running a headless or server binary, this function returns an empty string. + +---- + .. _class_RenderingServer_method_get_video_adapter_name: - :ref:`String` **get_video_adapter_name** **(** **)** |const| @@ -4480,9 +4540,9 @@ Sets the shadow mode for this directional light. Equivalent to :ref:`Directional ---- -.. _class_RenderingServer_method_light_directional_set_sky_only: +.. _class_RenderingServer_method_light_directional_set_sky_mode: -- void **light_directional_set_sky_only** **(** :ref:`RID` light, :ref:`bool` enable **)** +- void **light_directional_set_sky_mode** **(** :ref:`RID` light, :ref:`LightDirectionalSkyMode` mode **)** If ``true``, 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. @@ -5849,7 +5909,7 @@ FIXME: The method seems to be non-existent. -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, :ref:`viewport_set_render_direct_to_screen`. +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 further optimization, see :ref:`viewport_set_render_direct_to_screen`. ---- @@ -6143,6 +6203,14 @@ Sets when the viewport should be updated. See :ref:`ViewportUpdateMode` viewport, :ref:`bool` enable **)** + +If ``true``, use Temporal Anti-Aliasing. + +---- + .. _class_RenderingServer_method_viewport_set_use_xr: - void **viewport_set_use_xr** **(** :ref:`RID` viewport, :ref:`bool` use_xr **)** diff --git a/classes/class_resource.rst b/classes/class_resource.rst index c3266fffa..916d4fc96 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -11,7 +11,7 @@ Resource **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`FontData`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`OGGPacketSequence`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OpenSimplexNoise`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRIPBinding`, :ref:`OpenXRInteractionProfile`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`ButtonGroup`, :ref:`CameraEffects`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`FontData`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NativeExtension`, :ref:`NavigationMesh`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`OGGPacketSequence`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRIPBinding`, :ref:`OpenXRInteractionProfile`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModification3D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonModificationStack3D`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VisualScriptNode`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` Base class for all resources. diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 5d0b2fe55..b07f2cc9d 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -45,12 +45,16 @@ Properties +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`context_menu_enabled` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array` | :ref:`custom_effects` | ``[]`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`fit_content_height` | ``false`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`hint_underlined` | ``true`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`meta_underlined` | ``true`` | @@ -59,13 +63,17 @@ Properties +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float` | :ref:`percent_visible` | ``1.0`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`int` | :ref:`progress_bar_delay` | ``1000`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`scroll_active` | ``true`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`scroll_following` | ``false`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`selection_enabled` | ``false`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -75,6 +83,8 @@ Properties +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`threaded` | ``false`` | ++--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`visible_characters` | ``-1`` | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`VisibleCharactersBehavior` | :ref:`visible_characters_behavior` | ``0`` | @@ -92,6 +102,8 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`deselect` **(** **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | @@ -104,6 +116,8 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | @@ -126,6 +140,10 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_ready` **(** **)** |const| | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`newline` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | @@ -154,6 +172,8 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`push_hint` **(** :ref:`String` description **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_indent` **(** :ref:`int` level **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_italics` **(** **)** | @@ -170,7 +190,7 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | +| void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_strikethrough` **(** **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -184,6 +204,8 @@ Methods +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`select_all` **(** **)** | ++-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | @@ -225,9 +247,9 @@ Theme Properties +---------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`int` | :ref:`shadow_outline_size` | ``1`` | +---------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`table_hseparation` | ``3`` | +| :ref:`int` | :ref:`table_h_separation` | ``3`` | +---------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ -| :ref:`int` | :ref:`table_vseparation` | ``3`` | +| :ref:`int` | :ref:`table_v_separation` | ``3`` | +---------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Font` | :ref:`bold_font` | | +---------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ @@ -257,6 +279,14 @@ Theme Properties Signals ------- +.. _class_RichTextLabel_signal_finished: + +- **finished** **(** **)** + +Triggered when the document is fully loaded. + +---- + .. _class_RichTextLabel_signal_meta_clicked: - **meta_clicked** **(** :ref:`Variant` meta **)** @@ -376,6 +406,8 @@ enum **ListType**: .. _class_RichTextLabel_constant_ITEM_META: +.. _class_RichTextLabel_constant_ITEM_HINT: + .. _class_RichTextLabel_constant_ITEM_DROPCAP: .. _class_RichTextLabel_constant_ITEM_CUSTOMFX: @@ -430,9 +462,11 @@ enum **ItemType**: - **ITEM_META** = **23** -- **ITEM_DROPCAP** = **24** +- **ITEM_HINT** = **24** -- **ITEM_CUSTOMFX** = **25** +- **ITEM_DROPCAP** = **25** + +- **ITEM_CUSTOMFX** = **26** ---- @@ -495,6 +529,22 @@ If ``true``, the label uses BBCode formatting. ---- +.. _class_RichTextLabel_property_context_menu_enabled: + +- :ref:`bool` **context_menu_enabled** + ++-----------+---------------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------------+ +| *Setter* | set_context_menu_enabled(value) | ++-----------+---------------------------------+ +| *Getter* | is_context_menu_enabled() | ++-----------+---------------------------------+ + +If ``true``, a right-click displays the context menu. + +---- + .. _class_RichTextLabel_property_custom_effects: - :ref:`Array` **custom_effects** @@ -547,6 +597,22 @@ If ``true``, the label's height will be automatically updated to fit its content ---- +.. _class_RichTextLabel_property_hint_underlined: + +- :ref:`bool` **hint_underlined** + ++-----------+---------------------------+ +| *Default* | ``true`` | ++-----------+---------------------------+ +| *Setter* | set_hint_underline(value) | ++-----------+---------------------------+ +| *Getter* | is_hint_underlined() | ++-----------+---------------------------+ + +If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/hint]``. + +---- + .. _class_RichTextLabel_property_language: - :ref:`String` **language** @@ -613,6 +679,24 @@ The range of characters to display, as a :ref:`float` between 0.0 a ---- +.. _class_RichTextLabel_property_progress_bar_delay: + +- :ref:`int` **progress_bar_delay** + ++-----------+-------------------------------+ +| *Default* | ``1000`` | ++-----------+-------------------------------+ +| *Setter* | set_progress_bar_delay(value) | ++-----------+-------------------------------+ +| *Getter* | get_progress_bar_delay() | ++-----------+-------------------------------+ + +The delay after which the loading progress bar is displayed, in milliseconds. Set to ``-1`` to disable progress bar entirely. + +\ **Note:** Progress bar is displayed only if :ref:`threaded` is enabled. + +---- + .. _class_RichTextLabel_property_scroll_active: - :ref:`bool` **scroll_active** @@ -661,9 +745,25 @@ If ``true``, the label allows text selection. ---- +.. _class_RichTextLabel_property_shortcut_keys_enabled: + +- :ref:`bool` **shortcut_keys_enabled** + ++-----------+----------------------------------+ +| *Default* | ``true`` | ++-----------+----------------------------------+ +| *Setter* | set_shortcut_keys_enabled(value) | ++-----------+----------------------------------+ +| *Getter* | is_shortcut_keys_enabled() | ++-----------+----------------------------------+ + +If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. + +---- + .. _class_RichTextLabel_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +- :ref:`StructuredTextParser` **structured_text_bidi_override** +-----------+------------------------------------------+ | *Default* | ``0`` | @@ -743,6 +843,22 @@ Base text writing direction. ---- +.. _class_RichTextLabel_property_threaded: + +- :ref:`bool` **threaded** + ++-----------+---------------------+ +| *Default* | ``false`` | ++-----------+---------------------+ +| *Setter* | set_threaded(value) | ++-----------+---------------------+ +| *Getter* | is_threaded() | ++-----------+---------------------+ + +If ``true``, text processing is done in a background thread. + +---- + .. _class_RichTextLabel_property_visible_characters: - :ref:`int` **visible_characters** @@ -814,12 +930,22 @@ Clears the tag stack and sets :ref:`text` to ---- +.. _class_RichTextLabel_method_deselect: + +- void **deselect** **(** **)** + +Clears the current selection. + +---- + .. _class_RichTextLabel_method_get_character_line: - :ref:`int` **get_character_line** **(** :ref:`int` character **)** Returns the line number of the character position provided. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_character_paragraph: @@ -828,6 +954,8 @@ Returns the line number of the character position provided. Returns the paragraph number of the character position provided. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_content_height: @@ -836,6 +964,8 @@ Returns the paragraph number of the character position provided. Returns the height of the content. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_content_width: @@ -844,6 +974,8 @@ Returns the height of the content. Returns the width of the content. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_line_count: @@ -852,6 +984,8 @@ Returns the width of the content. Returns the total number of lines in the text. Wrapped text is counted as multiple lines. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_line_offset: @@ -860,6 +994,18 @@ Returns the total number of lines in the text. Wrapped text is counted as multip Returns the vertical offset of the line found at the provided index. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + +---- + +.. _class_RichTextLabel_method_get_menu: + +- :ref:`PopupMenu` **get_menu** **(** **)** |const| + +Returns the :ref:`PopupMenu` of this ``RichTextLabel``. By default, this menu is displayed when right-clicking on the ``RichTextLabel``. + +\ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`Window.visible` property. + ---- .. _class_RichTextLabel_method_get_paragraph_count: @@ -876,6 +1022,8 @@ Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack' Returns the vertical offset of the paragraph found at the provided index. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_parsed_text: @@ -934,6 +1082,8 @@ Returns the vertical scrollbar. Returns the number of visible lines. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_get_visible_paragraph_count: @@ -942,6 +1092,8 @@ Returns the number of visible lines. Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. +\ **Note:** If :ref:`threaded` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready` or :ref:`finished` to determine whether document is fully loaded. + ---- .. _class_RichTextLabel_method_install_effect: @@ -952,6 +1104,22 @@ Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect` **is_menu_visible** **(** **)** |const| + +Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). + +---- + +.. _class_RichTextLabel_method_is_ready: + +- :ref:`bool` **is_ready** **(** **)** |const| + +If :ref:`threaded` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. + +---- + .. _class_RichTextLabel_method_newline: - void **newline** **(** **)** @@ -1064,6 +1232,14 @@ Adds a ``[font_size]`` tag to the tag stack. Overrides default font size for its ---- +.. _class_RichTextLabel_method_push_hint: + +- void **push_hint** **(** :ref:`String` description **)** + +Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[/hint]``. + +---- + .. _class_RichTextLabel_method_push_indent: - void **push_indent** **(** :ref:`int` level **)** @@ -1130,7 +1306,7 @@ Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline s .. _class_RichTextLabel_method_push_paragraph: -- void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** +- void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** Adds a ``[p]`` tag to the tag stack. @@ -1186,6 +1362,16 @@ Scrolls the window's top line to match first line of the ``paragraph``. ---- +.. _class_RichTextLabel_method_select_all: + +- void **select_all** **(** **)** + +Select all the text. + +If :ref:`selection_enabled` is ``false``, no selection will occur. + +---- + .. _class_RichTextLabel_method_set_cell_border_color: - void **set_cell_border_color** **(** :ref:`Color` color **)** @@ -1387,9 +1573,9 @@ The size of the shadow outline. ---- -.. _class_RichTextLabel_theme_constant_table_hseparation: +.. _class_RichTextLabel_theme_constant_table_h_separation: -- :ref:`int` **table_hseparation** +- :ref:`int` **table_h_separation** +-----------+-------+ | *Default* | ``3`` | @@ -1399,9 +1585,9 @@ The horizontal separation of elements in a table. ---- -.. _class_RichTextLabel_theme_constant_table_vseparation: +.. _class_RichTextLabel_theme_constant_table_v_separation: -- :ref:`int` **table_vseparation** +- :ref:`int` **table_v_separation** +-----------+-------+ | *Default* | ``3`` | diff --git a/classes/class_rid.rst b/classes/class_rid.rst index dcd4edfec..4f72a05dd 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -37,8 +37,6 @@ Methods Operators --------- -+-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ @@ -46,8 +44,6 @@ Operators +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`RID` right **)** | +-------------------------+-----------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`RID` right **)** | @@ -92,10 +88,6 @@ Operator Descriptions .. _class_RID_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`RID` right **)** ---- @@ -114,10 +106,6 @@ Operator Descriptions .. _class_RID_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`RID` right **)** ---- diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index c5daec9ad..845854a4e 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -21,6 +21,8 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath[]` | :ref:`get_properties` **(** **)** |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_property` **(** :ref:`NodePath` path **)** |const| | ++-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`property_get_index` **(** :ref:`NodePath` path **)** |const| | +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`property_get_spawn` **(** :ref:`NodePath` path **)** | @@ -49,6 +51,12 @@ Method Descriptions ---- +.. _class_SceneReplicationConfig_method_has_property: + +- :ref:`bool` **has_property** **(** :ref:`NodePath` path **)** |const| + +---- + .. _class_SceneReplicationConfig_method_property_get_index: - :ref:`int` **property_get_index** **(** :ref:`NodePath` path **)** |const| diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 3d6317ba0..33573355a 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -32,31 +32,33 @@ Tutorials Properties ---------- -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Node` | :ref:`current_scene` | | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`debug_collisions_hint` | ``false`` | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`debug_navigation_hint` | ``false`` | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Node` | :ref:`edited_scene_root` | | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`MultiplayerAPI` | :ref:`multiplayer` | | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`multiplayer_poll` | ``true`` | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`paused` | ``false`` | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ -| :ref:`Window` | :ref:`root` | | -+---------------------------------------------+------------------------------------------------------------------------------+-----------+ ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`auto_accept_quit` | ``true`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`Node` | :ref:`current_scene` | | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`debug_collisions_hint` | ``false`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`debug_navigation_hint` | ``false`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`Node` | :ref:`edited_scene_root` | | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`multiplayer_poll` | ``true`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`paused` | ``false`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`quit_on_go_back` | ``true`` | ++-----------------------------+------------------------------------------------------------------------------+-----------+ +| :ref:`Window` | :ref:`root` | | ++-----------------------------+------------------------------------------------------------------------------+-----------+ Methods ------- +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_group` **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | +| void | :ref:`call_group` **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_group_flags` **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | +| void | :ref:`call_group_flags` **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`change_scene` **(** :ref:`String` path **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -70,6 +72,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_frame` **(** **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MultiplayerAPI` | :ref:`get_multiplayer` **(** :ref:`NodePath` for_path=NodePath("") **)** |const| | ++---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_node_count` **(** **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_nodes_in_group` **(** :ref:`StringName` group **)** | @@ -88,13 +92,11 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`reload_current_scene` **(** **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_auto_accept_quit` **(** :ref:`bool` enabled **)** | -+---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_group` **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_group_flags` **(** :ref:`int` call_flags, :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_quit_on_go_back` **(** :ref:`bool` enabled **)** | +| void | :ref:`set_multiplayer` **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -171,7 +173,7 @@ Enumerations .. _class_SceneTree_constant_GROUP_CALL_REVERSE: -.. _class_SceneTree_constant_GROUP_CALL_REALTIME: +.. _class_SceneTree_constant_GROUP_CALL_DEFERRED: .. _class_SceneTree_constant_GROUP_CALL_UNIQUE: @@ -181,13 +183,31 @@ enum **GroupCallFlags**: - **GROUP_CALL_REVERSE** = **1** --- Call a group in reverse scene order. -- **GROUP_CALL_REALTIME** = **2** --- Call a group immediately (calls are normally made on idle). +- **GROUP_CALL_DEFERRED** = **2** --- Call a group with a one-frame delay (idle frame, not physics). - **GROUP_CALL_UNIQUE** = **4** --- Call a group only once even if the call is executed many times. Property Descriptions --------------------- +.. _class_SceneTree_property_auto_accept_quit: + +- :ref:`bool` **auto_accept_quit** + ++-----------+-----------------------------+ +| *Default* | ``true`` | ++-----------+-----------------------------+ +| *Setter* | set_auto_accept_quit(value) | ++-----------+-----------------------------+ +| *Getter* | is_auto_accept_quit() | ++-----------+-----------------------------+ + +If ``true``, the application automatically accepts quitting. + +For mobile platforms, see :ref:`quit_on_go_back`. + +---- + .. _class_SceneTree_property_current_scene: - :ref:`Node` **current_scene** @@ -248,20 +268,6 @@ The root of the edited scene. ---- -.. _class_SceneTree_property_multiplayer: - -- :ref:`MultiplayerAPI` **multiplayer** - -+----------+------------------------+ -| *Setter* | set_multiplayer(value) | -+----------+------------------------+ -| *Getter* | get_multiplayer() | -+----------+------------------------+ - -The default :ref:`MultiplayerAPI` instance for this ``SceneTree``. - ----- - .. _class_SceneTree_property_multiplayer_poll: - :ref:`bool` **multiplayer_poll** @@ -300,6 +306,24 @@ If ``true``, the ``SceneTree`` is paused. Doing so will have the following behav ---- +.. _class_SceneTree_property_quit_on_go_back: + +- :ref:`bool` **quit_on_go_back** + ++-----------+----------------------------+ +| *Default* | ``true`` | ++-----------+----------------------------+ +| *Setter* | set_quit_on_go_back(value) | ++-----------+----------------------------+ +| *Getter* | is_quit_on_go_back() | ++-----------+----------------------------+ + +If ``true``, the application quits automatically on going back (e.g. on Android). + +To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST`. + +---- + .. _class_SceneTree_property_root: - :ref:`Window` **root** @@ -315,28 +339,30 @@ Method Descriptions .. _class_SceneTree_method_call_group: -- :ref:`Variant` **call_group** **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| +- void **call_group** **(** :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| -Calls ``method`` on each member of the given group. You can pass arguments to ``method`` by specifying them at the end of the method call. This method is equivalent of calling :ref:`call_group_flags` with :ref:`GROUP_CALL_DEFAULT` flag. +Calls ``method`` on each member of the given group. You can pass arguments to ``method`` by specifying them at the end of the method call. \ **Note:** Due to design limitations, :ref:`call_group` will fail silently if one of the arguments is ``null``. -\ **Note:** :ref:`call_group` will always call methods with an one-frame delay, in a way similar to :ref:`Object.call_deferred`. To call methods immediately, use :ref:`call_group_flags` with the :ref:`GROUP_CALL_REALTIME` flag. +\ **Note:** :ref:`call_group` will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. To wait for one frame after :ref:`call_group` was called, use :ref:`call_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. ---- .. _class_SceneTree_method_call_group_flags: -- :ref:`Variant` **call_group_flags** **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| +- void **call_group_flags** **(** :ref:`int` flags, :ref:`StringName` group, :ref:`StringName` method, ... **)** |vararg| Calls ``method`` on each member of the given group, respecting the given :ref:`GroupCallFlags`. You can pass arguments to ``method`` by specifying them at the end of the method call. -\ **Note:** Due to design limitations, :ref:`call_group_flags` will fail silently if one of the arguments is ``null``. - :: - # Call the method immediately and in reverse order. - get_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, "bases", "destroy") + # Call the method in a deferred manner and in reverse order. + get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE) + +\ **Note:** Due to design limitations, :ref:`call_group_flags` will fail silently if one of the arguments is ``null``. + +\ **Note:** Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to :ref:`call_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, methods will be called with a one-frame delay in a way similar to :ref:`Object.set_deferred`. ---- @@ -409,6 +435,8 @@ Creates and returns a new :ref:`Tween`. - :ref:`Node` **get_first_node_in_group** **(** :ref:`StringName` group **)** +Returns the first node in the specified group, or ``null`` if the group is empty or does not exist. + ---- .. _class_SceneTree_method_get_frame: @@ -419,6 +447,14 @@ Returns the current frame number, i.e. the total frame count since the applicati ---- +.. _class_SceneTree_method_get_multiplayer: + +- :ref:`MultiplayerAPI` **get_multiplayer** **(** :ref:`NodePath` for_path=NodePath("") **)** |const| + +Return the :ref:`MultiplayerAPI` configured for the given path, or the default one if ``for_path`` is empty. + +---- + .. _class_SceneTree_method_get_node_count: - :ref:`int` **get_node_count** **(** **)** |const| @@ -457,6 +493,8 @@ Returns ``true`` if the given group exists. Sends the given notification to all members of the ``group``. +\ **Note:** :ref:`notify_group` will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification lots of members. To wait for one frame, use :ref:`notify_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. + ---- .. _class_SceneTree_method_notify_group_flags: @@ -465,6 +503,8 @@ Sends the given notification to all members of the ``group``. Sends the given notification to all members of the ``group``, respecting the given :ref:`GroupCallFlags`. +\ **Note:** Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to :ref:`notify_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, notifications will be sent with a one-frame delay in a way similar to using ``Object.call_deferred("notification", ...)``. + ---- .. _class_SceneTree_method_queue_delete: @@ -499,22 +539,14 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: ---- -.. _class_SceneTree_method_set_auto_accept_quit: - -- void **set_auto_accept_quit** **(** :ref:`bool` enabled **)** - -If ``true``, the application automatically accepts quitting. Enabled by default. - -For mobile platforms, see :ref:`set_quit_on_go_back`. - ----- - .. _class_SceneTree_method_set_group: - void **set_group** **(** :ref:`StringName` group, :ref:`String` property, :ref:`Variant` value **)** Sets the given ``property`` to ``value`` on all members of the given group. +\ **Note:** :ref:`set_group` will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. To wait for one frame, use :ref:`set_group_flags` with the :ref:`GROUP_CALL_DEFERRED` flag. + ---- .. _class_SceneTree_method_set_group_flags: @@ -523,15 +555,15 @@ Sets the given ``property`` to ``value`` on all members of the given group. Sets the given ``property`` to ``value`` on all members of the given group, respecting the given :ref:`GroupCallFlags`. +\ **Note:** Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to :ref:`set_group`. However, if the :ref:`GROUP_CALL_DEFERRED` flag is present in the ``flags`` argument, properties will be set with a one-frame delay in a way similar to :ref:`Object.call_deferred`. + ---- -.. _class_SceneTree_method_set_quit_on_go_back: +.. _class_SceneTree_method_set_multiplayer: -- void **set_quit_on_go_back** **(** :ref:`bool` enabled **)** +- void **set_multiplayer** **(** :ref:`MultiplayerAPI` multiplayer, :ref:`NodePath` root_path=NodePath("") **)** -If ``true``, the application quits automatically on going back (e.g. on Android). Enabled by default. - -To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST`. +Sets a custom :ref:`MultiplayerAPI` with the given ``root_path`` (controlling also the relative subpaths), or override the default one if ``root_path`` is empty. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index 13926d0cb..4260ceaab 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -41,7 +41,7 @@ As opposed to :ref:`Timer`, it does not require the instantiation o -The timer will be automatically freed after its time elapses. +The timer will be automatically freed after its time elapses, so be aware that any reference you might have kept to it will become invalid. Properties ---------- diff --git a/classes/class_script.rst b/classes/class_script.rst index 1c8f828c0..30f828fa9 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -11,7 +11,7 @@ Script **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`VisualScript` +**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`ScriptExtension`, :ref:`VisualScript` A class stored as a resource. diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst new file mode 100644 index 000000000..bdc5e8ed9 --- /dev/null +++ b/classes/class_scriptextension.rst @@ -0,0 +1,267 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the ScriptExtension.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_ScriptExtension: + +ScriptExtension +=============== + +**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +Methods +------- + ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_can_instantiate` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_editor_can_reload_from_file` **(** **)** |virtual| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script` | :ref:`_get_base_script` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_constants` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_documentation` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName` | :ref:`_get_instance_base_type` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ScriptLanguage` | :ref:`_get_language` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_get_member_line` **(** :ref:`StringName` member **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StringName[]` | :ref:`_get_members` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_method_info` **(** :ref:`StringName` method **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_rpc_methods` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_script_property_list` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_script_signal_list` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_source_code` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_inherits_script` **(** :ref:`Script` script **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void* | :ref:`_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_instance_has` **(** :ref:`Object` object **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_placeholder_fallback_enabled` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_tool` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_valid` **(** **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_placeholder_erased` **(** void* placeholder **)** |virtual| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void* | :ref:`_placeholder_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`_reload` **(** :ref:`bool` keep_state **)** |virtual| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_set_source_code` **(** :ref:`String` code **)** |virtual| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_update_exports` **(** **)** |virtual| | ++---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Method Descriptions +------------------- + +.. _class_ScriptExtension_method__can_instantiate: + +- :ref:`bool` **_can_instantiate** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__editor_can_reload_from_file: + +- :ref:`bool` **_editor_can_reload_from_file** **(** **)** |virtual| + +---- + +.. _class_ScriptExtension_method__get_base_script: + +- :ref:`Script` **_get_base_script** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_constants: + +- :ref:`Dictionary` **_get_constants** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_documentation: + +- :ref:`Dictionary[]` **_get_documentation** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_instance_base_type: + +- :ref:`StringName` **_get_instance_base_type** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_language: + +- :ref:`ScriptLanguage` **_get_language** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_member_line: + +- :ref:`int` **_get_member_line** **(** :ref:`StringName` member **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_members: + +- :ref:`StringName[]` **_get_members** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_method_info: + +- :ref:`Dictionary` **_get_method_info** **(** :ref:`StringName` method **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_property_default_value: + +- :ref:`Variant` **_get_property_default_value** **(** :ref:`StringName` property **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_rpc_methods: + +- :ref:`Dictionary[]` **_get_rpc_methods** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_script_method_list: + +- :ref:`Dictionary[]` **_get_script_method_list** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_script_property_list: + +- :ref:`Dictionary[]` **_get_script_property_list** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_script_signal_list: + +- :ref:`Dictionary[]` **_get_script_signal_list** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__get_source_code: + +- :ref:`String` **_get_source_code** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__has_method: + +- :ref:`bool` **_has_method** **(** :ref:`StringName` method **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__has_script_signal: + +- :ref:`bool` **_has_script_signal** **(** :ref:`StringName` signal **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__has_source_code: + +- :ref:`bool` **_has_source_code** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__inherits_script: + +- :ref:`bool` **_inherits_script** **(** :ref:`Script` script **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__instance_create: + +- void* **_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__instance_has: + +- :ref:`bool` **_instance_has** **(** :ref:`Object` object **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__is_placeholder_fallback_enabled: + +- :ref:`bool` **_is_placeholder_fallback_enabled** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__is_tool: + +- :ref:`bool` **_is_tool** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__is_valid: + +- :ref:`bool` **_is_valid** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__placeholder_erased: + +- void **_placeholder_erased** **(** void* placeholder **)** |virtual| + +---- + +.. _class_ScriptExtension_method__placeholder_instance_create: + +- void* **_placeholder_instance_create** **(** :ref:`Object` for_object **)** |virtual| |const| + +---- + +.. _class_ScriptExtension_method__reload: + +- :ref:`Error` **_reload** **(** :ref:`bool` keep_state **)** |virtual| + +---- + +.. _class_ScriptExtension_method__set_source_code: + +- void **_set_source_code** **(** :ref:`String` code **)** |virtual| + +---- + +.. _class_ScriptExtension_method__update_exports: + +- void **_update_exports** **(** **)** |virtual| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_scriptlanguage.rst b/classes/class_scriptlanguage.rst new file mode 100644 index 000000000..30d8e2e30 --- /dev/null +++ b/classes/class_scriptlanguage.rst @@ -0,0 +1,23 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the ScriptLanguage.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_ScriptLanguage: + +ScriptLanguage +============== + +**Inherits:** :ref:`Object` + +**Inherited By:** :ref:`ScriptLanguageExtension` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst new file mode 100644 index 000000000..15e12df4f --- /dev/null +++ b/classes/class_scriptlanguageextension.rst @@ -0,0 +1,606 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the ScriptLanguageExtension.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_ScriptLanguageExtension: + +ScriptLanguageExtension +======================= + +**Inherits:** :ref:`ScriptLanguage` **<** :ref:`Object` + + + +Methods +------- + ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_add_named_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void* | :ref:`_alloc_instance_binding_data` **(** :ref:`Object` object **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_auto_indent_code` **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_can_inherit_from_file` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_complete_code` **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Object` | :ref:`_create_script` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_debug_get_current_stack_info` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_debug_get_error` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_debug_get_globals` **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_debug_get_stack_level_count` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_debug_get_stack_level_function` **(** :ref:`int` level **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void* | :ref:`_debug_get_stack_level_instance` **(** :ref:`int` level **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_debug_get_stack_level_line` **(** :ref:`int` level **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_debug_get_stack_level_locals` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_debug_get_stack_level_members` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_debug_parse_stack_level_expression` **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`_execute_file` **(** :ref:`String` path **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_find_function` **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_finish` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_frame` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_free_instance_binding_data` **(** void* data **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_built_in_templates` **(** :ref:`StringName` object **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_comment_delimiters` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_extension` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_global_class_name` **(** :ref:`String` path **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_get_public_constants` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary[]` | :ref:`_get_public_functions` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_reserved_words` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`_get_string_delimiters` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_get_type` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_handles_global_class_type` **(** :ref:`String` type **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_has_named_classes` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_init` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_control_flow_keyword` **(** :ref:`String` keyword **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_is_using_templates` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_lookup_code` **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_make_function` **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Script` | :ref:`_make_template` **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`_open_in_external_editor` **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_overrides_external_editor` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_profiling_get_accumulated_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_profiling_start` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_profiling_stop` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_refcount_decremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_refcount_incremented_instance_binding` **(** :ref:`Object` object **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_reload_all_scripts` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_reload_tool_script` **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_remove_named_global_constant` **(** :ref:`StringName` name **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_supports_builtin_mode` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`_supports_documentation` **(** **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_thread_enter` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`_thread_exit` **(** **)** |virtual| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`_validate` **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`_validate_path` **(** :ref:`String` path **)** |virtual| |const| | ++---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Enumerations +------------ + +.. _enum_ScriptLanguageExtension_LookupResultType: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_SCRIPT_LOCATION: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_CONSTANT: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_PROPERTY: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_METHOD: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_SIGNAL: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ENUM: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE: + +.. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_MAX: + +enum **LookupResultType**: + +- **LOOKUP_RESULT_SCRIPT_LOCATION** = **0** + +- **LOOKUP_RESULT_CLASS** = **1** + +- **LOOKUP_RESULT_CLASS_CONSTANT** = **2** + +- **LOOKUP_RESULT_CLASS_PROPERTY** = **3** + +- **LOOKUP_RESULT_CLASS_METHOD** = **4** + +- **LOOKUP_RESULT_CLASS_SIGNAL** = **5** + +- **LOOKUP_RESULT_CLASS_ENUM** = **6** + +- **LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE** = **7** + +- **LOOKUP_RESULT_MAX** = **8** + +---- + +.. _enum_ScriptLanguageExtension_CodeCompletionLocation: + +.. _class_ScriptLanguageExtension_constant_LOCATION_LOCAL: + +.. _class_ScriptLanguageExtension_constant_LOCATION_PARENT_MASK: + +.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: + +.. _class_ScriptLanguageExtension_constant_LOCATION_OTHER: + +enum **CodeCompletionLocation**: + +- **LOCATION_LOCAL** = **0** --- The option is local to the location of the code completion query - e.g. a local variable. + +- **LOCATION_PARENT_MASK** = **256** --- The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in a the class or a parent class. + +- **LOCATION_OTHER_USER_CODE** = **512** --- The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). + +- **LOCATION_OTHER** = **1024** --- The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. + +---- + +.. _enum_ScriptLanguageExtension_CodeCompletionKind: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CLASS: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FUNCTION: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_SIGNAL: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_VARIABLE: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MEMBER: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_ENUM: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CONSTANT: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_NODE_PATH: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FILE_PATH: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_PLAIN_TEXT: + +.. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MAX: + +enum **CodeCompletionKind**: + +- **CODE_COMPLETION_KIND_CLASS** = **0** + +- **CODE_COMPLETION_KIND_FUNCTION** = **1** + +- **CODE_COMPLETION_KIND_SIGNAL** = **2** + +- **CODE_COMPLETION_KIND_VARIABLE** = **3** + +- **CODE_COMPLETION_KIND_MEMBER** = **4** + +- **CODE_COMPLETION_KIND_ENUM** = **5** + +- **CODE_COMPLETION_KIND_CONSTANT** = **6** + +- **CODE_COMPLETION_KIND_NODE_PATH** = **7** + +- **CODE_COMPLETION_KIND_FILE_PATH** = **8** + +- **CODE_COMPLETION_KIND_PLAIN_TEXT** = **9** + +- **CODE_COMPLETION_KIND_MAX** = **10** + +Method Descriptions +------------------- + +.. _class_ScriptLanguageExtension_method__add_global_constant: + +- void **_add_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__add_named_global_constant: + +- void **_add_named_global_constant** **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__alloc_instance_binding_data: + +- void* **_alloc_instance_binding_data** **(** :ref:`Object` object **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__auto_indent_code: + +- :ref:`String` **_auto_indent_code** **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__can_inherit_from_file: + +- :ref:`bool` **_can_inherit_from_file** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__complete_code: + +- :ref:`Dictionary` **_complete_code** **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__create_script: + +- :ref:`Object` **_create_script** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_current_stack_info: + +- :ref:`Dictionary[]` **_debug_get_current_stack_info** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_error: + +- :ref:`String` **_debug_get_error** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_globals: + +- :ref:`Dictionary` **_debug_get_globals** **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_count: + +- :ref:`int` **_debug_get_stack_level_count** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_function: + +- :ref:`String` **_debug_get_stack_level_function** **(** :ref:`int` level **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_instance: + +- void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_line: + +- :ref:`int` **_debug_get_stack_level_line** **(** :ref:`int` level **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_locals: + +- :ref:`Dictionary` **_debug_get_stack_level_locals** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__debug_get_stack_level_members: + +- :ref:`Dictionary` **_debug_get_stack_level_members** **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__debug_parse_stack_level_expression: + +- :ref:`String` **_debug_parse_stack_level_expression** **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__execute_file: + +- :ref:`Error` **_execute_file** **(** :ref:`String` path **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__find_function: + +- :ref:`int` **_find_function** **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__finish: + +- void **_finish** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__frame: + +- void **_frame** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__free_instance_binding_data: + +- void **_free_instance_binding_data** **(** void* data **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__get_built_in_templates: + +- :ref:`Dictionary[]` **_get_built_in_templates** **(** :ref:`StringName` object **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_comment_delimiters: + +- :ref:`PackedStringArray` **_get_comment_delimiters** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_extension: + +- :ref:`String` **_get_extension** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_global_class_name: + +- :ref:`Dictionary` **_get_global_class_name** **(** :ref:`String` path **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_name: + +- :ref:`String` **_get_name** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_public_constants: + +- :ref:`Dictionary` **_get_public_constants** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_public_functions: + +- :ref:`Dictionary[]` **_get_public_functions** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_recognized_extensions: + +- :ref:`PackedStringArray` **_get_recognized_extensions** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_reserved_words: + +- :ref:`PackedStringArray` **_get_reserved_words** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_string_delimiters: + +- :ref:`PackedStringArray` **_get_string_delimiters** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__get_type: + +- :ref:`String` **_get_type** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__handles_global_class_type: + +- :ref:`bool` **_handles_global_class_type** **(** :ref:`String` type **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__has_named_classes: + +- :ref:`bool` **_has_named_classes** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__init: + +- void **_init** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__is_control_flow_keyword: + +- :ref:`bool` **_is_control_flow_keyword** **(** :ref:`String` keyword **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__is_using_templates: + +- :ref:`bool` **_is_using_templates** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__lookup_code: + +- :ref:`Dictionary` **_lookup_code** **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__make_function: + +- :ref:`String` **_make_function** **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__make_template: + +- :ref:`Script` **_make_template** **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__open_in_external_editor: + +- :ref:`Error` **_open_in_external_editor** **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__overrides_external_editor: + +- :ref:`bool` **_overrides_external_editor** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__profiling_get_accumulated_data: + +- :ref:`int` **_profiling_get_accumulated_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__profiling_get_frame_data: + +- :ref:`int` **_profiling_get_frame_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__profiling_start: + +- void **_profiling_start** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__profiling_stop: + +- void **_profiling_stop** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__refcount_decremented_instance_binding: + +- :ref:`bool` **_refcount_decremented_instance_binding** **(** :ref:`Object` object **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__refcount_incremented_instance_binding: + +- void **_refcount_incremented_instance_binding** **(** :ref:`Object` object **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__reload_all_scripts: + +- void **_reload_all_scripts** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__reload_tool_script: + +- void **_reload_tool_script** **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__remove_named_global_constant: + +- void **_remove_named_global_constant** **(** :ref:`StringName` name **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__supports_builtin_mode: + +- :ref:`bool` **_supports_builtin_mode** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__supports_documentation: + +- :ref:`bool` **_supports_documentation** **(** **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__thread_enter: + +- void **_thread_enter** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__thread_exit: + +- void **_thread_exit** **(** **)** |virtual| + +---- + +.. _class_ScriptLanguageExtension_method__validate: + +- :ref:`Dictionary` **_validate** **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| + +---- + +.. _class_ScriptLanguageExtension_method__validate_path: + +- :ref:`String` **_validate_path** **(** :ref:`String` path **)** |virtual| |const| + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index cdd38c635..b3a344f3f 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -23,13 +23,9 @@ Scrollbars are a :ref:`Range`-based :ref:`Control`, Properties ---------- -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`custom_step` | ``-1.0`` | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``0`` (overrides :ref:`Control`) | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`float` | step | ``0.0`` (overrides :ref:`Range`) | -+---------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ ++---------------------------+----------------------------------------------------------+----------+ +| :ref:`float` | :ref:`custom_step` | ``-1.0`` | ++---------------------------+----------------------------------------------------------+----------+ Signals ------- diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 7ef08595d..17887af98 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -24,6 +24,11 @@ ScrollContainers will automatically create a scrollbar child (:ref:`HScrollBar` control. You can set ``EXPAND`` on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst index 717e00a59..17adbfab2 100644 --- a/classes/class_segmentshape2d.rst +++ b/classes/class_segmentshape2d.rst @@ -11,12 +11,14 @@ SegmentShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Segment shape for 2D collisions. +Segment shape resource for 2D physics. Description ----------- -Segment shape for 2D collisions. Consists of two points, ``a`` and ``b``. +2D segment shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. Consists of two points, ``a`` and ``b``. + +\ **Performance:** Being a primitive collision shape, ``SegmentShape2D`` is fast to check collisions against (though not as fast as :ref:`CircleShape2D`). Properties ---------- diff --git a/classes/class_separationrayshape2d.rst b/classes/class_separationrayshape2d.rst index 91dd164eb..bf4521fc6 100644 --- a/classes/class_separationrayshape2d.rst +++ b/classes/class_separationrayshape2d.rst @@ -11,12 +11,14 @@ SeparationRayShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Separation ray shape for 2D collisions. +Separation ray shape resource for 2D physics. Description ----------- -Separation ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. +2D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + +\ **Performance:** Being a primitive collision shape, ``SeparationRayShape2D`` is fast to check collisions against. Properties ---------- diff --git a/classes/class_separationrayshape3d.rst b/classes/class_separationrayshape3d.rst index 4a0d10009..da70bb1c2 100644 --- a/classes/class_separationrayshape3d.rst +++ b/classes/class_separationrayshape3d.rst @@ -11,12 +11,14 @@ SeparationRayShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Separation ray shape for 3D collisions. +Separation ray shape resource for 3D physics. Description ----------- -Separation ray shape for 3D collisions, which can be set into a :ref:`PhysicsBody3D` or :ref:`Area3D`. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. +3D separation ray shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + +\ **Performance:** Being a primitive collision shape, ``SeparationRayShape3D`` is fast to check collisions against. Properties ---------- diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index 06b34eb7f..9ddc2dc65 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -83,7 +83,11 @@ This method needs the transformation matrix for this shape (``local_xform``), th - :ref:`Array` **collide_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform **)** -Returns a list of the points where this shape touches another. If there are no collisions the list is empty. +Returns a list of contact point pairs where this shape touches another. + +If there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of ``with_shape``. + +A collision pair A, B can be used to calculate the collision normal with ``(B - A).normalized()``, and the collision depth with ``(B - A).length()``. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape (``local_xform``), the shape to check collisions with (``with_shape``), and the transformation matrix of that shape (``shape_xform``). @@ -103,7 +107,11 @@ This method needs the transformation matrix for this shape (``local_xform``), th - :ref:`Array` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D` local_xform, :ref:`Vector2` local_motion, :ref:`Shape2D` with_shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` shape_motion **)** -Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty. +Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. + +If there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of ``with_shape``. + +A collision pair A, B can be used to calculate the collision normal with ``(B - A).normalized()``, and the collision depth with ``(B - A).length()``. This information is typically used to separate shapes, particularly in collision solvers. This method needs the transformation matrix for this shape (``local_xform``), the movement to test on this shape (``local_motion``), the shape to check collisions with (``with_shape``), the transformation matrix of that shape (``shape_xform``), and the movement to test onto the other object (``shape_motion``). diff --git a/classes/class_signal.rst b/classes/class_signal.rst index 9f5232f99..d0550441f 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -11,6 +11,13 @@ Signal Class representing a signal defined in an object. +Tutorials +--------- + +- :doc:`Using Signals <../getting_started/step_by_step/signals>` + +- `GDScript Basics <../tutorials/scripting/gdscript/gdscript_basics.html#signals>`__ + Constructors ------------ @@ -48,13 +55,9 @@ Methods Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Signal` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Signal` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------+ @@ -163,20 +166,12 @@ Operator Descriptions .. _class_Signal_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Signal` right **)** ---- .. _class_Signal_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Signal` right **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index 91bcef230..84ecede75 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -72,6 +72,8 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_bone_global_pose_override` **(** :ref:`int` bone_idx **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform3D` | :ref:`get_bone_global_rest` **(** :ref:`int` bone_idx **)** |const| | ++-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`get_bone_local_pose_override` **(** :ref:`int` bone_idx **)** |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** |const| | @@ -325,6 +327,16 @@ Returns the overall transform of the specified bone, with respect to the skeleto - :ref:`Transform3D` **get_bone_global_pose_override** **(** :ref:`int` bone_idx **)** |const| +Returns the global pose override transform for ``bone_idx``. + +---- + +.. _class_Skeleton3D_method_get_bone_global_rest: + +- :ref:`Transform3D` **get_bone_global_rest** **(** :ref:`int` bone_idx **)** |const| + +Returns the global rest transform for ``bone_idx``. + ---- .. _class_Skeleton3D_method_get_bone_local_pose_override: diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 38456dcb0..4f3e633d1 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -25,19 +25,15 @@ Base class for GUI sliders. Properties ---------- -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scrollable` | ``true`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | size_flags_vertical | ``0`` (overrides :ref:`Control`) | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`tick_count` | ``0`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | -+------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ ++-------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`editable` | ``true`` | ++-------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`scrollable` | ``true`` | ++-------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`tick_count` | ``0`` | ++-------------------------+-----------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | ++-------------------------+-----------------------------------------------------------------+-----------+ Signals ------- diff --git a/classes/class_spheremesh.rst b/classes/class_spheremesh.rst index 421e94f4f..67ca063f5 100644 --- a/classes/class_spheremesh.rst +++ b/classes/class_spheremesh.rst @@ -22,13 +22,13 @@ Properties ---------- +---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`height` | ``2.0`` | +| :ref:`float` | :ref:`height` | ``1.0`` | +---------------------------+-------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`is_hemisphere` | ``false`` | +---------------------------+-------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`radial_segments` | ``64`` | +---------------------------+-------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | +| :ref:`float` | :ref:`radius` | ``0.5`` | +---------------------------+-------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`rings` | ``32`` | +---------------------------+-------------------------------------------------------------------+-----------+ @@ -41,7 +41,7 @@ Property Descriptions - :ref:`float` **height** +-----------+-------------------+ -| *Default* | ``2.0`` | +| *Default* | ``1.0`` | +-----------+-------------------+ | *Setter* | set_height(value) | +-----------+-------------------+ @@ -91,7 +91,7 @@ Number of radial segments on the sphere. - :ref:`float` **radius** +-----------+-------------------+ -| *Default* | ``1.0`` | +| *Default* | ``0.5`` | +-----------+-------------------+ | *Setter* | set_radius(value) | +-----------+-------------------+ diff --git a/classes/class_sphereshape3d.rst b/classes/class_sphereshape3d.rst index f7a0c82fa..2c8b71918 100644 --- a/classes/class_sphereshape3d.rst +++ b/classes/class_sphereshape3d.rst @@ -11,12 +11,14 @@ SphereShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Sphere shape for 3D collisions. +Sphere shape resource for 3D collisions. Description ----------- -Sphere shape for 3D collisions, which can be set into a :ref:`PhysicsBody3D` or :ref:`Area3D`. This shape is useful for modeling sphere-like 3D objects. +3D sphere shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. This shape is useful for modeling sphere-like 3D objects. + +\ **Performance:** Being a primitive collision shape, ``SphereShape3D`` is the fastest collision shape to check collisions against, as it only requires a distance check with the shape's origin. Tutorials --------- @@ -27,7 +29,7 @@ Properties ---------- +---------------------------+----------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | +| :ref:`float` | :ref:`radius` | ``0.5`` | +---------------------------+----------------------------------------------------+---------+ Property Descriptions @@ -38,7 +40,7 @@ Property Descriptions - :ref:`float` **radius** +-----------+-------------------+ -| *Default* | ``1.0`` | +| *Default* | ``0.5`` | +-----------+-------------------+ | *Setter* | set_radius(value) | +-----------+-------------------+ diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 4b010b095..cd5c7a9ce 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -47,6 +47,8 @@ See :ref:`Range` class for more options over the ``SpinBox``. \ **Note:** ``SpinBox`` relies on an underlying :ref:`LineEdit` node. To theme a ``SpinBox``'s background, add theme items for :ref:`LineEdit` and customize them. +\ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit`, you can use :ref:`Control.set_drag_forwarding` on the node returned by :ref:`get_line_edit`. + Properties ---------- diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index fac010cc9..481f743fb 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -20,6 +20,11 @@ Description Container for splitting two :ref:`Control`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index e625bca2a..d16c86e69 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -23,31 +23,39 @@ A node that displays 2D texture information in a 3D environment. See also :ref:` Properties ---------- -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| Vector3.Axis | :ref:`axis` | ``2`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`BillboardMode` | :ref:`billboard` | ``0`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`centered` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`double_sided` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_h` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`flip_v` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`float` | :ref:`pixel_size` | ``0.01`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`shaded` | ``false`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ -| :ref:`bool` | :ref:`transparent` | ``true`` | -+---------------------------------------------------------+---------------------------------------------------------------+-----------------------+ ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`AlphaCutMode` | :ref:`alpha_cut` | ``0`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| Vector3.Axis | :ref:`axis` | ``2`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`BillboardMode` | :ref:`billboard` | ``0`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`centered` | ``true`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`double_sided` | ``true`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`fixed_size` | ``false`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`flip_h` | ``false`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`flip_v` | ``false`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`modulate` | ``Color(1, 1, 1, 1)`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`no_depth_test` | ``false`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`pixel_size` | ``0.01`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`render_priority` | ``0`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`shaded` | ``false`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`TextureFilter` | :ref:`texture_filter` | ``3`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`transparent` | ``true`` | ++---------------------------------------------------------+---------------------------------------------------------------------+-----------------------+ Methods ------- @@ -73,6 +81,10 @@ Enumerations .. _class_SpriteBase3D_constant_FLAG_DOUBLE_SIDED: +.. _class_SpriteBase3D_constant_FLAG_DISABLE_DEPTH_TEST: + +.. _class_SpriteBase3D_constant_FLAG_FIXED_SIZE: + .. _class_SpriteBase3D_constant_FLAG_MAX: enum **DrawFlags**: @@ -83,7 +95,11 @@ enum **DrawFlags**: - **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind. -- **FLAG_MAX** = **3** --- Represents the size of the :ref:`DrawFlags` enum. +- **FLAG_DISABLE_DEPTH_TEST** = **3** --- Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + +- **FLAG_FIXED_SIZE** = **4** --- Label is scaled by depth so that it always appears the same size on screen. + +- **FLAG_MAX** = **5** --- Represents the size of the :ref:`DrawFlags` enum. ---- @@ -186,6 +202,22 @@ If ``true``, texture can be seen from the back as well, if ``false``, it is invi ---- +.. _class_SpriteBase3D_property_fixed_size: + +- :ref:`bool` **fixed_size** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, the label is rendered at the same size regardless of distance. + +---- + .. _class_SpriteBase3D_property_flip_h: - :ref:`bool` **flip_h** @@ -236,6 +268,22 @@ A color value used to *multiply* the texture's colors. Can be used for mood-colo ---- +.. _class_SpriteBase3D_property_no_depth_test: + +- :ref:`bool` **no_depth_test** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_draw_flag(value) | ++-----------+----------------------+ +| *Getter* | get_draw_flag() | ++-----------+----------------------+ + +If ``true``, depth testing is disabled and the object will be drawn in render order. + +---- + .. _class_SpriteBase3D_property_offset: - :ref:`Vector2` **offset** @@ -268,6 +316,26 @@ The size of one pixel's width on the sprite to scale it in 3D. ---- +.. _class_SpriteBase3D_property_render_priority: + +- :ref:`int` **render_priority** + ++-----------+----------------------------+ +| *Default* | ``0`` | ++-----------+----------------------------+ +| *Setter* | set_render_priority(value) | ++-----------+----------------------------+ +| *Getter* | get_render_priority() | ++-----------+----------------------------+ + +Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. + +\ **Node:** This only applies if :ref:`alpha_cut` is set to :ref:`ALPHA_CUT_DISABLED` (default value). + +\ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + +---- + .. _class_SpriteBase3D_property_shaded: - :ref:`bool` **shaded** @@ -284,6 +352,22 @@ If ``true``, the :ref:`Light3D` in the :ref:`Environment` **texture_filter** + ++-----------+---------------------------+ +| *Default* | ``3`` | ++-----------+---------------------------+ +| *Setter* | set_texture_filter(value) | ++-----------+---------------------------+ +| *Getter* | get_texture_filter() | ++-----------+---------------------------+ + +Filter flags for the texture. See :ref:`TextureFilter` for options. + +---- + .. _class_SpriteBase3D_property_transparent: - :ref:`bool` **transparent** diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index f03b9d86e..e3ca9a566 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -44,6 +44,8 @@ Methods +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Status` | :ref:`get_status` **(** **)** |const| | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`StreamPeer` | :ref:`get_stream` **(** **)** |const| | ++------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`poll` **(** **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -126,6 +128,14 @@ Returns the status of the connection. See :ref:`Status` **get_stream** **(** **)** |const| + +Returns the underlying :ref:`StreamPeer` connection, used in :ref:`accept_stream` or :ref:`connect_to_stream`. + +---- + .. _class_StreamPeerSSL_method_poll: - void **poll** **(** **)** diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 3e06f7ff1..6852f44e0 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -36,9 +36,9 @@ Methods +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_local_port` **(** **)** |const| | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Status` | :ref:`get_status` **(** **)** | +| :ref:`Status` | :ref:`get_status` **(** **)** |const| | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_connected_to_host` **(** **)** |const| | +| :ref:`Error` | :ref:`poll` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_no_delay` **(** :ref:`bool` enabled **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ @@ -121,17 +121,17 @@ Returns the local port to which this peer is bound. .. _class_StreamPeerTCP_method_get_status: -- :ref:`Status` **get_status** **(** **)** +- :ref:`Status` **get_status** **(** **)** |const| Returns the status of the connection, see :ref:`Status`. ---- -.. _class_StreamPeerTCP_method_is_connected_to_host: +.. _class_StreamPeerTCP_method_poll: -- :ref:`bool` **is_connected_to_host** **(** **)** |const| +- :ref:`Error` **poll** **(** **)** -Returns ``true`` if this peer is currently connected or is connecting to a host, ``false`` otherwise. +Poll the socket, updating its state. See :ref:`get_status`. ---- diff --git a/classes/class_string.rst b/classes/class_string.rst index 20f5df81a..27c47b7c0 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -37,199 +37,201 @@ Constructors Methods ------- -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`bigrams` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`bin_to_int` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`c_escape` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`c_unescape` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`capitalize` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`casecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`chr` **(** :ref:`int` char **)** |static| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`contains` **(** :ref:`String` what **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`count` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`countn` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`dedent` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`format` **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_base_dir` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_basename` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_extension` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_file` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_slice` **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_slice_count` **(** :ref:`String` delimiter **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_slicec` **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hash` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`insert` **(** :ref:`int` position, :ref:`String` what **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_absolute_path` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_relative_path` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_subsequence_of` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_subsequence_ofn` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_filename` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_float` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_hex_number` **(** :ref:`bool` with_prefix=false **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_html_color` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_identifier` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_int` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid_ip_address` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`join` **(** :ref:`PackedStringArray` parts **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`json_escape` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`left` **(** :ref:`int` position **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`length` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`lpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`lstrip` **(** :ref:`String` chars **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`md5_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`md5_text` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num` **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`num_scientific` **(** :ref:`float` number **)** |static| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`pad_decimals` **(** :ref:`int` digits **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`plus_file` **(** :ref:`String` file **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`right` **(** :ref:`int` position **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`rsplit` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`rstrip` **(** :ref:`String` chars **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`sha1_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sha1_text` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`sha256_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`sha256_text` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`similarity` **(** :ref:`String` text **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`simplify_path` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`split` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedFloat32Array` | :ref:`split_floats` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_edges` **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`strip_escapes` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_ascii_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`to_float` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`to_int` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_lower` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`to_upper` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`unicode_at` **(** :ref:`int` at **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`uri_decode` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`uri_encode` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`validate_node_name` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xml_escape` **(** :ref:`bool` escape_quotes=false **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`xml_unescape` **(** **)** |const| | -+-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`begins_with` **(** :ref:`String` text **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`bigrams` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`bin_to_int` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`c_escape` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`c_unescape` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`capitalize` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`casecmp_to` **(** :ref:`String` to **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`chr` **(** :ref:`int` char **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`contains` **(** :ref:`String` what **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`count` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`countn` **(** :ref:`String` what, :ref:`int` from=0, :ref:`int` to=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`dedent` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`ends_with` **(** :ref:`String` text **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`find` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`findn` **(** :ref:`String` what, :ref:`int` from=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`format` **(** :ref:`Variant` values, :ref:`String` placeholder="{_}" **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_base_dir` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_basename` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_extension` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_file` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_slice` **(** :ref:`String` delimiter, :ref:`int` slice **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_slice_count` **(** :ref:`String` delimiter **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_slicec` **(** :ref:`int` delimiter, :ref:`int` slice **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`hex_to_int` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`indent` **(** :ref:`String` prefix **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`insert` **(** :ref:`int` position, :ref:`String` what **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_absolute_path` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_empty` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_relative_path` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_subsequence_of` **(** :ref:`String` text **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_subsequence_ofn` **(** :ref:`String` text **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_filename` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_float` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_hex_number` **(** :ref:`bool` with_prefix=false **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_html_color` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_identifier` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_int` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid_ip_address` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`join` **(** :ref:`PackedStringArray` parts **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`json_escape` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`left` **(** :ref:`int` position **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`length` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`lpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`lstrip` **(** :ref:`String` chars **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`match` **(** :ref:`String` expr **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`matchn` **(** :ref:`String` expr **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`md5_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`md5_text` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`naturalnocasecmp_to` **(** :ref:`String` to **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`nocasecmp_to` **(** :ref:`String` to **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`num` **(** :ref:`float` number, :ref:`int` decimals=-1 **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`num_int64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`num_scientific` **(** :ref:`float` number **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`num_uint64` **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`pad_decimals` **(** :ref:`int` digits **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`pad_zeros` **(** :ref:`int` digits **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`plus_file` **(** :ref:`String` file **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`right` **(** :ref:`int` position **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`rpad` **(** :ref:`int` min_length, :ref:`String` character=" " **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`rsplit` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`rstrip` **(** :ref:`String` chars **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`sha1_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sha1_text` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`sha256_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`sha256_text` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`similarity` **(** :ref:`String` text **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`simplify_path` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`split` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true, :ref:`int` maxsplit=0 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedFloat32Array` | :ref:`split_floats` **(** :ref:`String` delimiter, :ref:`bool` allow_empty=true **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`strip_edges` **(** :ref:`bool` left=true, :ref:`bool` right=true **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`strip_escapes` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`substr` **(** :ref:`int` from, :ref:`int` len=-1 **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`to_ascii_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`to_float` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`to_int` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_lower` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`to_upper` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`to_utf16_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`to_utf32_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedByteArray` | :ref:`to_utf8_buffer` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`trim_prefix` **(** :ref:`String` prefix **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`trim_suffix` **(** :ref:`String` suffix **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`unicode_at` **(** :ref:`int` at **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`uri_decode` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`uri_encode` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`validate_node_name` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`xml_escape` **(** :ref:`bool` escape_quotes=false **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`xml_unescape` **(** **)** |const| | ++-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Operators --------- -+-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ @@ -239,12 +241,12 @@ Operators +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`operator +` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`operator +` **(** :ref:`int` right **)** | ++-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | +-----------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | @@ -663,7 +665,6 @@ Returns ``true`` if this string contains a valid float. This is inclusive of int print("1.7".is_valid_float()) # Prints "true" print("24".is_valid_float()) # Prints "true" print("7e3".is_valid_float()) # Prints "true" - print("24".is_valid_float()) # Prints "true" print("Hello".is_valid_float()) # Prints "false" ---- @@ -882,12 +883,28 @@ Some examples: ---- +.. _class_String_method_num_int64: + +- :ref:`String` **num_int64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| + +Converts a signed :ref:`int` to a string representation of a number. + +---- + .. _class_String_method_num_scientific: - :ref:`String` **num_scientific** **(** :ref:`float` number **)** |static| ---- +.. _class_String_method_num_uint64: + +- :ref:`String` **num_uint64** **(** :ref:`int` number, :ref:`int` base=10, :ref:`bool` capitalize_hex=false **)** |static| + +Converts a unsigned :ref:`int` to a string representation of a number. + +---- + .. _class_String_method_pad_decimals: - :ref:`String` **pad_decimals** **(** :ref:`int` digits **)** |const| @@ -995,8 +1012,8 @@ Example: 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" + print(some_array[0]) # Prints "One,Two,Three" + print(some_array[1]) # Prints "Four" .. code-tab:: csharp @@ -1052,7 +1069,7 @@ Returns the SHA-256 hash of the string as a string. - :ref:`float` **similarity** **(** :ref:`String` text **)** |const| -Returns the similarity index (`Sorensen-Dice coefficient `__) this string compared to another. 1.0 means totally similar and 0.0 means totally dissimilar. +Returns the similarity index (`Sorensen-Dice coefficient `__) of this string compared to another. A result of 1.0 means totally similar, while 0.0 means totally dissimilar. :: @@ -1311,10 +1328,6 @@ Operator Descriptions .. _class_String_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`String` right **)** ---- @@ -1335,6 +1348,10 @@ Operator Descriptions ---- +- :ref:`String` **operator +** **(** :ref:`int` right **)** + +---- + .. _class_String_operator_lt_bool: - :ref:`bool` **operator <** **(** :ref:`String` right **)** @@ -1349,10 +1366,6 @@ Operator Descriptions .. _class_String_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`String` right **)** ---- diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 7c863fff5..8b4c966c4 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -14,7 +14,11 @@ An optimized string type for unique names. Description ----------- -``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 :ref:`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 (also called "string interning"). ``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 :ref:`String`\ s, because only the pointers are compared, not the whole strings. + +You will usually just pass a :ref:`String` to methods expecting a ``StringName`` and it will be automatically converted, but you may occasionally want to construct a ``StringName`` ahead of time with ``StringName`` or the literal syntax ``&"example"``. + +See also :ref:`NodePath`, which is a similar concept specifically designed to store pre-parsed node paths. Constructors ------------ @@ -27,11 +31,16 @@ Constructors | :ref:`StringName` | :ref:`StringName` **(** :ref:`String` from **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ +Methods +------- + ++-----------------------+---------------------------------------------------------------+ +| :ref:`int` | :ref:`hash` **(** **)** |const| | ++-----------------------+---------------------------------------------------------------+ + Operators --------- -+-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ @@ -41,8 +50,6 @@ Operators +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | @@ -71,17 +78,22 @@ Constructs a ``StringName`` as a copy of the given ``StringName``. - :ref:`StringName` **StringName** **(** :ref:`String` from **)** -Creates a new ``StringName`` from the given :ref:`String`. +Creates a new ``StringName`` from the given :ref:`String`. ``StringName("example")`` is equivalent to ``&"example"``. + +Method Descriptions +------------------- + +.. _class_StringName_method_hash: + +- :ref:`int` **hash** **(** **)** |const| + +Returns the 32-bit hash value representing the ``StringName``'s contents. Operator Descriptions --------------------- .. _class_StringName_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`String` right **)** ---- @@ -104,10 +116,6 @@ Operator Descriptions .. _class_StringName_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`String` right **)** ---- diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 105771b7c..d41a055fb 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -25,15 +25,15 @@ StyleBox is :ref:`Resource` that provides an abstract base class Properties ---------- -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_bottom` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_left` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_right` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ -| :ref:`float` | :ref:`content_margin_top` | ``-1.0`` | -+---------------------------+-----------------------------------------------------------------------------+----------+ ++---------------------------+-----------------------------------------------------------------------------+ +| :ref:`float` | :ref:`content_margin_bottom` | ++---------------------------+-----------------------------------------------------------------------------+ +| :ref:`float` | :ref:`content_margin_left` | ++---------------------------+-----------------------------------------------------------------------------+ +| :ref:`float` | :ref:`content_margin_right` | ++---------------------------+-----------------------------------------------------------------------------+ +| :ref:`float` | :ref:`content_margin_top` | ++---------------------------+-----------------------------------------------------------------------------+ Methods ------- @@ -75,13 +75,11 @@ Property Descriptions - :ref:`float` **content_margin_bottom** -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ ++----------+---------------------------+ +| *Setter* | set_default_margin(value) | ++----------+---------------------------+ +| *Getter* | get_default_margin() | ++----------+---------------------------+ The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. @@ -97,13 +95,11 @@ It is up to the code using this style box to decide what these contents are: for - :ref:`float` **content_margin_left** -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ ++----------+---------------------------+ +| *Setter* | set_default_margin(value) | ++----------+---------------------------+ +| *Getter* | get_default_margin() | ++----------+---------------------------+ The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. @@ -115,13 +111,11 @@ Refer to :ref:`content_margin_bottom` **content_margin_right** -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ ++----------+---------------------------+ +| *Setter* | set_default_margin(value) | ++----------+---------------------------+ +| *Getter* | get_default_margin() | ++----------+---------------------------+ The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. @@ -133,13 +127,11 @@ Refer to :ref:`content_margin_bottom` **content_margin_top** -+-----------+---------------------------+ -| *Default* | ``-1.0`` | -+-----------+---------------------------+ -| *Setter* | set_default_margin(value) | -+-----------+---------------------------+ -| *Getter* | get_default_margin() | -+-----------+---------------------------+ ++----------+---------------------------+ +| *Setter* | set_default_margin(value) | ++----------+---------------------------+ +| *Getter* | get_default_margin() | ++----------+---------------------------+ The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 05d701ce4..6ec2ddd4a 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -89,6 +89,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`int` | :ref:`shadow_size` | ``0`` | +-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ +| :ref:`Vector2` | :ref:`skew` | ``Vector2(0, 0)`` | ++-------------------------------+-------------------------------------------------------------------------------------------+-----------------------------+ Methods ------- @@ -134,7 +136,7 @@ Property Descriptions | *Getter* | is_anti_aliased() | +-----------+-------------------------+ -Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners. +Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or :ref:`skew`. \ **Note:** When using beveled corners with 45-degree angles (:ref:`corner_detail` = 1), it is recommended to set :ref:`anti_aliasing` to ``false`` to ensure crisp visuals and avoid possible visual glitches. @@ -382,6 +384,8 @@ Toggles drawing of the inner part of the stylebox. Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom` to draw a border outside the control rect. +\ **Note:** Unlike :ref:`StyleBox.content_margin_bottom`, :ref:`expand_margin_bottom` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. + ---- .. _class_StyleBoxFlat_property_expand_margin_left: @@ -398,6 +402,8 @@ Expands the stylebox outside of the control rect on the bottom edge. Useful in c Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left` to draw a border outside the control rect. +\ **Note:** Unlike :ref:`StyleBox.content_margin_left`, :ref:`expand_margin_left` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. + ---- .. _class_StyleBoxFlat_property_expand_margin_right: @@ -414,6 +420,8 @@ Expands the stylebox outside of the control rect on the left edge. Useful in com Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right` to draw a border outside the control rect. +\ **Note:** Unlike :ref:`StyleBox.content_margin_right`, :ref:`expand_margin_right` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. + ---- .. _class_StyleBoxFlat_property_expand_margin_top: @@ -430,6 +438,8 @@ Expands the stylebox outside of the control rect on the right edge. Useful in co Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top` to draw a border outside the control rect. +\ **Note:** Unlike :ref:`StyleBox.content_margin_top`, :ref:`expand_margin_top` does *not* affect the size of the clickable area for :ref:`Control`\ s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks. + ---- .. _class_StyleBoxFlat_property_shadow_color: @@ -478,6 +488,24 @@ The shadow offset in pixels. Adjusts the position of the shadow relatively to th The shadow size in pixels. +---- + +.. _class_StyleBoxFlat_property_skew: + +- :ref:`Vector2` **skew** + ++-----------+-------------------+ +| *Default* | ``Vector2(0, 0)`` | ++-----------+-------------------+ +| *Setter* | set_skew(value) | ++-----------+-------------------+ +| *Getter* | get_skew() | ++-----------+-------------------+ + +If set to a non-zero value on either axis, :ref:`skew` distorts the StyleBox horizontally and/or vertically. This can be used for "futuristic"-style UIs. Positive values skew the StyleBox towards the right (X axis) and upwards (Y axis), while negative values skew the StyleBox towards the left (X axis) and downwards (Y axis). + +\ **Note:** To ensure text does not touch the StyleBox's edges, consider increasing the :ref:`StyleBox`'s content margin (see :ref:`StyleBox.content_margin_bottom`). It is preferable to increase the content margin instead of the expand margin (see :ref:`expand_margin_bottom`), as increasing the expand margin does not increase the size of the clickable area for :ref:`Control`\ s. + Method Descriptions ------------------- diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index 95af62bf6..3c9dd274c 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -36,7 +36,7 @@ Properties +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`select_with_rmb` | ``false`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``1`` | +| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`CloseButtonDisplayPolicy` | :ref:`tab_close_display_policy` | ``0`` | +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ @@ -105,6 +105,8 @@ Methods Theme Properties ---------------- ++-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ @@ -114,7 +116,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_unselected_color` | ``Color(0.7, 0.7, 0.7, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | +| :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ @@ -128,6 +130,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`decrement_highlight` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Texture2D` | :ref:`drop_mark` | | ++-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`increment` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`increment_highlight` | | @@ -388,7 +392,7 @@ If ``true``, enables selecting a tab with the right mouse button. - :ref:`AlignmentMode` **tab_alignment** +-----------+--------------------------+ -| *Default* | ``1`` | +| *Default* | ``0`` | +-----------+--------------------------+ | *Setter* | set_tab_alignment(value) | +-----------+--------------------------+ @@ -659,6 +663,18 @@ Sets a ``title`` for the tab at index ``tab_idx``. Theme Property Descriptions --------------------------- +.. _class_TabBar_theme_color_drop_mark_color: + +- :ref:`Color` **drop_mark_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +Modulation color for the :ref:`drop_mark` icon. + +---- + .. _class_TabBar_theme_color_font_disabled_color: - :ref:`Color` **font_disabled_color** @@ -707,9 +723,9 @@ Font color of the other, unselected tabs. ---- -.. _class_TabBar_theme_constant_hseparation: +.. _class_TabBar_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -771,6 +787,14 @@ Icon for the left arrow button that appears when there are too many tabs to fit ---- +.. _class_TabBar_theme_icon_drop_mark: + +- :ref:`Texture2D` **drop_mark** + +Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled`). + +---- + .. _class_TabBar_theme_icon_increment: - :ref:`Texture2D` **increment** diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 1608e5738..f5090ea77 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -22,6 +22,11 @@ Ignores non-:ref:`Control` children. \ **Note:** The drawing of the clickable tabs themselves is handled by this node. Adding :ref:`TabBar`\ s as children is not needed. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Properties ---------- @@ -34,7 +39,7 @@ Properties +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``1`` | +| :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ @@ -46,43 +51,49 @@ Properties Methods ------- -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_current_tab_control` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Popup` | :ref:`get_popup` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_count` **(** **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_popup` **(** :ref:`Node` popup **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | -+-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_current_tab_control` **(** **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Popup` | :ref:`get_popup` **(** **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_count` **(** **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture2D` | :ref:`get_tab_icon` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_idx_at_point` **(** :ref:`Vector2` point **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_tab_idx_from_control` **(** :ref:`Control` control **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_tab_title` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_tab_disabled` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_popup` **(** :ref:`Node` popup **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_hidden` **(** :ref:`int` tab_idx, :ref:`bool` hidden **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_tab_title` **(** :ref:`int` tab_idx, :ref:`String` title **)** | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- ++-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Color` | :ref:`drop_mark_color` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ @@ -106,6 +117,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`decrement_highlight` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ +| :ref:`Texture2D` | :ref:`drop_mark` | | ++-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`increment` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Texture2D` | :ref:`increment_highlight` | | @@ -134,6 +147,14 @@ Emitted when the ``TabContainer``'s :ref:`Popup` button is clicked. ---- +.. _class_TabContainer_signal_tab_button_pressed: + +- **tab_button_pressed** **(** :ref:`int` tab **)** + +Emitted when the user clicks on the button icon on this tab. + +---- + .. _class_TabContainer_signal_tab_changed: - **tab_changed** **(** :ref:`int` tab **)** @@ -220,7 +241,7 @@ If ``true``, tabs can be rearranged with mouse drag. - :ref:`AlignmentMode` **tab_alignment** +-----------+--------------------------+ -| *Default* | ``1`` | +| *Default* | ``0`` | +-----------+--------------------------+ | *Setter* | set_tab_alignment(value) | +-----------+--------------------------+ @@ -308,6 +329,14 @@ Returns the previously active tab index. ---- +.. _class_TabContainer_method_get_tab_button_icon: + +- :ref:`Texture2D` **get_tab_button_icon** **(** :ref:`int` tab_idx **)** |const| + +Returns the button icon from the tab at index ``tab_idx``. + +---- + .. _class_TabContainer_method_get_tab_control: - :ref:`Control` **get_tab_control** **(** :ref:`int` tab_idx **)** |const| @@ -380,6 +409,14 @@ If set on a :ref:`Popup` node instance, a popup menu icon appears i ---- +.. _class_TabContainer_method_set_tab_button_icon: + +- void **set_tab_button_icon** **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** + +Sets the button icon from the tab at index ``tab_idx``. + +---- + .. _class_TabContainer_method_set_tab_disabled: - void **set_tab_disabled** **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** @@ -413,6 +450,18 @@ Sets a custom title for the tab at index ``tab_idx`` (tab titles default to the Theme Property Descriptions --------------------------- +.. _class_TabContainer_theme_color_drop_mark_color: + +- :ref:`Color` **drop_mark_color** + ++-----------+-----------------------+ +| *Default* | ``Color(1, 1, 1, 1)`` | ++-----------+-----------------------+ + +Modulation color for the :ref:`drop_mark` icon. + +---- + .. _class_TabContainer_theme_color_font_disabled_color: - :ref:`Color` **font_disabled_color** @@ -531,6 +580,14 @@ Icon for the left arrow button that appears when there are too many tabs to fit ---- +.. _class_TabContainer_theme_icon_drop_mark: + +- :ref:`Texture2D` **drop_mark** + +Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled`). + +---- + .. _class_TabContainer_theme_icon_increment: - :ref:`Texture2D` **increment** diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 3232b658b..c1858986a 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -25,77 +25,77 @@ TextEdit is meant for editing large, multiline text. It also has facilities for Properties ---------- -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_blink` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`caret_blink_speed` | ``0.65`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CaretType` | :ref:`caret_type` | ``0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_control_chars` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_spaces` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`draw_tabs` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`editable` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`highlight_current_line` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`language` | ``""`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`minimap_draw` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`minimap_width` | ``80`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`override_selected_font_color` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`placeholder_text` | ``""`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`scroll_smooth` | ``false`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`selecting_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`text` | ``""`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ -| :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | -+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`caret_blink` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`caret_blink_speed` | ``0.65`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`caret_mid_grapheme` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`caret_move_on_right_click` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`CaretType` | :ref:`caret_type` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`context_menu_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`deselect_on_focus_loss_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`draw_control_chars` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`draw_spaces` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`draw_tabs` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`editable` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`highlight_all_occurrences` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`highlight_current_line` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`language` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`middle_mouse_paste_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`minimap_draw` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`minimap_width` | ``80`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`CursorShape` | mouse_default_cursor_shape | ``1`` (overrides :ref:`Control`) | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`override_selected_font_color` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`placeholder_text` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`scroll_horizontal` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_past_end_of_file` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`scroll_smooth` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`scroll_v_scroll_speed` | ``80.0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`scroll_vertical` | ``0.0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`selecting_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shortcut_keys_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`SyntaxHighlighter` | :ref:`syntax_highlighter` | | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`text` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`TextDirection` | :ref:`text_direction` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`virtual_keyboard_enabled` | ``true`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ +| :ref:`LineWrappingMode` | :ref:`wrap_mode` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ Methods ------- @@ -1110,7 +1110,7 @@ If ``true``, shortcut keys for context menu items are enabled, even if the conte .. _class_TextEdit_property_structured_text_bidi_override: -- :ref:`StructuredTextParser` **structured_text_bidi_override** +- :ref:`StructuredTextParser` **structured_text_bidi_override** +-----------+------------------------------------------+ | *Default* | ``0`` | diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst new file mode 100644 index 000000000..f13743d1d --- /dev/null +++ b/classes/class_textmesh.rst @@ -0,0 +1,304 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the TextMesh.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_TextMesh: + +TextMesh +======== + +**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Generate an :ref:`PrimitiveMesh` from the text. + +Description +----------- + +Generate an :ref:`PrimitiveMesh` from the text. + +TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported. + +The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges. + +Properties +---------- + ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`curve_step` | ``0.5`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`depth` | ``0.05`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`Font` | :ref:`font` | | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`int` | :ref:`font_size` | ``16`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`language` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`pixel_size` | ``0.01`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`StructuredTextParser` | :ref:`structured_text_bidi_override` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`Array` | :ref:`structured_text_bidi_override_options` | ``[]`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`String` | :ref:`text` | ``""`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`Direction` | :ref:`text_direction` | ``0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`uppercase` | ``false`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`width` | ``500.0`` | ++-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-----------+ + +Methods +------- + ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear_opentype_features` **(** **)** | ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_opentype_feature` **(** :ref:`String` tag **)** |const| | ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_opentype_feature` **(** :ref:`String` tag, :ref:`int` value **)** | ++-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +Property Descriptions +--------------------- + +.. _class_TextMesh_property_curve_step: + +- :ref:`float` **curve_step** + ++-----------+-----------------------+ +| *Default* | ``0.5`` | ++-----------+-----------------------+ +| *Setter* | set_curve_step(value) | ++-----------+-----------------------+ +| *Getter* | get_curve_step() | ++-----------+-----------------------+ + +Step (in pixels) used to approximate Bézier curves. + +---- + +.. _class_TextMesh_property_depth: + +- :ref:`float` **depth** + ++-----------+------------------+ +| *Default* | ``0.05`` | ++-----------+------------------+ +| *Setter* | set_depth(value) | ++-----------+------------------+ +| *Getter* | get_depth() | ++-----------+------------------+ + +Depths of the mesh, if set to ``0.0`` only front surface, is generated, and UV layout is changed to use full texture for the front face only. + +---- + +.. _class_TextMesh_property_font: + +- :ref:`Font` **font** + ++----------+-----------------+ +| *Setter* | set_font(value) | ++----------+-----------------+ +| *Getter* | get_font() | ++----------+-----------------+ + +:ref:`Font` used for the ``TextMesh``'s text. + +---- + +.. _class_TextMesh_property_font_size: + +- :ref:`int` **font_size** + ++-----------+----------------------+ +| *Default* | ``16`` | ++-----------+----------------------+ +| *Setter* | set_font_size(value) | ++-----------+----------------------+ +| *Getter* | get_font_size() | ++-----------+----------------------+ + +Font size of the ``TextMesh``'s text. + +---- + +.. _class_TextMesh_property_horizontal_alignment: + +- :ref:`HorizontalAlignment` **horizontal_alignment** + ++-----------+---------------------------------+ +| *Default* | ``1`` | ++-----------+---------------------------------+ +| *Setter* | set_horizontal_alignment(value) | ++-----------+---------------------------------+ +| *Getter* | get_horizontal_alignment() | ++-----------+---------------------------------+ + +Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment` constants. + +---- + +.. _class_TextMesh_property_language: + +- :ref:`String` **language** + ++-----------+---------------------+ +| *Default* | ``""`` | ++-----------+---------------------+ +| *Setter* | set_language(value) | ++-----------+---------------------+ +| *Getter* | get_language() | ++-----------+---------------------+ + +Language code used for text shaping algorithms, if left empty current locale is used instead. + +---- + +.. _class_TextMesh_property_pixel_size: + +- :ref:`float` **pixel_size** + ++-----------+-----------------------+ +| *Default* | ``0.01`` | ++-----------+-----------------------+ +| *Setter* | set_pixel_size(value) | ++-----------+-----------------------+ +| *Getter* | get_pixel_size() | ++-----------+-----------------------+ + +The size of one pixel's width on the text to scale it in 3D. + +---- + +.. _class_TextMesh_property_structured_text_bidi_override: + +- :ref:`StructuredTextParser` **structured_text_bidi_override** + ++-----------+------------------------------------------+ +| *Default* | ``0`` | ++-----------+------------------------------------------+ +| *Setter* | set_structured_text_bidi_override(value) | ++-----------+------------------------------------------+ +| *Getter* | get_structured_text_bidi_override() | ++-----------+------------------------------------------+ + +Set BiDi algorithm override for the structured text. + +---- + +.. _class_TextMesh_property_structured_text_bidi_override_options: + +- :ref:`Array` **structured_text_bidi_override_options** + ++-----------+--------------------------------------------------+ +| *Default* | ``[]`` | ++-----------+--------------------------------------------------+ +| *Setter* | set_structured_text_bidi_override_options(value) | ++-----------+--------------------------------------------------+ +| *Getter* | get_structured_text_bidi_override_options() | ++-----------+--------------------------------------------------+ + +Set additional options for BiDi override. + +---- + +.. _class_TextMesh_property_text: + +- :ref:`String` **text** + ++-----------+-----------------+ +| *Default* | ``""`` | ++-----------+-----------------+ +| *Setter* | set_text(value) | ++-----------+-----------------+ +| *Getter* | get_text() | ++-----------+-----------------+ + +The text to generate mesh from. + +---- + +.. _class_TextMesh_property_text_direction: + +- :ref:`Direction` **text_direction** + ++-----------+---------------------------+ +| *Default* | ``0`` | ++-----------+---------------------------+ +| *Setter* | set_text_direction(value) | ++-----------+---------------------------+ +| *Getter* | get_text_direction() | ++-----------+---------------------------+ + +Base text writing direction. + +---- + +.. _class_TextMesh_property_uppercase: + +- :ref:`bool` **uppercase** + ++-----------+----------------------+ +| *Default* | ``false`` | ++-----------+----------------------+ +| *Setter* | set_uppercase(value) | ++-----------+----------------------+ +| *Getter* | is_uppercase() | ++-----------+----------------------+ + +If ``true``, all the text displays as UPPERCASE. + +---- + +.. _class_TextMesh_property_width: + +- :ref:`float` **width** + ++-----------+------------------+ +| *Default* | ``500.0`` | ++-----------+------------------+ +| *Setter* | set_width(value) | ++-----------+------------------+ +| *Getter* | get_width() | ++-----------+------------------+ + +Text width (in pixels), used for fill alignment. + +Method Descriptions +------------------- + +.. _class_TextMesh_method_clear_opentype_features: + +- void **clear_opentype_features** **(** **)** + +Removes all OpenType features. + +---- + +.. _class_TextMesh_method_get_opentype_feature: + +- :ref:`int` **get_opentype_feature** **(** :ref:`String` tag **)** |const| + +Returns OpenType feature ``tag``. + +---- + +.. _class_TextMesh_method_set_opentype_feature: + +- void **set_opentype_feature** **(** :ref:`String` tag, :ref:`int` value **)** + +Returns OpenType feature ``tag``. More info: `OpenType feature tags `__. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 7b6dec250..2c00645e0 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -11,7 +11,7 @@ TextServer **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`TextServerAdvanced`, :ref:`TextServerExtension`, :ref:`TextServerFallback` +**Inherited By:** :ref:`TextServerExtension` Interface for the fonts and complex text layouts. @@ -50,6 +50,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |const| | @@ -66,6 +68,10 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Hinting` | :ref:`font_get_hinting` **(** :ref:`RID` font_rid **)** |const| | @@ -162,6 +168,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_global_oversampling` **(** :ref:`float` oversampling **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** | @@ -246,6 +254,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`parse_number` **(** :ref:`String` number, :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`save_support_data` **(** :ref:`String` filename **)** |const| | @@ -324,7 +334,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_get_width` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |const| | +| :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`int` grapheme_flags=264 **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -360,6 +370,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | ++-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`string_to_upper` **(** :ref:`String` string, :ref:`String` language="" **)** |const| | @@ -570,26 +582,36 @@ enum **Hinting**: .. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER: +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE: + +.. _class_TextServer_constant_SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE: + enum **SubpixelPositioning**: - **SUBPIXEL_POSITIONING_DISABLED** = **0** --- Glyph horizontal position is rounded to the whole pixel size, each glyph is rasterized once. - **SUBPIXEL_POSITIONING_AUTO** = **1** --- Glyph horizontal position is rounded based on font size. -- To one quarter of the pixel size if font size is smaller or equal to ``16``. + - To one quarter of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE`. -- To one half of the pixel size if font size is smaller or equal to ``20``. + - To one half of the pixel size if font size is smaller or equal to :ref:`SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE`. -- To the whole pixel size for larger fonts. + - To the whole pixel size for larger fonts. - **SUBPIXEL_POSITIONING_ONE_HALF** = **2** --- Glyph horizontal position is rounded to one half of the pixel size, each glyph is rasterized up to two times. - **SUBPIXEL_POSITIONING_ONE_QUARTER** = **3** --- Glyph horizontal position is rounded to one quarter of the pixel size, each glyph is rasterized up to four times. +- **SUBPIXEL_POSITIONING_ONE_HALF_MAX_SIZE** = **20** --- Maximum font size which will use one half of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. + +- **SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE** = **16** --- Maximum font size which will use one quarter of the pixel subpixel positioning in :ref:`SUBPIXEL_POSITIONING_AUTO` mode. + ---- .. _enum_TextServer_Feature: +.. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT: + .. _class_TextServer_constant_FEATURE_BIDI_LAYOUT: .. _class_TextServer_constant_FEATURE_VERTICAL_LAYOUT: @@ -600,6 +622,12 @@ enum **SubpixelPositioning**: .. _class_TextServer_constant_FEATURE_BREAK_ITERATORS: +.. _class_TextServer_constant_FEATURE_FONT_BITMAP: + +.. _class_TextServer_constant_FEATURE_FONT_DYNAMIC: + +.. _class_TextServer_constant_FEATURE_FONT_MSDF: + .. _class_TextServer_constant_FEATURE_FONT_SYSTEM: .. _class_TextServer_constant_FEATURE_FONT_VARIABLE: @@ -610,23 +638,31 @@ enum **SubpixelPositioning**: enum **Feature**: -- **FEATURE_BIDI_LAYOUT** = **1** --- TextServer supports bidirectional layouts. +- **FEATURE_SIMPLE_LAYOUT** = **1** --- TextServer supports simple text layouts. -- **FEATURE_VERTICAL_LAYOUT** = **2** --- TextServer supports vertical layouts. +- **FEATURE_BIDI_LAYOUT** = **2** --- TextServer supports bidirectional text layouts. -- **FEATURE_SHAPING** = **4** --- TextServer supports complex text shaping. +- **FEATURE_VERTICAL_LAYOUT** = **4** --- TextServer supports vertical layouts. -- **FEATURE_KASHIDA_JUSTIFICATION** = **8** --- TextServer supports justification using kashidas. +- **FEATURE_SHAPING** = **8** --- TextServer supports complex text shaping. -- **FEATURE_BREAK_ITERATORS** = **16** --- TextServer supports complex line/word breaking rules (e.g. dictionary based). +- **FEATURE_KASHIDA_JUSTIFICATION** = **16** --- TextServer supports justification using kashidas. -- **FEATURE_FONT_SYSTEM** = **32** --- TextServer supports loading system fonts. +- **FEATURE_BREAK_ITERATORS** = **32** --- TextServer supports complex line/word breaking rules (e.g. dictionary based). -- **FEATURE_FONT_VARIABLE** = **64** --- TextServer supports variable fonts. +- **FEATURE_FONT_BITMAP** = **64** --- TextServer supports loading bitmap fonts. -- **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = **128** --- TextServer supports locale dependent and context sensitive case conversion. +- **FEATURE_FONT_DYNAMIC** = **128** --- TextServer supports loading dynamic (TrueType, OpeType, etc.) fonts. -- **FEATURE_USE_SUPPORT_DATA** = **256** --- TextServer require external data file for some features. +- **FEATURE_FONT_MSDF** = **256** --- TextServer supports multichannel signed distance field dynamic font rendering. + +- **FEATURE_FONT_SYSTEM** = **512** --- TextServer supports loading system fonts. + +- **FEATURE_FONT_VARIABLE** = **1024** --- TextServer supports variable fonts. + +- **FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION** = **2048** --- TextServer supports locale dependent and context sensitive case conversion. + +- **FEATURE_USE_SUPPORT_DATA** = **4096** --- TextServer require external data file for some features. ---- @@ -686,6 +722,42 @@ enum **FontStyle**: - **FONT_FIXED_WIDTH** = **4** --- Font have fixed-width characters. +---- + +.. _enum_TextServer_StructuredTextParser: + +.. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT: + +.. _class_TextServer_constant_STRUCTURED_TEXT_URI: + +.. _class_TextServer_constant_STRUCTURED_TEXT_FILE: + +.. _class_TextServer_constant_STRUCTURED_TEXT_EMAIL: + +.. _class_TextServer_constant_STRUCTURED_TEXT_LIST: + +.. _class_TextServer_constant_STRUCTURED_TEXT_NONE: + +.. _class_TextServer_constant_STRUCTURED_TEXT_CUSTOM: + +enum **StructuredTextParser**: + +- **STRUCTURED_TEXT_DEFAULT** = **0** --- Use default behavior. Same as ``STRUCTURED_TEXT_NONE`` unless specified otherwise in the control description. + +- **STRUCTURED_TEXT_URI** = **1** --- BiDi override for URI. + +- **STRUCTURED_TEXT_FILE** = **2** --- BiDi override for file path. + +- **STRUCTURED_TEXT_EMAIL** = **3** --- BiDi override for email. + +- **STRUCTURED_TEXT_LIST** = **4** --- BiDi override for lists. + +Structured text options: list separator ``String``. + +- **STRUCTURED_TEXT_NONE** = **5** --- Use default Unicode BiDi algorithm. + +- **STRUCTURED_TEXT_CUSTOM** = **6** --- User defined structured text BiDi override function. + Method Descriptions ------------------- @@ -739,7 +811,7 @@ Removes all kerning overrides. - void **font_clear_size_cache** **(** :ref:`RID` font_rid **)** -Removes all font sizes from the cache entry +Removes all font sizes from the cache entry. ---- @@ -761,6 +833,8 @@ Draws single glyph into a canvas item at the position, using ``font_rid`` at the \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs` or :ref:`font_get_glyph_index`. +\ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. + ---- .. _class_TextServer_method_font_draw_glyph_outline: @@ -771,6 +845,8 @@ Draws single glyph outline of size ``outline_size`` into a canvas item at the po \ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`shaped_text_get_glyphs` or :ref:`font_get_glyph_index`. +\ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. + ---- .. _class_TextServer_method_font_get_ascent: @@ -805,6 +881,14 @@ Returns bitmap font fixed size. ---- +.. _class_TextServer_method_font_get_generate_mipmaps: + +- :ref:`bool` **font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |const| + +Returns ``true`` if font texture mipmap generation is enabled. + +---- + .. _class_TextServer_method_font_get_global_oversampling: - :ref:`float` **font_get_global_oversampling** **(** **)** |const| @@ -877,6 +961,26 @@ Returns index of the cache texture containing the glyph. ---- +.. _class_TextServer_method_font_get_glyph_texture_rid: + +- :ref:`RID` **font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| + +Returns resource id of the cache texture containing the glyph. + +\ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. + +---- + +.. _class_TextServer_method_font_get_glyph_texture_size: + +- :ref:`Vector2` **font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| + +Returns size of the cache texture containing the glyph. + +\ **Note:** If there are pending glyphs to render, calling this function might trigger the texture cache update. + +---- + .. _class_TextServer_method_font_get_glyph_uv_rect: - :ref:`Rect2` **font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |const| @@ -1197,7 +1301,7 @@ Removes specified texture from font cache entry. - void **font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** -Renders specified glyph the the font cache texture. +Renders specified glyph to the font cache texture. ---- @@ -1265,6 +1369,14 @@ If set to ``true`` auto-hinting is preferred over font built-in hinting. ---- +.. _class_TextServer_method_font_set_generate_mipmaps: + +- void **font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** + +If set to ``true`` font texture mipmap generation is enabled. + +---- + .. _class_TextServer_method_font_set_global_oversampling: - void **font_set_global_oversampling** **(** :ref:`float` oversampling **)** @@ -1611,6 +1723,14 @@ Converts a number from the numeral systems used in ``language`` to Western Arabi ---- +.. _class_TextServer_method_parse_structured_text: + +- :ref:`Array` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |const| + +Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser` for more info. + +---- + .. _class_TextServer_method_percent_sign: - :ref:`String` **percent_sign** **(** :ref:`String` language="" **)** |const| @@ -1789,7 +1909,7 @@ Returns number of glyphs in the buffer. - :ref:`Array` **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |const| -Returns text glyphs in the visual order. +Returns an array of glyphs in the visual order. ---- @@ -1853,7 +1973,7 @@ Returns text orientation. - :ref:`RID` **shaped_text_get_parent** **(** :ref:`RID` shaped **)** |const| -Sets text orientation. +Returns the parent buffer from which the substring originates. ---- @@ -1903,7 +2023,7 @@ Returns size of the text. - :ref:`int` **shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |const| -Returns position of the trim. +Returns the position of the overrun trim. ---- @@ -1933,9 +2053,9 @@ Returns width (for horizontal layout) or height (for vertical) of the text. .. _class_TextServer_method_shaped_text_get_word_breaks: -- :ref:`PackedInt32Array` **shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |const| +- :ref:`PackedInt32Array` **shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`int` grapheme_flags=264 **)** |const| -Breaks text into words and returns array of character ranges. +Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag`). ---- @@ -2083,6 +2203,14 @@ Aligns shaped text to the given tab-stops. ---- +.. _class_TextServer_method_string_get_word_breaks: + +- :ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language="" **)** |const| + +Returns array of the word break character offsets. + +---- + .. _class_TextServer_method_string_to_lower: - :ref:`String` **string_to_lower** **(** :ref:`String` string, :ref:`String` language="" **)** |const| @@ -2113,6 +2241,8 @@ Returns the string converted to uppercase. Strips diacritics from the string. +\ **Note:** The result may be longer or shorter than the original. + ---- .. _class_TextServer_method_tag_to_name: diff --git a/classes/class_textserveradvanced.rst b/classes/class_textserveradvanced.rst index 4998cbc01..815d0dbc1 100644 --- a/classes/class_textserveradvanced.rst +++ b/classes/class_textserveradvanced.rst @@ -9,7 +9,7 @@ TextServerAdvanced ================== -**Inherits:** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` Text Server using HarfBuzz, ICU and SIL Graphite to support BiDi, complex text layouts and contextual OpenType features. diff --git a/classes/class_textserverdummy.rst b/classes/class_textserverdummy.rst new file mode 100644 index 000000000..9950bba5a --- /dev/null +++ b/classes/class_textserverdummy.rst @@ -0,0 +1,21 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the TextServerDummy.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_TextServerDummy: + +TextServerDummy +=============== + +**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` + + + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 92220ddc3..8f7dd9c6f 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -11,6 +11,8 @@ TextServerExtension **Inherits:** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherited By:** :ref:`TextServerAdvanced`, :ref:`TextServerDummy`, :ref:`TextServerFallback` + Base class for TextServer custom implementations (plugins). Description @@ -21,496 +23,506 @@ External TextServer implementations should inherit from this class. Methods ------- -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_create_font` **(** **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`_font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Hinting` | :ref:`_font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedStringArray` | :ref:`_font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_spacing` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`SubpixelPositioning` | :ref:`_font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Image` | :ref:`_font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_antialiased` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_antialiased` **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_spacing` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_style` **(** :ref:`RID` font_rid, :ref:`int` style **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`_font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_free` **(** :ref:`RID` rid **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_get_features` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_support_data_filename` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_get_support_data_info` **(** **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has` **(** :ref:`RID` rid **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_load_support_data` **(** :ref:`String` filename **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_percent_sign` **(** :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`_shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` jst_flags **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`_shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Glyph* | :ref:`_shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Direction` | :ref:`_shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`int` break_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`int` break_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`_shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`_shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Orientation` | :ref:`_shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2i` | :ref:`_shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedVector2Array` | :ref:`_shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`_shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PackedInt32Array` | :ref:`_shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` trim_flags **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`_shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`_shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Glyph* | :ref:`_shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`RID` | :ref:`_shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`_shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`_tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | -+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`create_font` **(** **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Hinting` | :ref:`font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedStringArray` | :ref:`font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_spacing` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`SubpixelPositioning` | :ref:`font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Image` | :ref:`font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_is_antialiased` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_antialiased` **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_spacing` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_style` **(** :ref:`RID` font_rid, :ref:`int` style **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`free_rid` **(** :ref:`RID` rid **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_features` **(** **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_name` **(** **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_support_data_filename` **(** **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_support_data_info` **(** **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has` **(** :ref:`RID` rid **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`load_support_data` **(** :ref:`String` filename **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`percent_sign` **(** :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` jst_flags **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Direction` | :ref:`shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| const Glyph* | :ref:`shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| const Glyph* | :ref:`shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Direction` | :ref:`shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`int` break_flags **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`int` break_flags **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Rect2` | :ref:`shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Orientation` | :ref:`shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2i` | :ref:`shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedVector2Array` | :ref:`shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` trim_flags **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| const Glyph* | :ref:`shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`RID` | :ref:`shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PackedInt32Array` | :ref:`string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`strip_diacritics` **(** :ref:`String` string **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | ++-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- -.. _class_TextServerExtension_method__create_font: +.. _class_TextServerExtension_method_create_font: -- :ref:`RID` **_create_font** **(** **)** |virtual| +- :ref:`RID` **create_font** **(** **)** |virtual| -Creates new, empty font cache entry resource. To free the resulting resourec, use :ref:`_free` method. +Creates new, empty font cache entry resource. To free the resulting resourec, use :ref:`free_rid` method. ---- -.. _class_TextServerExtension_method__create_shaped_text: +.. _class_TextServerExtension_method_create_shaped_text: -- :ref:`RID` **_create_shaped_text** **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| +- :ref:`RID` **create_shaped_text** **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| -Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`_free` method. - -\ **Note:** Direction is ignored if server does not support ``FEATURE_BIDI_LAYOUT`` feature. - -\ **Note:** Orientation is ignored if server does not support ``FEATURE_VERTICAL_LAYOUT`` feature. +Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid` method. ---- -.. _class_TextServerExtension_method__draw_hex_code_box: +.. _class_TextServerExtension_method_draw_hex_code_box: -- void **_draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +- void **draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| Draws box displaying character hexadecimal code. Used for replacing missing characters. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__font_clear_glyphs: +.. _class_TextServerExtension_method_font_clear_glyphs: -- void **_font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +- void **font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| Removes all rendered glyphs information from the cache entry. -\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`_font_remove_texture` to remove them manually. - ---- -.. _class_TextServerExtension_method__font_clear_kerning_map: +.. _class_TextServerExtension_method_font_clear_kerning_map: -- void **_font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| +- void **font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| Removes all kerning overrides. ---- -.. _class_TextServerExtension_method__font_clear_size_cache: +.. _class_TextServerExtension_method_font_clear_size_cache: -- void **_font_clear_size_cache** **(** :ref:`RID` font_rid **)** |virtual| +- void **font_clear_size_cache** **(** :ref:`RID` font_rid **)** |virtual| -Removes all font sizes from the cache entry +Removes all font sizes from the cache entry. ---- -.. _class_TextServerExtension_method__font_clear_textures: +.. _class_TextServerExtension_method_font_clear_textures: -- void **_font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +- void **font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| Removes all textures from font cache entry. -\ **Note:** This function will not remove glyphs associated with the texture, use :ref:`_font_remove_glyph` to remove them manually. - ---- -.. _class_TextServerExtension_method__font_draw_glyph: +.. _class_TextServerExtension_method_font_draw_glyph: -- void **_font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +- void **font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. -\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`_shaped_text_get_glyphs` or :ref:`_font_get_glyph_index`. - ---- -.. _class_TextServerExtension_method__font_draw_glyph_outline: +.. _class_TextServerExtension_method_font_draw_glyph_outline: -- void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| +- void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. -\ **Note:** Glyph index is specific to the font, use glyphs indices returned by :ref:`_shaped_text_get_glyphs` or :ref:`_font_get_glyph_index`. - ---- -.. _class_TextServerExtension_method__font_get_ascent: +.. _class_TextServerExtension_method_font_get_ascent: -- :ref:`float` **_font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`float` **font_get_ascent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns the font ascent (number of pixels above the baseline). ---- -.. _class_TextServerExtension_method__font_get_descent: +.. _class_TextServerExtension_method_font_get_descent: -- :ref:`float` **_font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`float` **font_get_descent** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns the font descent (number of pixels below the baseline). ---- -.. _class_TextServerExtension_method__font_get_embolden: +.. _class_TextServerExtension_method_font_get_embolden: -- :ref:`float` **_font_get_embolden** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`float` **font_get_embolden** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font embolden strength. ---- -.. _class_TextServerExtension_method__font_get_fixed_size: +.. _class_TextServerExtension_method_font_get_fixed_size: -- :ref:`int` **_font_get_fixed_size** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`int` **font_get_fixed_size** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns bitmap font fixed size. ---- -.. _class_TextServerExtension_method__font_get_global_oversampling: +.. _class_TextServerExtension_method_font_get_generate_mipmaps: -- :ref:`float` **_font_get_global_oversampling** **(** **)** |virtual| |const| +- :ref:`bool` **font_get_generate_mipmaps** **(** :ref:`RID` font_rid **)** |virtual| |const| + +Returns ``true`` if font texture mipmap generation is enabled. + +---- + +.. _class_TextServerExtension_method_font_get_global_oversampling: + +- :ref:`float` **font_get_global_oversampling** **(** **)** |virtual| |const| Returns the font oversampling factor, shared by all fonts in the TextServer. ---- -.. _class_TextServerExtension_method__font_get_glyph_advance: +.. _class_TextServerExtension_method_font_get_glyph_advance: -- :ref:`Vector2` **_font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| +- :ref:`Vector2` **font_get_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| Returns glyph advance (offset of the next glyph). -\ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. - ---- -.. _class_TextServerExtension_method__font_get_glyph_contours: +.. _class_TextServerExtension_method_font_get_glyph_contours: -- :ref:`Dictionary` **_font_get_glyph_contours** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| +- :ref:`Dictionary` **font_get_glyph_contours** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| Returns outline contours of the glyph as a ``Dictionary`` with the following contents: @@ -522,445 +534,465 @@ Returns outline contours of the glyph as a ``Dictionary`` with the following con ---- -.. _class_TextServerExtension_method__font_get_glyph_index: +.. _class_TextServerExtension_method_font_get_glyph_index: -- :ref:`int` **_font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| +- :ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. ---- -.. _class_TextServerExtension_method__font_get_glyph_list: +.. _class_TextServerExtension_method_font_get_glyph_list: -- :ref:`Array` **_font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| +- :ref:`Array` **font_get_glyph_list** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| Returns list of rendered glyphs in the cache entry. ---- -.. _class_TextServerExtension_method__font_get_glyph_offset: +.. _class_TextServerExtension_method_font_get_glyph_offset: -- :ref:`Vector2` **_font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +- :ref:`Vector2` **font_get_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| Returns glyph offset from the baseline. ---- -.. _class_TextServerExtension_method__font_get_glyph_size: +.. _class_TextServerExtension_method_font_get_glyph_size: -- :ref:`Vector2` **_font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +- :ref:`Vector2` **font_get_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| Returns size of the glyph. ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_idx: +.. _class_TextServerExtension_method_font_get_glyph_texture_idx: -- :ref:`int` **_font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +- :ref:`int` **font_get_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| Returns index of the cache texture containing the glyph. ---- -.. _class_TextServerExtension_method__font_get_glyph_uv_rect: +.. _class_TextServerExtension_method_font_get_glyph_texture_rid: -- :ref:`Rect2` **_font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| +- :ref:`RID` **font_get_glyph_texture_rid** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| + +Returns resource id of the cache texture containing the glyph. + +---- + +.. _class_TextServerExtension_method_font_get_glyph_texture_size: + +- :ref:`Vector2` **font_get_glyph_texture_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| + +Returns size of the cache texture containing the glyph. + +---- + +.. _class_TextServerExtension_method_font_get_glyph_uv_rect: + +- :ref:`Rect2` **font_get_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| Returns rectangle in the cache texture containing the glyph. ---- -.. _class_TextServerExtension_method__font_get_hinting: +.. _class_TextServerExtension_method_font_get_hinting: -- :ref:`Hinting` **_font_get_hinting** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Hinting` **font_get_hinting** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns the font hinting mode. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_get_kerning: +.. _class_TextServerExtension_method_font_get_kerning: -- :ref:`Vector2` **_font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| +- :ref:`Vector2` **font_get_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| Returns kerning for the pair of glyphs. ---- -.. _class_TextServerExtension_method__font_get_kerning_list: +.. _class_TextServerExtension_method_font_get_kerning_list: -- :ref:`Array` **_font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`Array` **font_get_kerning_list** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns list of the kerning overrides. ---- -.. _class_TextServerExtension_method__font_get_language_support_override: +.. _class_TextServerExtension_method_font_get_language_support_override: -- :ref:`bool` **_font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| +- :ref:`bool` **font_get_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| Returns ``true`` if support override is enabled for the ``language``. ---- -.. _class_TextServerExtension_method__font_get_language_support_overrides: +.. _class_TextServerExtension_method_font_get_language_support_overrides: -- :ref:`PackedStringArray` **_font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| +- :ref:`PackedStringArray` **font_get_language_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| Returns list of language support overrides. ---- -.. _class_TextServerExtension_method__font_get_msdf_pixel_range: +.. _class_TextServerExtension_method_font_get_msdf_pixel_range: -- :ref:`int` **_font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`int` **font_get_msdf_pixel_range** **(** :ref:`RID` font_rid **)** |virtual| |const| -Return the width of the range around the shape between the minimum and maximum representable signed distance. +Returns the width of the range around the shape between the minimum and maximum representable signed distance. ---- -.. _class_TextServerExtension_method__font_get_msdf_size: +.. _class_TextServerExtension_method_font_get_msdf_size: -- :ref:`int` **_font_get_msdf_size** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`int` **font_get_msdf_size** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns source font size used to generate MSDF textures. ---- -.. _class_TextServerExtension_method__font_get_name: +.. _class_TextServerExtension_method_font_get_name: -- :ref:`String` **_font_get_name** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`String` **font_get_name** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font family name. ---- -.. _class_TextServerExtension_method__font_get_opentype_feature_overrides: +.. _class_TextServerExtension_method_font_get_opentype_feature_overrides: -- :ref:`Dictionary` **_font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Dictionary` **font_get_opentype_feature_overrides** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font OpenType feature set override. ---- -.. _class_TextServerExtension_method__font_get_oversampling: +.. _class_TextServerExtension_method_font_get_oversampling: -- :ref:`float` **_font_get_oversampling** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`float` **font_get_oversampling** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_get_scale: +.. _class_TextServerExtension_method_font_get_scale: -- :ref:`float` **_font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`float` **font_get_scale** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns scaling factor of the color bitmap font. ---- -.. _class_TextServerExtension_method__font_get_script_support_override: +.. _class_TextServerExtension_method_font_get_script_support_override: -- :ref:`bool` **_font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| +- :ref:`bool` **font_get_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| Returns ``true`` if support override is enabled for the ``script``. ---- -.. _class_TextServerExtension_method__font_get_script_support_overrides: +.. _class_TextServerExtension_method_font_get_script_support_overrides: -- :ref:`PackedStringArray` **_font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| +- :ref:`PackedStringArray` **font_get_script_support_overrides** **(** :ref:`RID` font_rid **)** |virtual| Returns list of script support overrides. ---- -.. _class_TextServerExtension_method__font_get_size_cache_list: +.. _class_TextServerExtension_method_font_get_size_cache_list: -- :ref:`Array` **_font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Array` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |virtual| |const| -Return list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. +Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. ---- -.. _class_TextServerExtension_method__font_get_spacing: +.. _class_TextServerExtension_method_font_get_spacing: -- :ref:`int` **_font_get_spacing** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing **)** |virtual| |const| +- :ref:`int` **font_get_spacing** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing **)** |virtual| |const| Returns extra spacing added between glyphs in pixels. ---- -.. _class_TextServerExtension_method__font_get_style: +.. _class_TextServerExtension_method_font_get_style: -- :ref:`int` **_font_get_style** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`int` **font_get_style** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font style flags, see :ref:`FontStyle`. ---- -.. _class_TextServerExtension_method__font_get_style_name: +.. _class_TextServerExtension_method_font_get_style_name: -- :ref:`String` **_font_get_style_name** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`String` **font_get_style_name** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font style name. ---- -.. _class_TextServerExtension_method__font_get_subpixel_positioning: +.. _class_TextServerExtension_method_font_get_subpixel_positioning: -- :ref:`SubpixelPositioning` **_font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`SubpixelPositioning` **font_get_subpixel_positioning** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns font sub-pixel glyph positioning mode. ---- -.. _class_TextServerExtension_method__font_get_supported_chars: +.. _class_TextServerExtension_method_font_get_supported_chars: -- :ref:`String` **_font_get_supported_chars** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`String` **font_get_supported_chars** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns a string containing all the characters available in the font. ---- -.. _class_TextServerExtension_method__font_get_texture_count: +.. _class_TextServerExtension_method_font_get_texture_count: -- :ref:`int` **_font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| +- :ref:`int` **font_get_texture_count** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| Returns number of textures used by font cache entry. ---- -.. _class_TextServerExtension_method__font_get_texture_image: +.. _class_TextServerExtension_method_font_get_texture_image: -- :ref:`Image` **_font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| +- :ref:`Image` **font_get_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| Returns font cache texture image data. ---- -.. _class_TextServerExtension_method__font_get_texture_offsets: +.. _class_TextServerExtension_method_font_get_texture_offsets: -- :ref:`PackedInt32Array` **_font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| +- :ref:`PackedInt32Array` **font_get_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. ---- -.. _class_TextServerExtension_method__font_get_transform: +.. _class_TextServerExtension_method_font_get_transform: -- :ref:`Transform2D` **_font_get_transform** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Transform2D` **font_get_transform** **(** :ref:`RID` font_rid **)** |virtual| |const| -Retruns 2D transform applied to the font outlines. +Returns 2D transform applied to the font outlines. ---- -.. _class_TextServerExtension_method__font_get_underline_position: +.. _class_TextServerExtension_method_font_get_underline_position: -- :ref:`float` **_font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`float` **font_get_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns pixel offset of the underline below the baseline. ---- -.. _class_TextServerExtension_method__font_get_underline_thickness: +.. _class_TextServerExtension_method_font_get_underline_thickness: -- :ref:`float` **_font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| +- :ref:`float` **font_get_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| Returns thickness of the underline in pixels. ---- -.. _class_TextServerExtension_method__font_get_variation_coordinates: +.. _class_TextServerExtension_method_font_get_variation_coordinates: -- :ref:`Dictionary` **_font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Dictionary` **font_get_variation_coordinates** **(** :ref:`RID` font_rid **)** |virtual| |const| -Returns variation coordinates for the specified font cache entry. See :ref:`_font_supported_variation_list` for more info. +Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. ---- -.. _class_TextServerExtension_method__font_has_char: +.. _class_TextServerExtension_method_font_has_char: -- :ref:`bool` **_font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| +- :ref:`bool` **font_has_char** **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| -Return ``true`` if a Unicode ``char`` is available in the font. +Returns ``true`` if a Unicode ``char`` is available in the font. ---- -.. _class_TextServerExtension_method__font_is_antialiased: +.. _class_TextServerExtension_method_font_is_antialiased: -- :ref:`bool` **_font_is_antialiased** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`bool` **font_is_antialiased** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns ``true`` if font 8-bit anitialiased glyph rendering is supported and enabled. ---- -.. _class_TextServerExtension_method__font_is_force_autohinter: +.. _class_TextServerExtension_method_font_is_force_autohinter: -- :ref:`bool` **_font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`bool` **font_is_force_autohinter** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_is_language_supported: +.. _class_TextServerExtension_method_font_is_language_supported: -- :ref:`bool` **_font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| +- :ref:`bool` **font_is_language_supported** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| Returns ``true``, if font supports given language (`ISO 639 `__ code). ---- -.. _class_TextServerExtension_method__font_is_multichannel_signed_distance_field: +.. _class_TextServerExtension_method_font_is_multichannel_signed_distance_field: -- :ref:`bool` **_font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`bool` **font_is_multichannel_signed_distance_field** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. ---- -.. _class_TextServerExtension_method__font_is_script_supported: +.. _class_TextServerExtension_method_font_is_script_supported: -- :ref:`bool` **_font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| +- :ref:`bool` **font_is_script_supported** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| Returns ``true``, if font supports given script (ISO 15924 code). ---- -.. _class_TextServerExtension_method__font_remove_glyph: +.. _class_TextServerExtension_method_font_remove_glyph: -- void **_font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| +- void **font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| Removes specified rendered glyph information from the cache entry. -\ **Note:** This function will not remove textures associated with the glyphs, use :ref:`_font_remove_texture` to remove them manually. - ---- -.. _class_TextServerExtension_method__font_remove_kerning: +.. _class_TextServerExtension_method_font_remove_kerning: -- void **_font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| +- void **font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| Removes kerning override for the pair of glyphs. ---- -.. _class_TextServerExtension_method__font_remove_language_support_override: +.. _class_TextServerExtension_method_font_remove_language_support_override: -- void **_font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| +- void **font_remove_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| Remove language support override. ---- -.. _class_TextServerExtension_method__font_remove_script_support_override: +.. _class_TextServerExtension_method_font_remove_script_support_override: -- void **_font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| +- void **font_remove_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| Removes script support override. ---- -.. _class_TextServerExtension_method__font_remove_size_cache: +.. _class_TextServerExtension_method_font_remove_size_cache: -- void **_font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| +- void **font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| Removes specified font size from the cache entry. ---- -.. _class_TextServerExtension_method__font_remove_texture: +.. _class_TextServerExtension_method_font_remove_texture: -- void **_font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| +- void **font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| Removes specified texture from font cache entry. -\ **Note:** This function will not remove glyphs associated with the texture, remove them manually, using :ref:`_font_remove_glyph`. +---- + +.. _class_TextServerExtension_method_font_render_glyph: + +- void **font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| + +Renders specified glyph to the font cache texture. ---- -.. _class_TextServerExtension_method__font_render_glyph: +.. _class_TextServerExtension_method_font_render_range: -- void **_font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| - -Renders specified glyph the the font cache texture. - ----- - -.. _class_TextServerExtension_method__font_render_range: - -- void **_font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| +- void **font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| Renders the range of characters to the font cache texture. ---- -.. _class_TextServerExtension_method__font_set_antialiased: +.. _class_TextServerExtension_method_font_set_antialiased: -- void **_font_set_antialiased** **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| +- void **font_set_antialiased** **(** :ref:`RID` font_rid, :ref:`bool` antialiased **)** |virtual| If set to ``true``, 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_set_ascent: +.. _class_TextServerExtension_method_font_set_ascent: -- void **_font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| +- void **font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| Sets the font ascent (number of pixels above the baseline). ---- -.. _class_TextServerExtension_method__font_set_data: +.. _class_TextServerExtension_method_font_set_data: -- void **_font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| +- void **font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| Sets font source data, e.g contents of the dynamic font source file. ---- -.. _class_TextServerExtension_method__font_set_data_ptr: +.. _class_TextServerExtension_method_font_set_data_ptr: -- void **_font_set_data_ptr** **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| +- void **font_set_data_ptr** **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| + +Sets font source data, e.g contents of the dynamic font source file. ``data_ptr`` memory buffer must remain accessible during font lifetime. + +---- + +.. _class_TextServerExtension_method_font_set_descent: + +- void **font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| Sets the font descent (number of pixels below the baseline). ---- -.. _class_TextServerExtension_method__font_set_descent: +.. _class_TextServerExtension_method_font_set_embolden: -- void **_font_set_descent** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| - -Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. - ----- - -.. _class_TextServerExtension_method__font_set_embolden: - -- void **_font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| +- void **font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. ---- -.. _class_TextServerExtension_method__font_set_fixed_size: +.. _class_TextServerExtension_method_font_set_fixed_size: -- void **_font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| +- void **font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| + +Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. + +---- + +.. _class_TextServerExtension_method_font_set_force_autohinter: + +- void **font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| If set to ``true`` auto-hinting is preferred over font built-in hinting. ---- -.. _class_TextServerExtension_method__font_set_force_autohinter: +.. _class_TextServerExtension_method_font_set_generate_mipmaps: -- void **_font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| +- void **font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| -If set to ``true`` auto-hinting is preferred over font built-in hinting. +If set to ``true`` font texture mipmap generation is enabled. ---- -.. _class_TextServerExtension_method__font_set_global_oversampling: +.. _class_TextServerExtension_method_font_set_global_oversampling: -- void **_font_set_global_oversampling** **(** :ref:`float` oversampling **)** |virtual| +- void **font_set_global_oversampling** **(** :ref:`float` oversampling **)** |virtual| Sets oversampling factor, shared by all font in the TextServer. @@ -968,187 +1000,187 @@ Sets oversampling factor, shared by all font in the TextServer. ---- -.. _class_TextServerExtension_method__font_set_glyph_advance: +.. _class_TextServerExtension_method_font_set_glyph_advance: -- void **_font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| +- void **font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| Sets glyph advance (offset of the next glyph). -\ **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. - ---- -.. _class_TextServerExtension_method__font_set_glyph_offset: +.. _class_TextServerExtension_method_font_set_glyph_offset: -- void **_font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| +- void **font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| Sets glyph offset from the baseline. ---- -.. _class_TextServerExtension_method__font_set_glyph_size: +.. _class_TextServerExtension_method_font_set_glyph_size: -- void **_font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| +- void **font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| Sets size of the glyph. ---- -.. _class_TextServerExtension_method__font_set_glyph_texture_idx: +.. _class_TextServerExtension_method_font_set_glyph_texture_idx: -- void **_font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| +- void **font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| Sets index of the cache texture containing the glyph. ---- -.. _class_TextServerExtension_method__font_set_glyph_uv_rect: +.. _class_TextServerExtension_method_font_set_glyph_uv_rect: -- void **_font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| +- void **font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| Sets rectangle in the cache texture containing the glyph. ---- -.. _class_TextServerExtension_method__font_set_hinting: +.. _class_TextServerExtension_method_font_set_hinting: -- void **_font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| +- void **font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| Sets font hinting mode. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_set_kerning: +.. _class_TextServerExtension_method_font_set_kerning: -- void **_font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| +- void **font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| Sets kerning for the pair of glyphs. ---- -.. _class_TextServerExtension_method__font_set_language_support_override: +.. _class_TextServerExtension_method_font_set_language_support_override: -- void **_font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| +- void **font_set_language_support_override** **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| -Adds override for :ref:`_font_is_language_supported`. +Adds override for :ref:`font_is_language_supported`. ---- -.. _class_TextServerExtension_method__font_set_msdf_pixel_range: +.. _class_TextServerExtension_method_font_set_msdf_pixel_range: -- void **_font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| +- void **font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| Sets the width of the range around the shape between the minimum and maximum representable signed distance. ---- -.. _class_TextServerExtension_method__font_set_msdf_size: +.. _class_TextServerExtension_method_font_set_msdf_size: -- void **_font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| +- void **font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| Sets source font size used to generate MSDF textures. ---- -.. _class_TextServerExtension_method__font_set_multichannel_signed_distance_field: +.. _class_TextServerExtension_method_font_set_multichannel_signed_distance_field: -- void **_font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| +- void **font_set_multichannel_signed_distance_field** **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| -If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. +If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. + +\ **Note:** MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. ---- -.. _class_TextServerExtension_method__font_set_name: +.. _class_TextServerExtension_method_font_set_name: -- void **_font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| +- void **font_set_name** **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| Sets the font family name. ---- -.. _class_TextServerExtension_method__font_set_opentype_feature_overrides: +.. _class_TextServerExtension_method_font_set_opentype_feature_overrides: -- void **_font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| +- void **font_set_opentype_feature_overrides** **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| Sets font OpenType feature set override. ---- -.. _class_TextServerExtension_method__font_set_oversampling: +.. _class_TextServerExtension_method_font_set_oversampling: -- void **_font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| +- void **font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. ---- -.. _class_TextServerExtension_method__font_set_scale: +.. _class_TextServerExtension_method_font_set_scale: -- void **_font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| +- void **font_set_scale** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| Sets scaling factor of the color bitmap font. ---- -.. _class_TextServerExtension_method__font_set_script_support_override: +.. _class_TextServerExtension_method_font_set_script_support_override: -- void **_font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| +- void **font_set_script_support_override** **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| -Adds override for :ref:`_font_is_script_supported`. +Adds override for :ref:`font_is_script_supported`. ---- -.. _class_TextServerExtension_method__font_set_spacing: +.. _class_TextServerExtension_method_font_set_spacing: -- void **_font_set_spacing** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| +- void **font_set_spacing** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| Sets extra spacing added between glyphs in pixels. ---- -.. _class_TextServerExtension_method__font_set_style: +.. _class_TextServerExtension_method_font_set_style: -- void **_font_set_style** **(** :ref:`RID` font_rid, :ref:`int` style **)** |virtual| +- void **font_set_style** **(** :ref:`RID` font_rid, :ref:`int` style **)** |virtual| Sets the font style flags, see :ref:`FontStyle`. ---- -.. _class_TextServerExtension_method__font_set_style_name: +.. _class_TextServerExtension_method_font_set_style_name: -- void **_font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| +- void **font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| Sets the font style name. ---- -.. _class_TextServerExtension_method__font_set_subpixel_positioning: +.. _class_TextServerExtension_method_font_set_subpixel_positioning: -- void **_font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| +- void **font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| Sets font sub-pixel glyph positioning mode. ---- -.. _class_TextServerExtension_method__font_set_texture_image: +.. _class_TextServerExtension_method_font_set_texture_image: -- void **_font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| +- void **font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| Sets font cache texture image data. ---- -.. _class_TextServerExtension_method__font_set_texture_offsets: +.. _class_TextServerExtension_method_font_set_texture_offsets: -- void **_font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| +- void **font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. ---- -.. _class_TextServerExtension_method__font_set_transform: +.. _class_TextServerExtension_method_font_set_transform: -- void **_font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| +- void **font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. @@ -1156,163 +1188,169 @@ For example, to simulate italic typeface by slanting, apply the following transf ---- -.. _class_TextServerExtension_method__font_set_underline_position: +.. _class_TextServerExtension_method_font_set_underline_position: -- void **_font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| +- void **font_set_underline_position** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| Sets pixel offset of the underline below the baseline. ---- -.. _class_TextServerExtension_method__font_set_underline_thickness: +.. _class_TextServerExtension_method_font_set_underline_thickness: -- void **_font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| +- void **font_set_underline_thickness** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| Sets thickness of the underline in pixels. ---- -.. _class_TextServerExtension_method__font_set_variation_coordinates: +.. _class_TextServerExtension_method_font_set_variation_coordinates: -- void **_font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| +- void **font_set_variation_coordinates** **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| -Sets variation coordinates for the specified font cache entry. See :ref:`_font_supported_variation_list` for more info. +Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list` for more info. ---- -.. _class_TextServerExtension_method__font_supported_feature_list: +.. _class_TextServerExtension_method_font_supported_feature_list: -- :ref:`Dictionary` **_font_supported_feature_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Dictionary` **font_supported_feature_list** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns the dictionary of the supported OpenType features. ---- -.. _class_TextServerExtension_method__font_supported_variation_list: +.. _class_TextServerExtension_method_font_supported_variation_list: -- :ref:`Dictionary` **_font_supported_variation_list** **(** :ref:`RID` font_rid **)** |virtual| |const| +- :ref:`Dictionary` **font_supported_variation_list** **(** :ref:`RID` font_rid **)** |virtual| |const| Returns the dictionary of the supported OpenType variation coordinates. ---- -.. _class_TextServerExtension_method__format_number: +.. _class_TextServerExtension_method_format_number: -- :ref:`String` **_format_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +- :ref:`String` **format_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``. ---- -.. _class_TextServerExtension_method__free: +.. _class_TextServerExtension_method_free_rid: -- void **_free** **(** :ref:`RID` rid **)** |virtual| +- void **free_rid** **(** :ref:`RID` rid **)** |virtual| Frees an object created by this :ref:`TextServer`. ---- -.. _class_TextServerExtension_method__get_features: +.. _class_TextServerExtension_method_get_features: -- :ref:`int` **_get_features** **(** **)** |virtual| |const| +- :ref:`int` **get_features** **(** **)** |virtual| |const| Returns text server features, see :ref:`Feature`. ---- -.. _class_TextServerExtension_method__get_hex_code_box_size: +.. _class_TextServerExtension_method_get_hex_code_box_size: -- :ref:`Vector2` **_get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| +- :ref:`Vector2` **get_hex_code_box_size** **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__get_name: +.. _class_TextServerExtension_method_get_name: -- :ref:`String` **_get_name** **(** **)** |virtual| |const| +- :ref:`String` **get_name** **(** **)** |virtual| |const| Returns the name of the server interface. ---- -.. _class_TextServerExtension_method__get_support_data_filename: +.. _class_TextServerExtension_method_get_support_data_filename: -- :ref:`String` **_get_support_data_filename** **(** **)** |virtual| |const| +- :ref:`String` **get_support_data_filename** **(** **)** |virtual| |const| Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. ---- -.. _class_TextServerExtension_method__get_support_data_info: +.. _class_TextServerExtension_method_get_support_data_info: -- :ref:`String` **_get_support_data_info** **(** **)** |virtual| |const| +- :ref:`String` **get_support_data_info** **(** **)** |virtual| |const| Returns TextServer database (e.g. ICU break iterators and dictionaries) description. ---- -.. _class_TextServerExtension_method__has: +.. _class_TextServerExtension_method_has: -- :ref:`bool` **_has** **(** :ref:`RID` rid **)** |virtual| +- :ref:`bool` **has** **(** :ref:`RID` rid **)** |virtual| Returns ``true`` if ``rid`` is valid resource owned by this text server. ---- -.. _class_TextServerExtension_method__has_feature: +.. _class_TextServerExtension_method_has_feature: -- :ref:`bool` **_has_feature** **(** :ref:`Feature` feature **)** |virtual| |const| +- :ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |virtual| |const| Returns ``true`` if the server supports a feature. ---- -.. _class_TextServerExtension_method__is_locale_right_to_left: +.. _class_TextServerExtension_method_is_locale_right_to_left: -- :ref:`bool` **_is_locale_right_to_left** **(** :ref:`String` locale **)** |virtual| |const| +- :ref:`bool` **is_locale_right_to_left** **(** :ref:`String` locale **)** |virtual| |const| Returns ``true`` if locale is right-to-left. ---- -.. _class_TextServerExtension_method__load_support_data: +.. _class_TextServerExtension_method_load_support_data: -- :ref:`bool` **_load_support_data** **(** :ref:`String` filename **)** |virtual| +- :ref:`bool` **load_support_data** **(** :ref:`String` filename **)** |virtual| 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. - ---- -.. _class_TextServerExtension_method__name_to_tag: +.. _class_TextServerExtension_method_name_to_tag: -- :ref:`int` **_name_to_tag** **(** :ref:`String` name **)** |virtual| |const| +- :ref:`int` **name_to_tag** **(** :ref:`String` name **)** |virtual| |const| Converts readable feature, variation, script or language name to OpenType tag. ---- -.. _class_TextServerExtension_method__parse_number: +.. _class_TextServerExtension_method_parse_number: -- :ref:`String` **_parse_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +- :ref:`String` **parse_number** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| Converts a number from the numeral systems used in ``language`` to Western Arabic (0..9). ---- -.. _class_TextServerExtension_method__percent_sign: +.. _class_TextServerExtension_method_parse_structured_text: -- :ref:`String` **_percent_sign** **(** :ref:`String` language **)** |virtual| |const| +- :ref:`Array` **parse_structured_text** **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| + +---- + +.. _class_TextServerExtension_method_percent_sign: + +- :ref:`String` **percent_sign** **(** :ref:`String` language **)** |virtual| |const| Returns percent sign used in the ``language``. ---- -.. _class_TextServerExtension_method__save_support_data: +.. _class_TextServerExtension_method_save_support_data: -- :ref:`bool` **_save_support_data** **(** :ref:`String` filename **)** |virtual| |const| +- :ref:`bool` **save_support_data** **(** :ref:`String` filename **)** |virtual| |const| Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. @@ -1320,245 +1358,255 @@ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) t ---- -.. _class_TextServerExtension_method__shaped_get_span_count: +.. _class_TextServerExtension_method_shaped_get_span_count: -- :ref:`int` **_shaped_get_span_count** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`int` **shaped_get_span_count** **(** :ref:`RID` shaped **)** |virtual| |const| -Returns number of text spans added using :ref:`_shaped_text_add_string` or :ref:`_shaped_text_add_object`. +Returns number of text spans added using :ref:`shaped_text_add_string` or :ref:`shaped_text_add_object`. ---- -.. _class_TextServerExtension_method__shaped_get_span_meta: +.. _class_TextServerExtension_method_shaped_get_span_meta: -- :ref:`Variant` **_shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| +- :ref:`Variant` **shaped_get_span_meta** **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| Returns text span metadata. ---- -.. _class_TextServerExtension_method__shaped_set_span_update_font: +.. _class_TextServerExtension_method_shaped_set_span_update_font: -- void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| +- void **shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:`int` index, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| Changes text span font, font size and OpenType features, without changing the text. ---- -.. _class_TextServerExtension_method__shaped_text_add_object: +.. _class_TextServerExtension_method_shaped_text_add_object: -- :ref:`bool` **_shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| +- :ref:`bool` **shaped_text_add_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length **)** |virtual| Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. ---- -.. _class_TextServerExtension_method__shaped_text_add_string: +.. _class_TextServerExtension_method_shaped_text_add_string: -- :ref:`bool` **_shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| +- :ref:`bool` **shaped_text_add_string** **(** :ref:`RID` shaped, :ref:`String` text, :ref:`Array` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| Adds text span and font to draw it to the text buffer. ---- -.. _class_TextServerExtension_method__shaped_text_clear: +.. _class_TextServerExtension_method_shaped_text_clear: -- void **_shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| +- void **shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| Clears text buffer (removes text and inline objects). ---- -.. _class_TextServerExtension_method__shaped_text_draw: +.. _class_TextServerExtension_method_shaped_text_draw: -- void **_shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| +- void **shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_draw_outline: +.. _class_TextServerExtension_method_shaped_text_draw_outline: -- void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| +- void **shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| Draw the outline of the shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). ----- - -.. _class_TextServerExtension_method__shaped_text_fit_to_width: - -- :ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` jst_flags **)** |virtual| - -Adjusts text with to fit to specified width, returns new text width +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. ---- -.. _class_TextServerExtension_method__shaped_text_get_ascent: +.. _class_TextServerExtension_method_shaped_text_fit_to_width: -- :ref:`float` **_shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` jst_flags **)** |virtual| + +Adjusts text with to fit to specified width, returns new text width. + +---- + +.. _class_TextServerExtension_method_shaped_text_get_ascent: + +- :ref:`float` **shaped_text_get_ascent** **(** :ref:`RID` shaped **)** |virtual| |const| 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. - ---- -.. _class_TextServerExtension_method__shaped_text_get_carets: +.. _class_TextServerExtension_method_shaped_text_get_carets: -- void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| +- void **shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_custom_punctuation: +.. _class_TextServerExtension_method_shaped_text_get_custom_punctuation: -- :ref:`String` **_shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`String` **shaped_text_get_custom_punctuation** **(** :ref:`RID` shaped **)** |virtual| |const| Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. ---- -.. _class_TextServerExtension_method__shaped_text_get_descent: +.. _class_TextServerExtension_method_shaped_text_get_descent: -- :ref:`float` **_shaped_text_get_descent** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`float` **shaped_text_get_descent** **(** :ref:`RID` shaped **)** |virtual| |const| 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. - ---- -.. _class_TextServerExtension_method__shaped_text_get_direction: +.. _class_TextServerExtension_method_shaped_text_get_direction: -- :ref:`Direction` **_shaped_text_get_direction** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Direction` **shaped_text_get_direction** **(** :ref:`RID` shaped **)** |virtual| |const| Returns direction of the text. ---- -.. _class_TextServerExtension_method__shaped_text_get_dominant_direction_in_range: +.. _class_TextServerExtension_method_shaped_text_get_dominant_direction_in_range: -- :ref:`int` **_shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| +- :ref:`int` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| Returns dominant direction of in the range of text. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyph_count: +.. _class_TextServerExtension_method_shaped_text_get_ellipsis_glyph_count: -- :ref:`int` **_shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`int` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| Returns number of glyphs in the ellipsis. ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyphs: +.. _class_TextServerExtension_method_shaped_text_get_ellipsis_glyphs: -- Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| +- const Glyph* **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| Returns array of the glyphs in the ellipsis. ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_pos: +.. _class_TextServerExtension_method_shaped_text_get_ellipsis_pos: -- :ref:`int` **_shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`int` **shaped_text_get_ellipsis_pos** **(** :ref:`RID` shaped **)** |virtual| |const| Returns position of the ellipsis. ---- -.. _class_TextServerExtension_method__shaped_text_get_glyph_count: +.. _class_TextServerExtension_method_shaped_text_get_glyph_count: -- :ref:`int` **_shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`int` **shaped_text_get_glyph_count** **(** :ref:`RID` shaped **)** |virtual| |const| -Returns text glyphs count. +Returns number of glyphs in the buffer. ---- -.. _class_TextServerExtension_method__shaped_text_get_glyphs: +.. _class_TextServerExtension_method_shaped_text_get_glyphs: -- Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| +- const Glyph* **shaped_text_get_glyphs** **(** :ref:`RID` shaped **)** |virtual| |const| -Copies text glyphs in the visual order, into preallocated array of the size returned by :ref:`_shaped_text_get_glyph_count`. +Returns an array of glyphs in the visual order. ---- -.. _class_TextServerExtension_method__shaped_text_get_grapheme_bounds: +.. _class_TextServerExtension_method_shaped_text_get_grapheme_bounds: -- :ref:`Vector2` **_shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +- :ref:`Vector2` **shaped_text_get_grapheme_bounds** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| Returns composite character's bounds as offsets from the start of the line. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_inferred_direction: +.. _class_TextServerExtension_method_shaped_text_get_inferred_direction: -- :ref:`Direction` **_shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Direction` **shaped_text_get_inferred_direction** **(** :ref:`RID` shaped **)** |virtual| |const| Returns direction of the text, inferred by the BiDi algorithm. ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks: +.. _class_TextServerExtension_method_shaped_text_get_line_breaks: -- :ref:`PackedInt32Array` **_shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`int` break_flags **)** |virtual| |const| +- :ref:`PackedInt32Array` **shaped_text_get_line_breaks** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, :ref:`int` break_flags **)** |virtual| |const| Breaks text to the lines and returns character ranges for each line. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks_adv: +.. _class_TextServerExtension_method_shaped_text_get_line_breaks_adv: -- :ref:`PackedInt32Array` **_shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`int` break_flags **)** |virtual| |const| +- :ref:`PackedInt32Array` **shaped_text_get_line_breaks_adv** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, :ref:`int` break_flags **)** |virtual| |const| Breaks text to the lines and columns. Returns character ranges for each segment. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_object_rect: +.. _class_TextServerExtension_method_shaped_text_get_object_rect: -- :ref:`Rect2` **_shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| +- :ref:`Rect2` **shaped_text_get_object_rect** **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| Returns bounding rectangle of the inline object. ---- -.. _class_TextServerExtension_method__shaped_text_get_objects: +.. _class_TextServerExtension_method_shaped_text_get_objects: -- :ref:`Array` **_shaped_text_get_objects** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Array` **shaped_text_get_objects** **(** :ref:`RID` shaped **)** |virtual| |const| Returns array of inline objects. ---- -.. _class_TextServerExtension_method__shaped_text_get_orientation: +.. _class_TextServerExtension_method_shaped_text_get_orientation: -- :ref:`Orientation` **_shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Orientation` **shaped_text_get_orientation** **(** :ref:`RID` shaped **)** |virtual| |const| -Returns text orientation. +eturns text orientation. ---- -.. _class_TextServerExtension_method__shaped_text_get_parent: +.. _class_TextServerExtension_method_shaped_text_get_parent: -- :ref:`RID` **_shaped_text_get_parent** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`RID` **shaped_text_get_parent** **(** :ref:`RID` shaped **)** |virtual| |const| -Sets text orientation. +Returns the parent buffer from which the substring originates. ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_control: +.. _class_TextServerExtension_method_shaped_text_get_preserve_control: -- :ref:`bool` **_shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`bool` **shaped_text_get_preserve_control** **(** :ref:`RID` shaped **)** |virtual| |const| Returns ``true`` if text buffer is configured to display control characters. ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_invalid: +.. _class_TextServerExtension_method_shaped_text_get_preserve_invalid: -- :ref:`bool` **_shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`bool` **shaped_text_get_preserve_invalid** **(** :ref:`RID` shaped **)** |virtual| |const| Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters. @@ -1566,129 +1614,141 @@ Returns ``true`` if text buffer is configured to display hexadecimal codes in pl ---- -.. _class_TextServerExtension_method__shaped_text_get_range: +.. _class_TextServerExtension_method_shaped_text_get_range: -- :ref:`Vector2i` **_shaped_text_get_range** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Vector2i` **shaped_text_get_range** **(** :ref:`RID` shaped **)** |virtual| |const| Returns substring buffer character range in the parent buffer. ---- -.. _class_TextServerExtension_method__shaped_text_get_selection: +.. _class_TextServerExtension_method_shaped_text_get_selection: -- :ref:`PackedVector2Array` **_shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| +- :ref:`PackedVector2Array` **shaped_text_get_selection** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| Returns selection rectangles for the specified character range. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_get_size: +.. _class_TextServerExtension_method_shaped_text_get_size: -- :ref:`Vector2` **_shaped_text_get_size** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`Vector2` **shaped_text_get_size** **(** :ref:`RID` shaped **)** |virtual| |const| Returns size of the text. ---- -.. _class_TextServerExtension_method__shaped_text_get_trim_pos: +.. _class_TextServerExtension_method_shaped_text_get_trim_pos: -- :ref:`int` **_shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`int` **shaped_text_get_trim_pos** **(** :ref:`RID` shaped **)** |virtual| |const| -Returns ellipsis and trim positions. +Returns the position of the overrun trim. ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_position: +.. _class_TextServerExtension_method_shaped_text_get_underline_position: -- :ref:`float` **_shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`float` **shaped_text_get_underline_position** **(** :ref:`RID` shaped **)** |virtual| |const| Returns pixel offset of the underline below the baseline. ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_thickness: +.. _class_TextServerExtension_method_shaped_text_get_underline_thickness: -- :ref:`float` **_shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`float` **shaped_text_get_underline_thickness** **(** :ref:`RID` shaped **)** |virtual| |const| Returns thickness of the underline. ---- -.. _class_TextServerExtension_method__shaped_text_get_width: +.. _class_TextServerExtension_method_shaped_text_get_width: -- :ref:`float` **_shaped_text_get_width** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`float` **shaped_text_get_width** **(** :ref:`RID` shaped **)** |virtual| |const| Returns width (for horizontal layout) or height (for vertical) of the text. ---- -.. _class_TextServerExtension_method__shaped_text_get_word_breaks: +.. _class_TextServerExtension_method_shaped_text_get_word_breaks: -- :ref:`PackedInt32Array` **_shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |virtual| |const| +- :ref:`PackedInt32Array` **shaped_text_get_word_breaks** **(** :ref:`RID` shaped, :ref:`int` grapheme_flags **)** |virtual| |const| Breaks text into words and returns array of character ranges. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_grapheme: +.. _class_TextServerExtension_method_shaped_text_hit_test_grapheme: -- :ref:`int` **_shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| +- :ref:`int` **shaped_text_hit_test_grapheme** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_position: +.. _class_TextServerExtension_method_shaped_text_hit_test_position: -- :ref:`int` **_shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| +- :ref:`int` **shaped_text_hit_test_position** **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_is_ready: +.. _class_TextServerExtension_method_shaped_text_is_ready: -- :ref:`bool` **_shaped_text_is_ready** **(** :ref:`RID` shaped **)** |virtual| |const| +- :ref:`bool` **shaped_text_is_ready** **(** :ref:`RID` shaped **)** |virtual| |const| Returns ``true`` if buffer is successfully shaped. ---- -.. _class_TextServerExtension_method__shaped_text_next_grapheme_pos: +.. _class_TextServerExtension_method_shaped_text_next_grapheme_pos: -- :ref:`int` **_shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +- :ref:`int` **shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| Returns composite character end position closest to the ``pos``. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_overrun_trim_to_width: +.. _class_TextServerExtension_method_shaped_text_overrun_trim_to_width: -- void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` trim_flags **)** |virtual| +- void **shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` trim_flags **)** |virtual| Trims text if it exceeds the given width. ---- -.. _class_TextServerExtension_method__shaped_text_prev_grapheme_pos: +.. _class_TextServerExtension_method_shaped_text_prev_grapheme_pos: -- :ref:`int` **_shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| +- :ref:`int` **shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| Returns composite character start position closest to the ``pos``. +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + ---- -.. _class_TextServerExtension_method__shaped_text_resize_object: +.. _class_TextServerExtension_method_shaped_text_resize_object: -- :ref:`bool` **_shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| +- :ref:`bool` **shaped_text_resize_object** **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align **)** |virtual| Sets new size and alignment of embedded object. ---- -.. _class_TextServerExtension_method__shaped_text_set_bidi_override: +.. _class_TextServerExtension_method_shaped_text_set_bidi_override: -- void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| +- void **shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| Overrides BiDi for the structured text. @@ -1696,119 +1756,135 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w ---- -.. _class_TextServerExtension_method__shaped_text_set_custom_punctuation: +.. _class_TextServerExtension_method_shaped_text_set_custom_punctuation: -- void **_shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| +- void **shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. ---- -.. _class_TextServerExtension_method__shaped_text_set_direction: +.. _class_TextServerExtension_method_shaped_text_set_direction: -- void **_shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| +- void **shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| Sets desired text direction. If set to ``TEXT_DIRECTION_AUTO``, direction will be detected based on the buffer contents and current locale. -\ **Note:** Direction is ignored if server does not support ``FEATURE_BIDI_LAYOUT`` feature. - ---- -.. _class_TextServerExtension_method__shaped_text_set_orientation: +.. _class_TextServerExtension_method_shaped_text_set_orientation: -- void **_shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| +- void **shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| Sets desired text orientation. -\ **Note:** Orientation is ignored if server does not support ``FEATURE_VERTICAL_LAYOUT`` feature. - ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_control: +.. _class_TextServerExtension_method_shaped_text_set_preserve_control: -- void **_shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| +- void **shaped_text_set_preserve_control** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| If set to ``true`` text buffer will display control characters. ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_invalid: +.. _class_TextServerExtension_method_shaped_text_set_preserve_invalid: -- void **_shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| +- void **shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. ---- -.. _class_TextServerExtension_method__shaped_text_shape: +.. _class_TextServerExtension_method_shaped_text_shape: -- :ref:`bool` **_shaped_text_shape** **(** :ref:`RID` shaped **)** |virtual| +- :ref:`bool` **shaped_text_shape** **(** :ref:`RID` shaped **)** |virtual| Shapes buffer if it's not shaped. Returns ``true`` 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. +---- + +.. _class_TextServerExtension_method_shaped_text_sort_logical: + +- const Glyph* **shaped_text_sort_logical** **(** :ref:`RID` shaped **)** |virtual| + +Returns text glyphs in the logical order. ---- -.. _class_TextServerExtension_method__shaped_text_sort_logical: +.. _class_TextServerExtension_method_shaped_text_substr: -- Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped **)** |virtual| - -Copies text glyphs in the logical order, into preallocated array of the size returned by :ref:`_shaped_text_get_glyph_count`. - ----- - -.. _class_TextServerExtension_method__shaped_text_substr: - -- :ref:`RID` **_shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| +- :ref:`RID` **shaped_text_substr** **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects). ---- -.. _class_TextServerExtension_method__shaped_text_tab_align: +.. _class_TextServerExtension_method_shaped_text_tab_align: -- :ref:`float` **_shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| +- :ref:`float` **shaped_text_tab_align** **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| Aligns shaped text to the given tab-stops. ---- -.. _class_TextServerExtension_method__shaped_text_update_breaks: +.. _class_TextServerExtension_method_shaped_text_update_breaks: -- :ref:`bool` **_shaped_text_update_breaks** **(** :ref:`RID` shaped **)** |virtual| +- :ref:`bool` **shaped_text_update_breaks** **(** :ref:`RID` shaped **)** |virtual| -Updates line and word breaks. +Updates line breaking positions in the text buffer. + +\ **Note:** This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented. ---- -.. _class_TextServerExtension_method__shaped_text_update_justification_ops: +.. _class_TextServerExtension_method_shaped_text_update_justification_ops: -- :ref:`bool` **_shaped_text_update_justification_ops** **(** :ref:`RID` shaped **)** |virtual| +- :ref:`bool` **shaped_text_update_justification_ops** **(** :ref:`RID` shaped **)** |virtual| -Updates justification opportunities (spaces, kashidas, etc.). +Updates line justification positions (word breaks and elongations) in the text buffer. + +\ **Note:** This method is used by default line/word breaking methods, and its implementation might be omitted if custom line breaking in implemented. ---- -.. _class_TextServerExtension_method__string_to_lower: +.. _class_TextServerExtension_method_string_get_word_breaks: -- :ref:`String` **_string_to_lower** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +- :ref:`PackedInt32Array` **string_get_word_breaks** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| -Returns the string converted to lowercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original. +Returns array of the word break character offsets. ---- -.. _class_TextServerExtension_method__string_to_upper: +.. _class_TextServerExtension_method_string_to_lower: -- :ref:`String` **_string_to_upper** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| +- :ref:`String` **string_to_lower** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| -Returns the string converted to uppercase. Casing is locale dependent and context sensitive. The result may be longer or shorter than the original. +Returns the string converted to lowercase. ---- -.. _class_TextServerExtension_method__tag_to_name: +.. _class_TextServerExtension_method_string_to_upper: -- :ref:`String` **_tag_to_name** **(** :ref:`int` tag **)** |virtual| |const| +- :ref:`String` **string_to_upper** **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| + +Returns the string converted to uppercase. + +---- + +.. _class_TextServerExtension_method_strip_diacritics: + +- :ref:`String` **strip_diacritics** **(** :ref:`String` string **)** |virtual| |const| + +Strips diacritics from the string. + +\ **Note:** If this method is not implemented in the plugin, the default implementation will be used. + +---- + +.. _class_TextServerExtension_method_tag_to_name: + +- :ref:`String` **tag_to_name** **(** :ref:`int` tag **)** |virtual| |const| Converts OpenType tag to readable feature, variation, script or language name. diff --git a/classes/class_textserverfallback.rst b/classes/class_textserverfallback.rst index 87b258ffe..689d7de9b 100644 --- a/classes/class_textserverfallback.rst +++ b/classes/class_textserverfallback.rst @@ -9,7 +9,7 @@ TextServerFallback ================== -**Inherits:** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` Fallback implementation of the Text Server, without BiDi and complex text layout support. diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index 3efa0a1cb..42c5cff43 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -11,7 +11,7 @@ Texture2D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`ProxyTexture`, :ref:`ViewportTexture` +**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`ProxyTexture`, :ref:`ViewportTexture` Texture for 2D and 3D. @@ -142,7 +142,9 @@ Returns the texture height. - :ref:`Image` **get_image** **(** **)** |const| -Returns an :ref:`Image` that is a copy of data from this ``Texture2D``. :ref:`Image`\ s can be accessed and manipulated directly. +Returns an :ref:`Image` that is a copy of data from this ``Texture2D`` (a new :ref:`Image` is created each time). :ref:`Image`\ s can be accessed and manipulated directly. + +\ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. ---- diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index e8b21a366..ea5ff9c2a 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -11,7 +11,7 @@ Texture3D **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D` +**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D`, :ref:`PlaceholderTexture3D` diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 316975d4d..a114b437d 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -11,7 +11,7 @@ TextureLayered **Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered` +**Inherited By:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered`, :ref:`PlaceholderTextureLayered` Base class for 3D texture types. diff --git a/classes/class_textureprogressbar.rst b/classes/class_textureprogressbar.rst index acfc00555..5fe3e19a7 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -21,41 +21,39 @@ TextureProgressBar works like :ref:`ProgressBar`, but uses up Properties ---------- -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`fill_mode` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`MouseFilter` | mouse_filter | ``1`` (overrides :ref:`Control`) | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`bool` | :ref:`nine_patch_stretch` | ``false`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`radial_center_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`float` | :ref:`radial_fill_degrees` | ``360.0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`float` | :ref:`radial_initial_angle` | ``0.0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_bottom` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_left` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_right` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`int` | :ref:`stretch_margin_top` | ``0`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_over` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_progress` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`texture_progress_offset` | ``Vector2(0, 0)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Texture2D` | :ref:`texture_under` | | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_over` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_progress` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ -| :ref:`Color` | :ref:`tint_under` | ``Color(1, 1, 1, 1)`` | -+----------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`fill_mode` | ``0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`bool` | :ref:`nine_patch_stretch` | ``false`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`radial_center_offset` | ``Vector2(0, 0)`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`radial_fill_degrees` | ``360.0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`float` | :ref:`radial_initial_angle` | ``0.0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`stretch_margin_bottom` | ``0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`stretch_margin_left` | ``0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`stretch_margin_right` | ``0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`int` | :ref:`stretch_margin_top` | ``0`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Texture2D` | :ref:`texture_over` | | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Texture2D` | :ref:`texture_progress` | | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Vector2` | :ref:`texture_progress_offset` | ``Vector2(0, 0)`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Texture2D` | :ref:`texture_under` | | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`tint_over` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`tint_progress` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ +| :ref:`Color` | :ref:`tint_under` | ``Color(1, 1, 1, 1)`` | ++-----------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ Methods ------- diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index ca212594a..d4ef506de 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -208,7 +208,7 @@ If enabled, the TileMap will see its collisions synced to the physics tick and c | *Getter* | get_collision_visibility_mode() | +-----------+--------------------------------------+ -Show or hide the TileMap's collision shapes. If set to ``VISIBILITY_MODE_DEFAULT``, this depends on the show collision debug settings. +Show or hide the TileMap's collision shapes. If set to :ref:`VISIBILITY_MODE_DEFAULT`, this depends on the show collision debug settings. ---- @@ -224,7 +224,7 @@ Show or hide the TileMap's collision shapes. If set to ``VISIBILITY_MODE_DEFAULT | *Getter* | get_navigation_visibility_mode() | +-----------+---------------------------------------+ -Show or hide the TileMap's collision shapes. If set to ``VISIBILITY_MODE_DEFAULT``, this depends on the show navigation debug settings. +Show or hide the TileMap's collision shapes. If set to :ref:`VISIBILITY_MODE_DEFAULT`, this depends on the show navigation debug settings. ---- diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index 70ddb462e..01eeb2691 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -548,7 +548,7 @@ If the TileSet has no proxy for the given identifiers, returns an empty Array. - :ref:`Array` **get_coords_level_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from **)** -Returns the coodinate-level proxy for the given identifiers. The returned array contains the two proxie's target identifiers (source ID and atlas coords ID). +Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the TileSet has no proxy for the given identifiers, returns an empty Array. diff --git a/classes/class_time.rst b/classes/class_time.rst index 5cb9bf24a..d4e4b99af 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -29,49 +29,49 @@ When getting time information from the system, the time can either be in the loc Methods ------- -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_date_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_date_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_date_string_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_date_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_string` **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_datetime_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_dict` **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_system` **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_datetime_string_from_unix_time` **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_offset_string_from_offset_minutes` **(** :ref:`int` offset_minutes **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ticks_msec` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_ticks_usec` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_time_string_from_system` **(** :ref:`bool` utc=false **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_time_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Dictionary` | :ref:`get_time_zone_from_system` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unix_time_from_datetime_dict` **(** :ref:`Dictionary` datetime **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_unix_time_from_datetime_string` **(** :ref:`String` datetime **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_unix_time_from_system` **(** **)** |const| | -+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_date_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_date_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_date_string_from_system` **(** :ref:`bool` utc=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_date_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_datetime_dict_from_datetime_string` **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_datetime_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_datetime_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_datetime_string_from_datetime_dict` **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_datetime_string_from_system` **(** :ref:`bool` utc=false, :ref:`bool` use_space=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_datetime_string_from_unix_time` **(** :ref:`int` unix_time_val, :ref:`bool` use_space=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_offset_string_from_offset_minutes` **(** :ref:`int` offset_minutes **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ticks_msec` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_ticks_usec` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_time_dict_from_system` **(** :ref:`bool` utc=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_time_dict_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_time_string_from_system` **(** :ref:`bool` utc=false **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_time_string_from_unix_time` **(** :ref:`int` unix_time_val **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Dictionary` | :ref:`get_time_zone_from_system` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unix_time_from_datetime_dict` **(** :ref:`Dictionary` datetime **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_unix_time_from_datetime_string` **(** :ref:`String` datetime **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_unix_time_from_system` **(** **)** |const| | ++-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -201,14 +201,16 @@ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). ---- -.. _class_Time_method_get_datetime_dict_from_string: +.. _class_Time_method_get_datetime_dict_from_datetime_string: -- :ref:`Dictionary` **get_datetime_dict_from_string** **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| +- :ref:`Dictionary` **get_datetime_dict_from_datetime_string** **(** :ref:`String` datetime, :ref:`bool` weekday **)** |const| Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, and ``second``. If ``weekday`` is false, then the ``weekday`` entry is excluded (the calculation is relatively expensive). +\ **Note:** Any decimal fraction in the time string will be ignored silently. + ---- .. _class_Time_method_get_datetime_dict_from_system: @@ -229,9 +231,9 @@ The returned Dictionary's values will be the same as the :ref:`get_datetime_dict ---- -.. _class_Time_method_get_datetime_string_from_dict: +.. _class_Time_method_get_datetime_string_from_datetime_dict: -- :ref:`String` **get_datetime_string_from_dict** **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| +- :ref:`String` **get_datetime_string_from_datetime_dict** **(** :ref:`Dictionary` datetime, :ref:`bool` use_space **)** |const| Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -361,6 +363,8 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str \ **Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string. +\ **Note:** Any decimal fraction in the time string will be ignored silently. + ---- .. _class_Time_method_get_unix_time_from_system: @@ -369,6 +373,8 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. +\ **Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a :ref:`float` for sub-second precision. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 0973b7dd6..004b74ba6 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -83,7 +83,7 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`orthonormalized` **(** **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` phi **)** |const| | +| :ref:`Transform2D` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`scaled` **(** :ref:`Vector2` scale **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -99,8 +99,6 @@ Methods Operators --------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform2D` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ @@ -116,8 +114,6 @@ Operators +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`operator *` **(** :ref:`int` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform2D` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`operator []` **(** :ref:`int` index **)** | @@ -315,9 +311,9 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi .. _class_Transform2D_method_rotated: -- :ref:`Transform2D` **rotated** **(** :ref:`float` phi **)** |const| +- :ref:`Transform2D` **rotated** **(** :ref:`float` angle **)** |const| -Rotates the transform by the given angle (in radians), using matrix multiplication. +Returns a copy of the transform rotated by the given ``angle`` (in radians), using matrix multiplication. ---- @@ -325,7 +321,7 @@ Rotates the transform by the given angle (in radians), using matrix multiplicati - :ref:`Transform2D` **scaled** **(** :ref:`Vector2` scale **)** |const| -Scales the transform by the given scale factor, using matrix multiplication. +Returns a copy of the transform scaled by the given ``scale`` factor, using matrix multiplication. ---- @@ -357,7 +353,7 @@ Sets the transform's skew (in radians). - :ref:`Transform2D` **translated** **(** :ref:`Vector2` offset **)** |const| -Translates the transform by the given offset, relative to the transform's basis vectors. +Returns a copy of the transform translated by the given ``offset``, relative to the transform's basis vectors. Unlike :ref:`rotated` and :ref:`scaled`, this does not use matrix multiplication. @@ -366,10 +362,6 @@ Operator Descriptions .. _class_Transform2D_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Transform2D` right **)** Returns ``true`` if the transforms are not equal. @@ -418,10 +410,6 @@ This operator multiplies all components of the ``Transform2D``, including the or .. _class_Transform2D_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Transform2D` right **)** Returns ``true`` if the transforms are exactly equal. diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index f368a412e..aad1a10da 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -71,7 +71,7 @@ Methods +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`orthonormalized` **(** **)** |const| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** |const| | +| :ref:`Transform3D` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -83,8 +83,6 @@ Methods Operators --------- -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Transform3D` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ @@ -100,8 +98,6 @@ Operators +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`operator *` **(** :ref:`int` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Transform3D` right **)** | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ @@ -231,9 +227,9 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi .. _class_Transform3D_method_rotated: -- :ref:`Transform3D` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** |const| +- :ref:`Transform3D` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| -Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. +Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians), using matrix multiplication. The ``axis`` must be a normalized vector. ---- @@ -241,7 +237,7 @@ Rotates the transform around the given axis by the given angle (in radians), usi - :ref:`Transform3D` **scaled** **(** :ref:`Vector3` scale **)** |const| -Scales basis and origin of the transform by the given scale factor, using matrix multiplication. +Returns a copy of the transform with its basis and origin scaled by the given ``scale`` factor, using matrix multiplication. ---- @@ -257,7 +253,7 @@ Returns a transform spherically interpolated between this transform and another - :ref:`Transform3D` **translated** **(** :ref:`Vector3` offset **)** |const| -Translates the transform by the given offset, relative to the transform's basis vectors. +Returns a copy of the transform translated by the given ``offset``, relative to the transform's basis vectors. Unlike :ref:`rotated` and :ref:`scaled`, this does not use matrix multiplication. @@ -266,10 +262,6 @@ Operator Descriptions .. _class_Transform3D_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Transform3D` right **)** Returns ``true`` if the transforms are not equal. @@ -318,10 +310,6 @@ This operator multiplies all components of the ``Transform3D``, including the or .. _class_Transform3D_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Transform3D` right **)** Returns ``true`` if the transforms are exactly equal. diff --git a/classes/class_tree.rst b/classes/class_tree.rst index ef9e0d16f..24ea7c756 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -118,7 +118,7 @@ Methods +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_edited_column` **(** **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** |const| | +| :ref:`Rect2` | :ref:`get_item_area_rect` **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_item_at_position` **(** :ref:`Vector2` position **)** |const| | +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -189,7 +189,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`draw_relationship_lines` | ``0`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | +| :ref:`int` | :ref:`h_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`item_margin` | ``16`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ @@ -205,7 +205,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`scroll_speed` | ``12`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`vseparation` | ``4`` | +| :ref:`int` | :ref:`v_separation` | ``4`` | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Font` | :ref:`font` | | +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ @@ -259,9 +259,9 @@ Theme Properties Signals ------- -.. _class_Tree_signal_button_pressed: +.. _class_Tree_signal_button_clicked: -- **button_pressed** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`int` id **)** +- **button_clicked** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`int` id, :ref:`int` mouse_button_index **)** Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button`). @@ -291,6 +291,14 @@ Emitted when a column's title is pressed. ---- +.. _class_Tree_signal_custom_item_clicked: + +- **custom_item_clicked** **(** :ref:`int` mouse_button_index **)** + +Emitted when an item with :ref:`TreeItem.CELL_MODE_CUSTOM` is clicked with a mouse button. + +---- + .. _class_Tree_signal_custom_popup_edited: - **custom_popup_edited** **(** :ref:`bool` arrow_clicked **)** @@ -299,19 +307,11 @@ Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM` position **)** +- **empty_clicked** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** -Emitted when the right mouse button is pressed in the empty space of the tree. - ----- - -.. _class_Tree_signal_empty_tree_rmb_selected: - -- **empty_tree_rmb_selected** **(** :ref:`Vector2` position **)** - -Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty. +Emitted when a mouse button is clicked in the empty space of the tree. ---- @@ -355,19 +355,11 @@ Emitted when an item is edited. ---- -.. _class_Tree_signal_item_rmb_edited: +.. _class_Tree_signal_item_mouse_selected: -- **item_rmb_edited** **(** **)** +- **item_mouse_selected** **(** :ref:`Vector2` position, :ref:`int` mouse_button_index **)** -Emitted when an item is edited using the right mouse button. - ----- - -.. _class_Tree_signal_item_rmb_selected: - -- **item_rmb_selected** **(** :ref:`Vector2` position **)** - -Emitted when an item is selected with the right mouse button. +Emitted when an item is selected with a mouse button. ---- @@ -781,9 +773,9 @@ Returns the column for the currently edited item. .. _class_Tree_method_get_item_area_rect: -- :ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1 **)** |const| +- :ref:`Rect2` **get_item_area_rect** **(** :ref:`TreeItem` item, :ref:`int` column=-1, :ref:`int` button_index=-1 **)** |const| -Returns the rectangle area for the specified :ref:`TreeItem`. If ``column`` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. +Returns the rectangle area for the specified :ref:`TreeItem`. If ``column`` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned. ---- @@ -1102,9 +1094,9 @@ Draws the relationship lines if not zero, this acts as a boolean. Relationship l ---- -.. _class_Tree_theme_constant_hseparation: +.. _class_Tree_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -1198,9 +1190,9 @@ The speed of border scrolling. ---- -.. _class_Tree_theme_constant_vseparation: +.. _class_Tree_theme_constant_v_separation: -- :ref:`int` **vseparation** +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``4`` | diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 1c7ac93b0..0295ae422 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -30,6 +30,8 @@ Properties +-------------------------+-----------------------------------------------------------------------------+ | :ref:`bool` | :ref:`disable_folding` | +-------------------------+-----------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`visible` | ++-------------------------+-----------------------------------------------------------------------------+ Methods ------- @@ -37,7 +39,7 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture2D` button, :ref:`int` id=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | +| void | :ref:`call_recursive` **(** :ref:`StringName` method, ... **)** |vararg| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -111,7 +113,7 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_range_config` **(** :ref:`int` column **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | +| :ref:`StructuredTextParser` | :ref:`get_structured_text_bidi_override` **(** :ref:`int` column **)** |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_structured_text_bidi_override_options` **(** :ref:`int` column **)** |const| | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -197,7 +199,7 @@ Methods +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_selectable` **(** :ref:`int` column, :ref:`bool` selectable **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | +| void | :ref:`set_structured_text_bidi_override` **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_structured_text_bidi_override_options` **(** :ref:`int` column, :ref:`Array` args **)** | +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -284,6 +286,22 @@ The custom minimum height. If ``true``, folding is disabled for this TreeItem. +---- + +.. _class_TreeItem_property_visible: + +- :ref:`bool` **visible** + ++----------+--------------------+ +| *Setter* | set_visible(value) | ++----------+--------------------+ +| *Getter* | is_visible() | ++----------+--------------------+ + +If ``true``, the ``TreeItem`` is visible (default). + +Note that if a ``TreeItem`` is set to not be visible, none of its children will be visible either. + Method Descriptions ------------------- @@ -297,7 +315,7 @@ Adds a button with :ref:`Texture2D` ``button`` at column ``colu .. _class_TreeItem_method_call_recursive: -- :ref:`Variant` **call_recursive** **(** :ref:`StringName` method, ... **)** |vararg| +- void **call_recursive** **(** :ref:`StringName` method, ... **)** |vararg| Calls the ``method`` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. @@ -601,7 +619,7 @@ Returns a dictionary containing the range parameters for a given column. The key .. _class_TreeItem_method_get_structured_text_bidi_override: -- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** :ref:`int` column **)** |const| +- :ref:`StructuredTextParser` **get_structured_text_bidi_override** **(** :ref:`int` column **)** |const| ---- @@ -947,7 +965,7 @@ If ``true``, the given column is selectable. .. _class_TreeItem_method_set_structured_text_bidi_override: -- void **set_structured_text_bidi_override** **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** +- void **set_structured_text_bidi_override** **(** :ref:`int` column, :ref:`StructuredTextParser` parser **)** ---- diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index 9073efa2c..8fb2b0523 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -21,7 +21,7 @@ Properties +---------------------------+--------------------------------------------------------------------+---------+ | :ref:`int` | :ref:`radial_steps` | ``8`` | +---------------------------+--------------------------------------------------------------------+---------+ -| :ref:`float` | :ref:`radius` | ``1.0`` | +| :ref:`float` | :ref:`radius` | ``0.5`` | +---------------------------+--------------------------------------------------------------------+---------+ | :ref:`float` | :ref:`section_length` | ``0.2`` | +---------------------------+--------------------------------------------------------------------+---------+ @@ -64,7 +64,7 @@ Property Descriptions - :ref:`float` **radius** +-----------+-------------------+ -| *Default* | ``1.0`` | +| *Default* | ``0.5`` | +-----------+-------------------+ | *Setter* | set_radius(value) | +-----------+-------------------+ diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 72bc811e0..7d569afb6 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -20,7 +20,7 @@ Tweens are mostly useful for animations requiring a numerical property to be int \ ``Tween`` is more suited than :ref:`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``; it would be difficult to do the same thing with an :ref:`AnimationPlayer` node. Tweens are also more light-weight than :ref:`AnimationPlayer`, so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped :ref:`CallbackTweener` with a delay. -A ``Tween`` can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. ``Tween``\ s created manually (i.e. by using ``Tween.new()``) are invalid. They can't be used for tweening values, but you can do manual interpolation with :ref:`interpolate_value`. +A ``Tween`` can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. ``Tween``\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. A ``Tween`` animation is composed of a sequence of :ref:`Tweener`\ s, which by default are executed one after another. You can create a sequence by appending :ref:`Tweener`\ s to the ``Tween``. Animating something with a :ref:`Tweener` is called tweening. Example tweening sequence looks like this: @@ -70,51 +70,53 @@ Some :ref:`Tweener`\ s use transitions and eases. The first accep Methods ------- -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`bind_node` **(** :ref:`Node` node **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`chain` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_running` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_valid` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`kill` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`parallel` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`pause` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`play` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_loops` **(** :ref:`int` loops=0 **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_parallel` **(** :ref:`bool` parallel=true **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_pause_mode` **(** :ref:`TweenPauseMode` mode **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_process_mode` **(** :ref:`TweenProcessMode` mode **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_speed_scale` **(** :ref:`float` speed **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Tween` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`stop` **(** **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`CallbackTweener` | :ref:`tween_callback` **(** :ref:`Callable` callback **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`IntervalTweener` | :ref:`tween_interval` **(** :ref:`float` time **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MethodTweener` | :ref:`tween_method` **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PropertyTweener` | :ref:`tween_property` **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** | -+-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`bind_node` **(** :ref:`Node` node **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`chain` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`custom_step` **(** :ref:`float` delta **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_total_elapsed_time` **(** **)** |const| | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`interpolate_value` **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_running` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_valid` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`kill` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`parallel` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`pause` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`play` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_ease` **(** :ref:`EaseType` ease **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_loops` **(** :ref:`int` loops=0 **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_parallel` **(** :ref:`bool` parallel=true **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_pause_mode` **(** :ref:`TweenPauseMode` mode **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_process_mode` **(** :ref:`TweenProcessMode` mode **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_speed_scale` **(** :ref:`float` speed **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Tween` | :ref:`set_trans` **(** :ref:`TransitionType` trans **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`stop` **(** **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`CallbackTweener` | :ref:`tween_callback` **(** :ref:`Callable` callback **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`IntervalTweener` | :ref:`tween_interval` **(** :ref:`float` time **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`MethodTweener` | :ref:`tween_method` **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PropertyTweener` | :ref:`tween_property` **(** :ref:`Object` object, :ref:`NodePath` property, :ref:`Variant` final_val, :ref:`float` duration **)** | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -288,9 +290,19 @@ Returns ``true`` if the ``Tween`` still has :ref:`Tweener`\ s tha ---- +.. _class_Tween_method_get_total_elapsed_time: + +- :ref:`float` **get_total_elapsed_time** **(** **)** |const| + +Returns the total time in seconds the ``Tween`` has been animating (i.e. time since it started, not counting pauses etc.). The time is affected by :ref:`set_speed_scale` and :ref:`stop` will reset it to ``0``. + +\ **Note:** As it results from accumulating frame deltas, the time returned after the ``Tween`` has finished animating will be slightly greater than the actual ``Tween`` duration. + +---- + .. _class_Tween_method_interpolate_value: -- :ref:`Variant` **interpolate_value** **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** +- :ref:`Variant` **interpolate_value** **(** :ref:`Variant` initial_value, :ref:`Variant` delta_value, :ref:`float` elapsed_time, :ref:`float` duration, :ref:`TransitionType` trans_type, :ref:`EaseType` ease_type **)** |static| This method can be used for manual interpolation of a value, when you don't want ``Tween`` to do animating for you. It's similar to :ref:`@GlobalScope.lerp`, but with support for custom transition and easing. @@ -318,7 +330,7 @@ Returns whether the ``Tween`` is currently running, i.e. it wasn't paused and it - :ref:`bool` **is_valid** **(** **)** -Returns whether the ``Tween`` is valid. A valid ``Tween`` is a ``Tween`` contained by the scene tree (i.e. the array from :ref:`SceneTree.get_processed_tweens` will contain this ``Tween``). ``Tween`` might become invalid when it has finished tweening or was killed, also when created with ``Tween.new()``. Invalid ``Tween`` can't have :ref:`Tweener`\ s appended, because it can't animate them. You can however still use :ref:`interpolate_value`. +Returns whether the ``Tween`` is valid. A valid ``Tween`` is a ``Tween`` contained by the scene tree (i.e. the array from :ref:`SceneTree.get_processed_tweens` will contain this ``Tween``). ``Tween`` might become invalid when it has finished tweening or was killed, also when created with ``Tween.new()``. Invalid ``Tween`` can't have :ref:`Tweener`\ s appended, because it can't animate them. ---- @@ -479,10 +491,10 @@ Example: creating an object that moves back and forth and jumps every few second :: var tween = create_tween().set_loops() - tween.tween_property("position:x", 200, 1).as_relative() + tween.tween_property($Sprite, "position:x", 200.0, 1).as_relative() tween.tween_callback(jump) tween.tween_interval(2) - tween.tween_property("position:x", -200, 1).as_relative() + tween.tween_property($Sprite, "position:x", -200.0, 1).as_relative() tween.tween_callback(jump) tween.tween_interval(2) @@ -523,8 +535,8 @@ Creates and appends a :ref:`PropertyTweener`. This method :: var tween = create_tween() - tween.tween_property($Sprite, "position", Vector2(100, 200) - tween.tween_property($Sprite, "position", Vector2(200, 300) + tween.tween_property($Sprite, "position", Vector2(100, 200), 1) + tween.tween_property($Sprite, "position", Vector2(200, 300), 1) will move the sprite to position (100, 200) and then to (200, 300). If you use :ref:`PropertyTweener.from` or :ref:`PropertyTweener.from_current`, the starting position will be overwritten by the given value instead. See other methods in :ref:`PropertyTweener` to see how the tweening can be tweaked further. @@ -535,8 +547,8 @@ Example: moving object twice from the same position, with different transition t :: var tween = create_tween() - tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().set_trans(Tween.TRANS_SINE) - tween.tween_property($Sprite, "position", Vector2.RIGHT * 300).as_relative().from_current().set_trans(Tween.TRANS_EXPO) + tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1).as_relative().set_trans(Tween.TRANS_SINE) + tween.tween_property($Sprite, "position", Vector2.RIGHT * 300, 1).as_relative().from_current().set_trans(Tween.TRANS_EXPO) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_tweener.rst b/classes/class_tweener.rst index 6d00f3667..106b8bdb1 100644 --- a/classes/class_tweener.rst +++ b/classes/class_tweener.rst @@ -18,7 +18,7 @@ Abstract class for all Tweeners used by :ref:`Tween`. Description ----------- -Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A ``Tweener`` can't be created manually, you need to use a dedicated method from :ref:`Tween` or :ref:`Node`. +Tweeners are objects that perform a specific animating task, e.g. interpolating a property or calling a method at a given time. A ``Tweener`` can't be created manually, you need to use a dedicated method from :ref:`Tween`. Signals ------- diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index fa9732344..bf1d70f1c 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -23,6 +23,8 @@ Vertical box container. See :ref:`BoxContainer`. Tutorials --------- +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + - `3D Voxel Demo `__ Theme Properties diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index dd7ed6a6e..39fc86258 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -123,7 +123,7 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`reflect` **(** :ref:`Vector2` n **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` phi **)** |const| | +| :ref:`Vector2` | :ref:`rotated` **(** :ref:`float` angle **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`round` **(** **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -139,8 +139,6 @@ Methods Operators --------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ @@ -166,8 +164,6 @@ Operators +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2` right **)** | @@ -557,9 +553,9 @@ Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined b .. _class_Vector2_method_rotated: -- :ref:`Vector2` **rotated** **(** :ref:`float` phi **)** |const| +- :ref:`Vector2` **rotated** **(** :ref:`float` angle **)** |const| -Returns the vector rotated by ``phi`` radians. See also :ref:`@GlobalScope.deg2rad`. +Returns the vector rotated by ``angle`` (in radians). See also :ref:`@GlobalScope.deg2rad`. ---- @@ -608,10 +604,6 @@ Operator Descriptions .. _class_Vector2_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Vector2` right **)** Returns ``true`` if the vectors are not equal. @@ -716,10 +708,6 @@ Compares two ``Vector2`` vectors by first checking if the X value of the left ve .. _class_Vector2_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Vector2` right **)** Returns ``true`` if the vectors are exactly equal. diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 6eabd60c9..6e90c5d1c 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -75,8 +75,6 @@ Methods Operators --------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -104,8 +102,6 @@ Operators +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector2i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector2i` right **)** | @@ -278,10 +274,6 @@ Operator Descriptions .. _class_Vector2i_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Vector2i` right **)** Returns ``true`` if the vectors are not equal. @@ -408,10 +400,6 @@ Compares two ``Vector2i`` vectors by first checking if the X value of the left v .. _class_Vector2i_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Vector2i` right **)** Returns ``true`` if the vectors are equal. diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index b6737cdcf..7ffcdd62a 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -14,7 +14,7 @@ Vector used for 3D math using floating point coordinates. Description ----------- -3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. +3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. It uses floating-point coordinates. See :ref:`Vector3i` for its integer counterpart. @@ -123,7 +123,7 @@ Methods +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`reflect` **(** :ref:`Vector3` n **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` by_axis, :ref:`float` phi **)** |const| | +| :ref:`Vector3` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`round` **(** **)** |const| | +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -141,8 +141,6 @@ Methods Operators --------- -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ @@ -172,8 +170,6 @@ Operators +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3` right **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3` right **)** | @@ -553,9 +549,9 @@ Returns this vector reflected from a plane defined by the given normal. .. _class_Vector3_method_rotated: -- :ref:`Vector3` **rotated** **(** :ref:`Vector3` by_axis, :ref:`float` phi **)** |const| +- :ref:`Vector3` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| -Rotates this vector around a given axis by ``phi`` radians. The axis must be a normalized vector. +Rotates this vector around a given axis by ``angle`` (in radians). The axis must be a normalized vector. ---- @@ -612,10 +608,6 @@ Operator Descriptions .. _class_Vector3_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Vector3` right **)** Returns ``true`` if the vectors are not equal. @@ -732,10 +724,6 @@ Compares two ``Vector3`` vectors by first checking if the X value of the left ve .. _class_Vector3_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Vector3` right **)** Returns ``true`` if the vectors are exactly equal. diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index 41f054d24..76caccbc0 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -14,7 +14,7 @@ Vector used for 3D math using integer coordinates. Description ----------- -3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. +3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. It uses integer coordinates and is therefore preferable to :ref:`Vector3` when exact precision is required. @@ -75,8 +75,6 @@ Methods Operators --------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator !=` **(** **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ @@ -104,8 +102,6 @@ Operators +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`operator ==` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`Vector3i` right **)** | +---------------------------------+-----------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`Vector3i` right **)** | @@ -294,10 +290,6 @@ Operator Descriptions .. _class_Vector3i_operator_neq_bool: -- :ref:`bool` **operator !=** **(** **)** - ----- - - :ref:`bool` **operator !=** **(** :ref:`Vector3i` right **)** Returns ``true`` if the vectors are not equal. @@ -322,7 +314,7 @@ Gets the remainder of each component of the ``Vector3i`` with the the given :ref :: - print(Vector2i(10, -20, 30) % 7) # Prints "(3, -6, 2)" + print(Vector3i(10, -20, 30) % 7) # Prints "(3, -6, 2)" ---- @@ -424,10 +416,6 @@ Compares two ``Vector3i`` vectors by first checking if the X value of the left v .. _class_Vector3i_operator_eq_bool: -- :ref:`bool` **operator ==** **(** **)** - ----- - - :ref:`bool` **operator ==** **(** :ref:`Vector3i` right **)** Returns ``true`` if the vectors are equal. diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index 9d36acce6..c755737b3 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -91,7 +91,7 @@ A negative value will result in the vehicle reversing. | *Getter* | get_steering() | +-----------+---------------------+ -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 :ref:`VehicleWheel3D.use_as_steering` set to ``true`` will automatically be rotated. +The steering angle for the vehicle, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have :ref:`VehicleWheel3D.use_as_steering` set to ``true`` will automatically be rotated. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 37b143457..e893f3cb5 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -154,7 +154,7 @@ A negative value will result in the wheel reversing. | *Getter* | get_steering() | +-----------+---------------------+ -The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. +The steering angle for the wheel, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. ---- diff --git a/classes/class_vflowcontainer.rst b/classes/class_vflowcontainer.rst index 90a43af42..9d6ac4a81 100644 --- a/classes/class_vflowcontainer.rst +++ b/classes/class_vflowcontainer.rst @@ -21,18 +21,18 @@ Vertical version of :ref:`FlowContainer`. Theme Properties ---------------- -+-----------------------+---------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`hseparation` | ``4`` | -+-----------------------+---------------------------------------------------------------------+-------+ -| :ref:`int` | :ref:`vseparation` | ``4`` | -+-----------------------+---------------------------------------------------------------------+-------+ ++-----------------------+-----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`h_separation` | ``4`` | ++-----------------------+-----------------------------------------------------------------------+-------+ +| :ref:`int` | :ref:`v_separation` | ``4`` | ++-----------------------+-----------------------------------------------------------------------+-------+ Theme Property Descriptions --------------------------- -.. _class_VFlowContainer_theme_constant_hseparation: +.. _class_VFlowContainer_theme_constant_h_separation: -- :ref:`int` **hseparation** +- :ref:`int` **h_separation** +-----------+-------+ | *Default* | ``4`` | @@ -42,9 +42,9 @@ The horizontal separation of children nodes. ---- -.. _class_VFlowContainer_theme_constant_vseparation: +.. _class_VFlowContainer_theme_constant_v_separation: -- :ref:`int` **vseparation** +- :ref:`int` **v_separation** +-----------+-------+ | *Default* | ``4`` | diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index d38f63582..f056aee56 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -119,6 +119,8 @@ Properties +-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_occlusion_culling` | ``false`` | +-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`use_taa` | ``false`` | ++-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`use_xr` | ``false`` | +-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------+ | :ref:`World2D` | :ref:`world_2d` | | @@ -162,8 +164,6 @@ Methods +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`gui_release_focus` **(** **)** | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_embedding_subwindows` **(** **)** |const| | -+---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_input_handled` **(** **)** |const| | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`push_input` **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** | @@ -176,7 +176,7 @@ Methods +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shadow_atlas_quadrant_subdiv` **(** :ref:`int` quadrant, :ref:`ShadowAtlasQuadrantSubdiv` subdiv **)** | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`warp_mouse` **(** :ref:`Vector2` to_position **)** | +| void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals @@ -247,9 +247,9 @@ enum **ShadowAtlasQuadrantSubdiv**: enum **Scaling3DMode**: -- **SCALING_3D_MODE_BILINEAR** = **0** --- Enables bilinear scaling on 3D viewports. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. +- **SCALING_3D_MODE_BILINEAR** = **0** --- Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will result in undersampling while values greater than ``1.0`` will result in supersampling. A value of ``1.0`` disables scaling. -- **SCALING_3D_MODE_FSR** = **1** --- Enables FSR upscaling on 3D viewports. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear supersampling will be used instead. A value of ``1.0`` disables scaling. +- **SCALING_3D_MODE_FSR** = **1** --- Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale`. Values less then ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. - **SCALING_3D_MODE_MAX** = **2** --- Represents the size of the :ref:`Scaling3DMode` enum. @@ -391,6 +391,8 @@ enum **RenderInfoType**: .. _class_Viewport_constant_DEBUG_DRAW_OCCLUDERS: +.. _class_Viewport_constant_DEBUG_DRAW_MOTION_VECTORS: + enum **DebugDraw**: - **DEBUG_DRAW_DISABLED** = **0** --- Objects are displayed normally. @@ -443,6 +445,8 @@ enum **DebugDraw**: - **DEBUG_DRAW_OCCLUDERS** = **24** +- **DEBUG_DRAW_MOTION_VECTORS** = **25** + ---- .. _enum_Viewport_DefaultCanvasItemTextureFilter: @@ -722,13 +726,15 @@ If ``true``, the viewport will not receive input events. - :ref:`bool` **gui_embed_subwindows** -+-----------+----------------------------------+ -| *Default* | ``false`` | -+-----------+----------------------------------+ -| *Setter* | set_embed_subwindows_hint(value) | -+-----------+----------------------------------+ -| *Getter* | get_embed_subwindows_hint() | -+-----------+----------------------------------+ ++-----------+---------------------------------+ +| *Default* | ``false`` | ++-----------+---------------------------------+ +| *Setter* | set_embedding_subwindows(value) | ++-----------+---------------------------------+ +| *Getter* | is_embedding_subwindows() | ++-----------+---------------------------------+ + +If ``true``, sub-windows (popups and dialogs) will be embedded inside application window as control-like nodes. If ``false``, they will appear as separate windows handled by the operating system. ---- @@ -810,7 +816,7 @@ The multisample anti-aliasing mode. A higher number results in smoother edges at | *Getter* | is_using_own_world_3d() | +-----------+-----------------------------+ -If ``true``, the viewport will use the :ref:`World3D` defined in :ref:`world_3d`. +If ``true``, the viewport will use a unique copy of the :ref:`World3D` defined in :ref:`world_3d`. ---- @@ -1084,6 +1090,24 @@ If ``true``, :ref:`OccluderInstance3D` nodes will be u ---- +.. _class_Viewport_property_use_taa: + +- :ref:`bool` **use_taa** + ++-----------+--------------------+ +| *Default* | ``false`` | ++-----------+--------------------+ +| *Setter* | set_use_taa(value) | ++-----------+--------------------+ +| *Getter* | is_using_taa() | ++-----------+--------------------+ + +Enables Temporal Anti-Aliasing for this viewport. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. + +\ **Note:** The implementation is not complete yet, some visual instances such as particles and skinned meshes may show artifacts. + +---- + .. _class_Viewport_property_use_xr: - :ref:`bool` **use_xr** @@ -1197,22 +1221,13 @@ Returns the :ref:`ShadowAtlasQuadrantSubdiv` is flipped vertically. You can use :ref:`Image.flip_y` on the result of :ref:`Texture2D.get_image` to flip it back, for example: - - -.. tabs:: - - .. code-tab:: gdscript - - var img = get_viewport().get_texture().get_image() - img.flip_y() - - .. code-tab:: csharp - - Image img = GetViewport().GetTexture().GetImage(); - img.FlipY(); +\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw` signal. +:: + func _ready(): + await RenderingServer.frame_post_draw + $Viewport.get_texture().get_image().save_png("user://Screenshot.png") ---- @@ -1262,6 +1277,8 @@ Returns ``true`` if the drag operation is successful. Returns ``true`` if the viewport is currently performing a drag operation. +Alternative to :ref:`Node.NOTIFICATION_DRAG_BEGIN` and :ref:`Node.NOTIFICATION_DRAG_END` when you prefer polling the value. + ---- .. _class_Viewport_method_gui_release_focus: @@ -1272,12 +1289,6 @@ Removes the focus from the currently focused :ref:`Control` withi ---- -.. _class_Viewport_method_is_embedding_subwindows: - -- :ref:`bool` **is_embedding_subwindows** **(** **)** |const| - ----- - .. _class_Viewport_method_is_input_handled: - :ref:`bool` **is_input_handled** **(** **)** |const| @@ -1322,7 +1333,7 @@ Sets the number of subdivisions to use in the specified quadrant. A higher numbe .. _class_Viewport_method_warp_mouse: -- void **warp_mouse** **(** :ref:`Vector2` to_position **)** +- void **warp_mouse** **(** :ref:`Vector2` position **)** Moves the mouse pointer to the specified position in this ``Viewport`` using the coordinate system of this ``Viewport``. diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index 8c599d7a1..829045109 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -34,11 +34,9 @@ Tutorials Properties ---------- -+---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ -| :ref:`bool` | resource_local_to_scene | ``true`` (overrides :ref:`Resource`) | -+---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ -| :ref:`NodePath` | :ref:`viewport_path` | ``NodePath("")`` | -+---------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------+ ++---------------------------------+--------------------------------------------------------------------+------------------+ +| :ref:`NodePath` | :ref:`viewport_path` | ``NodePath("")`` | ++---------------------------------+--------------------------------------------------------------------+------------------+ Property Descriptions --------------------- diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index a64cab03e..5a6f05c05 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -23,9 +23,9 @@ The ``VisualInstance3D`` is used to connect a resource to a visual representatio Properties ---------- -+-----------------------+-------------------------------------------------------+-------+ -| :ref:`int` | :ref:`layers` | ``1`` | -+-----------------------+-------------------------------------------------------+-------+ ++-----------------------+-------------------------------------------------------+ +| :ref:`int` | :ref:`layers` | ++-----------------------+-------------------------------------------------------+ Methods ------- @@ -55,18 +55,18 @@ Property Descriptions - :ref:`int` **layers** -+-----------+-----------------------+ -| *Default* | ``1`` | -+-----------+-----------------------+ -| *Setter* | set_layer_mask(value) | -+-----------+-----------------------+ -| *Getter* | get_layer_mask() | -+-----------+-----------------------+ ++----------+-----------------------+ +| *Setter* | set_layer_mask(value) | ++----------+-----------------------+ +| *Getter* | get_layer_mask() | ++----------+-----------------------+ The render layer(s) this ``VisualInstance3D`` is drawn on. This object will only be visible for :ref:`Camera3D`\ s whose cull mask includes the render object this ``VisualInstance3D`` is set to. +For :ref:`Light3D`\ s, this can be used to control which ``VisualInstance3D``\ s are affected by a specific light. For :ref:`GPUParticles3D`, this can be used to control which particles are effected by a specific attractor. For :ref:`Decal`\ s, this can be used to control which ``VisualInstance3D``\ s are affected by a specific decal. + Method Descriptions ------------------- diff --git a/classes/class_visualscript.rst b/classes/class_visualscript.rst index f7fe3045a..7f738a900 100644 --- a/classes/class_visualscript.rst +++ b/classes/class_visualscript.rst @@ -107,7 +107,7 @@ Methods +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_node_position` **(** :ref:`int` id, :ref:`Vector2` position **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_scroll` **(** :ref:`Vector2` ofs **)** | +| void | :ref:`set_scroll` **(** :ref:`Vector2` offset **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_variable_default_value` **(** :ref:`StringName` name, :ref:`Variant` value **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -436,7 +436,7 @@ Set the node position in the VisualScript graph. .. _class_VisualScript_method_set_scroll: -- void **set_scroll** **(** :ref:`Vector2` ofs **)** +- void **set_scroll** **(** :ref:`Vector2` offset **)** Set the screen center to the given position. diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index be45e524f..83b162355 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -149,6 +149,8 @@ enum **VaryingMode**: .. _class_VisualShader_constant_VARYING_TYPE_VECTOR_3D: +.. _class_VisualShader_constant_VARYING_TYPE_VECTOR_4D: + .. _class_VisualShader_constant_VARYING_TYPE_COLOR: .. _class_VisualShader_constant_VARYING_TYPE_TRANSFORM: @@ -163,11 +165,13 @@ enum **VaryingType**: - **VARYING_TYPE_VECTOR_3D** = **2** -- **VARYING_TYPE_COLOR** = **3** +- **VARYING_TYPE_VECTOR_4D** = **3** -- **VARYING_TYPE_TRANSFORM** = **4** +- **VARYING_TYPE_COLOR** = **4** -- **VARYING_TYPE_MAX** = **5** +- **VARYING_TYPE_TRANSFORM** = **5** + +- **VARYING_TYPE_MAX** = **6** Constants --------- diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index 9f809a03f..cc7e2226d 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -71,6 +71,8 @@ Enumerations .. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_3D: +.. _class_VisualShaderNode_constant_PORT_TYPE_VECTOR_4D: + .. _class_VisualShaderNode_constant_PORT_TYPE_BOOLEAN: .. _class_VisualShaderNode_constant_PORT_TYPE_TRANSFORM: @@ -89,13 +91,15 @@ enum **PortType**: - **PORT_TYPE_VECTOR_3D** = **3** --- 3D vector of floating-point values. Translated to ``vec3`` type in shader code. -- **PORT_TYPE_BOOLEAN** = **4** --- Boolean type. Translated to ``bool`` type in shader code. +- **PORT_TYPE_VECTOR_4D** = **4** --- 4D vector of floating-point values. Translated to ``vec4`` type in shader code. -- **PORT_TYPE_TRANSFORM** = **5** --- Transform type. Translated to ``mat4`` type in shader code. +- **PORT_TYPE_BOOLEAN** = **5** --- Boolean type. Translated to ``bool`` type in shader code. -- **PORT_TYPE_SAMPLER** = **6** --- Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. +- **PORT_TYPE_TRANSFORM** = **6** --- Transform type. Translated to ``mat4`` type in shader code. -- **PORT_TYPE_MAX** = **7** --- Represents the size of the :ref:`PortType` enum. +- **PORT_TYPE_SAMPLER** = **7** --- Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. + +- **PORT_TYPE_MAX** = **8** --- Represents the size of the :ref:`PortType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodeclamp.rst b/classes/class_visualshadernodeclamp.rst index dbebc8b25..f0f12d1c7 100644 --- a/classes/class_visualshadernodeclamp.rst +++ b/classes/class_visualshadernodeclamp.rst @@ -38,6 +38,8 @@ Enumerations .. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_3D: +.. _class_VisualShaderNodeClamp_constant_OP_TYPE_VECTOR_4D: + .. _class_VisualShaderNodeClamp_constant_OP_TYPE_MAX: enum **OpType**: @@ -50,7 +52,9 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. -- **OP_TYPE_MAX** = **4** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **4** --- A 4D vector type. + +- **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodecolorfunc.rst b/classes/class_visualshadernodecolorfunc.rst index a0d159e66..295bf45ab 100644 --- a/classes/class_visualshadernodecolorfunc.rst +++ b/classes/class_visualshadernodecolorfunc.rst @@ -32,6 +32,10 @@ Enumerations .. _class_VisualShaderNodeColorFunc_constant_FUNC_GRAYSCALE: +.. _class_VisualShaderNodeColorFunc_constant_FUNC_HSV2RGB: + +.. _class_VisualShaderNodeColorFunc_constant_FUNC_RGB2HSV: + .. _class_VisualShaderNodeColorFunc_constant_FUNC_SEPIA: .. _class_VisualShaderNodeColorFunc_constant_FUNC_MAX: @@ -48,7 +52,11 @@ enum **Function**: float max3 = max(max1, max2); return vec3(max3, max3, max3); -- **FUNC_SEPIA** = **1** --- Applies sepia tone effect using the following formula: +- **FUNC_HSV2RGB** = **1** --- Converts HSV vector to RGB equivalent. + +- **FUNC_RGB2HSV** = **2** --- Converts RGB vector to HSV equivalent. + +- **FUNC_SEPIA** = **3** --- Applies sepia tone effect using the following formula: :: @@ -58,7 +66,7 @@ enum **Function**: float b = (c.r * 0.272) + (c.g * 0.534) + (c.b * 0.131); return vec3(r, g, b); -- **FUNC_MAX** = **2** --- Represents the size of the :ref:`Function` enum. +- **FUNC_MAX** = **4** --- Represents the size of the :ref:`Function` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodecompare.rst b/classes/class_visualshadernodecompare.rst index 81eb22a62..f440e35df 100644 --- a/classes/class_visualshadernodecompare.rst +++ b/classes/class_visualshadernodecompare.rst @@ -42,6 +42,8 @@ Enumerations .. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D: +.. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_4D: + .. _class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN: .. _class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM: @@ -58,11 +60,13 @@ enum **ComparisonType**: - **CTYPE_VECTOR_3D** = **3** --- A 3D vector type. -- **CTYPE_BOOLEAN** = **4** --- A boolean type. +- **CTYPE_VECTOR_4D** = **4** --- A 4D vector type. -- **CTYPE_TRANSFORM** = **5** --- A transform (``mat4``) type. +- **CTYPE_BOOLEAN** = **5** --- A boolean type. -- **CTYPE_MAX** = **6** --- Represents the size of the :ref:`ComparisonType` enum. +- **CTYPE_TRANSFORM** = **6** --- A transform (``mat4``) type. + +- **CTYPE_MAX** = **7** --- Represents the size of the :ref:`ComparisonType` enum. ---- diff --git a/classes/class_visualshadernodeconstant.rst b/classes/class_visualshadernodeconstant.rst index afbc9e466..b22036ae2 100644 --- a/classes/class_visualshadernodeconstant.rst +++ b/classes/class_visualshadernodeconstant.rst @@ -11,7 +11,7 @@ VisualShaderNodeConstant **Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeFloatConstant`, :ref:`VisualShaderNodeIntConstant`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeVec2Constant`, :ref:`VisualShaderNodeVec3Constant` +**Inherited By:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeFloatConstant`, :ref:`VisualShaderNodeIntConstant`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeVec2Constant`, :ref:`VisualShaderNodeVec3Constant`, :ref:`VisualShaderNodeVec4Constant` A base type for the constants within the visual shader graph. diff --git a/classes/class_visualshadernodederivativefunc.rst b/classes/class_visualshadernodederivativefunc.rst index afe32465a..c9c84b5f0 100644 --- a/classes/class_visualshadernodederivativefunc.rst +++ b/classes/class_visualshadernodederivativefunc.rst @@ -38,6 +38,8 @@ Enumerations .. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_3D: +.. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_VECTOR_4D: + .. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_MAX: enum **OpType**: @@ -48,7 +50,9 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D** = **2** --- A 3D vector type. -- **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **3** --- A 4D vector type. + +- **OP_TYPE_MAX** = **4** --- Represents the size of the :ref:`OpType` enum. ---- diff --git a/classes/class_visualshadernodefloatfunc.rst b/classes/class_visualshadernodefloatfunc.rst index b10eb4f78..b036f7ac6 100644 --- a/classes/class_visualshadernodefloatfunc.rst +++ b/classes/class_visualshadernodefloatfunc.rst @@ -64,7 +64,7 @@ Enumerations .. _class_VisualShaderNodeFloatFunc_constant_FUNC_CEIL: -.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRAC: +.. _class_VisualShaderNodeFloatFunc_constant_FUNC_FRACT: .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SATURATE: @@ -132,7 +132,7 @@ enum **Function**: - **FUNC_CEIL** = **16** --- Finds the nearest integer that is greater than or equal to the parameter. Translates to ``ceil(x)`` in the Godot Shader Language. -- **FUNC_FRAC** = **17** --- Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language. +- **FUNC_FRACT** = **17** --- Computes the fractional part of the argument. Translates to ``fract(x)`` in the Godot Shader Language. - **FUNC_SATURATE** = **18** --- Clamps the value between ``0.0`` and ``1.0`` using ``min(max(x, 0.0), 1.0)``. diff --git a/classes/class_visualshadernodemix.rst b/classes/class_visualshadernodemix.rst index 71b1a5a8e..156943657 100644 --- a/classes/class_visualshadernodemix.rst +++ b/classes/class_visualshadernodemix.rst @@ -40,6 +40,10 @@ Enumerations .. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_3D_SCALAR: +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D: + +.. _class_VisualShaderNodeMix_constant_OP_TYPE_VECTOR_4D_SCALAR: + .. _class_VisualShaderNodeMix_constant_OP_TYPE_MAX: enum **OpType**: @@ -54,7 +58,11 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``a`` and ``b`` ports use a 3D vector type. The ``weight`` port uses a scalar type. -- **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. + +- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodemultiplyadd.rst b/classes/class_visualshadernodemultiplyadd.rst index 6d8282de4..9c6178f5c 100644 --- a/classes/class_visualshadernodemultiplyadd.rst +++ b/classes/class_visualshadernodemultiplyadd.rst @@ -36,6 +36,8 @@ Enumerations .. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_3D: +.. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_VECTOR_4D: + .. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_MAX: enum **OpType**: @@ -46,7 +48,9 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D** = **2** --- A 3D vector type. -- **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **3** --- A 4D vector type. + +- **OP_TYPE_MAX** = **4** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodesmoothstep.rst b/classes/class_visualshadernodesmoothstep.rst index 649f9e558..a4801edd2 100644 --- a/classes/class_visualshadernodesmoothstep.rst +++ b/classes/class_visualshadernodesmoothstep.rst @@ -42,6 +42,10 @@ Enumerations .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_3D_SCALAR: +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D: + +.. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_VECTOR_4D_SCALAR: + .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_MAX: enum **OpType**: @@ -56,7 +60,11 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``x`` port uses a 3D vector type. The first two ports use a floating-point scalar type. -- **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. + +- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodestep.rst b/classes/class_visualshadernodestep.rst index 600b2b981..cddd28394 100644 --- a/classes/class_visualshadernodestep.rst +++ b/classes/class_visualshadernodestep.rst @@ -42,6 +42,10 @@ Enumerations .. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_3D_SCALAR: +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D: + +.. _class_VisualShaderNodeStep_constant_OP_TYPE_VECTOR_4D_SCALAR: + .. _class_VisualShaderNodeStep_constant_OP_TYPE_MAX: enum **OpType**: @@ -56,7 +60,11 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D_SCALAR** = **4** --- The ``x`` port uses a 3D vector type, while the ``edge`` port uses a floating-point scalar type. -- **OP_TYPE_MAX** = **5** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **5** --- A 4D vector type. + +- **OP_TYPE_VECTOR_4D_SCALAR** = **6** --- The ``a`` and ``b`` ports use a 4D vector type. The ``weight`` port uses a scalar type. + +- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodeswitch.rst b/classes/class_visualshadernodeswitch.rst index 2f912cdd8..2085eba8f 100644 --- a/classes/class_visualshadernodeswitch.rst +++ b/classes/class_visualshadernodeswitch.rst @@ -38,6 +38,8 @@ Enumerations .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_3D: +.. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_4D: + .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_BOOLEAN: .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_TRANSFORM: @@ -54,11 +56,13 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type. -- **OP_TYPE_BOOLEAN** = **4** --- A boolean type. +- **OP_TYPE_VECTOR_4D** = **4** --- A 4D vector type. -- **OP_TYPE_TRANSFORM** = **5** --- A transform type. +- **OP_TYPE_BOOLEAN** = **5** --- A boolean type. -- **OP_TYPE_MAX** = **6** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_TRANSFORM** = **6** --- A transform type. + +- **OP_TYPE_MAX** = **7** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodetextureuniform.rst b/classes/class_visualshadernodetextureuniform.rst index c4a5a857e..72452f907 100644 --- a/classes/class_visualshadernodetextureuniform.rst +++ b/classes/class_visualshadernodetextureuniform.rst @@ -52,7 +52,7 @@ enum **TextureType**: - **TYPE_DATA** = **0** --- No hints are added to the uniform declaration. -- **TYPE_COLOR** = **1** --- Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. +- **TYPE_COLOR** = **1** --- Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. - **TYPE_NORMAL_MAP** = **2** --- Adds ``hint_normal`` as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. diff --git a/classes/class_visualshadernodeuniform.rst b/classes/class_visualshadernodeuniform.rst index 7e5bda2e2..20545046a 100644 --- a/classes/class_visualshadernodeuniform.rst +++ b/classes/class_visualshadernodeuniform.rst @@ -11,7 +11,7 @@ VisualShaderNodeUniform **Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBooleanUniform`, :ref:`VisualShaderNodeColorUniform`, :ref:`VisualShaderNodeFloatUniform`, :ref:`VisualShaderNodeIntUniform`, :ref:`VisualShaderNodeTextureUniform`, :ref:`VisualShaderNodeTransformUniform`, :ref:`VisualShaderNodeVec2Uniform`, :ref:`VisualShaderNodeVec3Uniform` +**Inherited By:** :ref:`VisualShaderNodeBooleanUniform`, :ref:`VisualShaderNodeColorUniform`, :ref:`VisualShaderNodeFloatUniform`, :ref:`VisualShaderNodeIntUniform`, :ref:`VisualShaderNodeTextureUniform`, :ref:`VisualShaderNodeTransformUniform`, :ref:`VisualShaderNodeVec2Uniform`, :ref:`VisualShaderNodeVec3Uniform`, :ref:`VisualShaderNodeVec4Uniform` A base type for the uniforms within the visual shader graph. diff --git a/classes/class_visualshadernodevec4constant.rst b/classes/class_visualshadernodevec4constant.rst new file mode 100644 index 000000000..07ce0a8fc --- /dev/null +++ b/classes/class_visualshadernodevec4constant.rst @@ -0,0 +1,50 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the VisualShaderNodeVec4Constant.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_VisualShaderNodeVec4Constant: + +VisualShaderNodeVec4Constant +============================ + +**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A 4D vector (represented as a :ref:`Quaternion`) constant to be used within the visual shader graph. + +Description +----------- + +A constant 4D vector (represented as a :ref:`Quaternion`), which can be used as an input node. + +Properties +---------- + ++-------------------------------------+-----------------------------------------------------------------------+----------------------------+ +| :ref:`Quaternion` | :ref:`constant` | ``Quaternion(0, 0, 0, 1)`` | ++-------------------------------------+-----------------------------------------------------------------------+----------------------------+ + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeVec4Constant_property_constant: + +- :ref:`Quaternion` **constant** + ++-----------+----------------------------+ +| *Default* | ``Quaternion(0, 0, 0, 1)`` | ++-----------+----------------------------+ +| *Setter* | set_constant(value) | ++-----------+----------------------------+ +| *Getter* | get_constant() | ++-----------+----------------------------+ + +A 4D vector (represented as a :ref:`Quaternion`) constant which represents the state of this node. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualshadernodevec4uniform.rst b/classes/class_visualshadernodevec4uniform.rst new file mode 100644 index 000000000..e86049ccb --- /dev/null +++ b/classes/class_visualshadernodevec4uniform.rst @@ -0,0 +1,68 @@ +:github_url: hide + +.. Generated automatically by doc/tools/make_rst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the VisualShaderNodeVec4Uniform.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_VisualShaderNodeVec4Uniform: + +VisualShaderNodeVec4Uniform +=========================== + +**Inherits:** :ref:`VisualShaderNodeUniform` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +A 4D vector (represented as a :ref:`Quaternion`) uniform to be used within the visual shader graph. + +Description +----------- + +Translated to ``uniform vec4`` in the shader language. + +Properties +---------- + ++-------------------------------------+------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`Quaternion` | :ref:`default_value` | ``Quaternion(0, 0, 0, 1)`` | ++-------------------------------------+------------------------------------------------------------------------------------------------+----------------------------+ +| :ref:`bool` | :ref:`default_value_enabled` | ``false`` | ++-------------------------------------+------------------------------------------------------------------------------------------------+----------------------------+ + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeVec4Uniform_property_default_value: + +- :ref:`Quaternion` **default_value** + ++-----------+----------------------------+ +| *Default* | ``Quaternion(0, 0, 0, 1)`` | ++-----------+----------------------------+ +| *Setter* | set_default_value(value) | ++-----------+----------------------------+ +| *Getter* | get_default_value() | ++-----------+----------------------------+ + +A default value to be assigned within the shader. + +---- + +.. _class_VisualShaderNodeVec4Uniform_property_default_value_enabled: + +- :ref:`bool` **default_value_enabled** + ++-----------+----------------------------------+ +| *Default* | ``false`` | ++-----------+----------------------------------+ +| *Setter* | set_default_value_enabled(value) | ++-----------+----------------------------------+ +| *Getter* | is_default_value_enabled() | ++-----------+----------------------------------+ + +Enables usage of the :ref:`default_value`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` diff --git a/classes/class_visualshadernodevectorbase.rst b/classes/class_visualshadernodevectorbase.rst index 0590e068a..46a522904 100644 --- a/classes/class_visualshadernodevectorbase.rst +++ b/classes/class_visualshadernodevectorbase.rst @@ -31,6 +31,8 @@ Enumerations .. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_3D: +.. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_4D: + .. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_MAX: enum **OpType**: @@ -39,7 +41,9 @@ enum **OpType**: - **OP_TYPE_VECTOR_3D** = **1** --- A 3D vector type. -- **OP_TYPE_MAX** = **2** --- Represents the size of the :ref:`OpType` enum. +- **OP_TYPE_VECTOR_4D** = **2** --- A 4D vector type. + +- **OP_TYPE_MAX** = **3** --- Represents the size of the :ref:`OpType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodevectorcompose.rst b/classes/class_visualshadernodevectorcompose.rst index b93a1db03..eaacbdea2 100644 --- a/classes/class_visualshadernodevectorcompose.rst +++ b/classes/class_visualshadernodevectorcompose.rst @@ -11,12 +11,12 @@ VisualShaderNodeVectorCompose **Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Composes a :ref:`Vector3` from three scalars within the visual shader graph. +Composes a :ref:`Vector2`, :ref:`Vector3` or 4D vector (represented as a :ref:`Quaternion`) from scalars within the visual shader graph. Description ----------- -Creates a ``vec3`` using three scalar values that can be provided from separate inputs. +Creates a ``vec2``, ``vec3`` or ``vec4`` using scalar values that can be provided from separate inputs. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernodevectordecompose.rst b/classes/class_visualshadernodevectordecompose.rst index 782c434ea..06945908f 100644 --- a/classes/class_visualshadernodevectordecompose.rst +++ b/classes/class_visualshadernodevectordecompose.rst @@ -11,12 +11,12 @@ VisualShaderNodeVectorDecompose **Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Decomposes a :ref:`Vector3` into three scalars within the visual shader graph. +Decomposes a :ref:`Vector2`, :ref:`Vector3` or 4D vector (represented as a :ref:`Quaternion`) into scalars within the visual shader graph. Description ----------- -Takes a ``vec3`` and decomposes it into three scalar values that can be used as separate inputs. +Takes a ``vec2``, ``vec3`` or ``vec4`` and decomposes it into scalar values that can be used as separate outputs. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_visualshadernodevectorfunc.rst b/classes/class_visualshadernodevectorfunc.rst index 27400fede..832aced2b 100644 --- a/classes/class_visualshadernodevectorfunc.rst +++ b/classes/class_visualshadernodevectorfunc.rst @@ -38,10 +38,6 @@ Enumerations .. _class_VisualShaderNodeVectorFunc_constant_FUNC_RECIPROCAL: -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_RGB2HSV: - -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_HSV2RGB: - .. _class_VisualShaderNodeVectorFunc_constant_FUNC_ABS: .. _class_VisualShaderNodeVectorFunc_constant_FUNC_ACOS: @@ -70,7 +66,7 @@ Enumerations .. _class_VisualShaderNodeVectorFunc_constant_FUNC_FLOOR: -.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FRAC: +.. _class_VisualShaderNodeVectorFunc_constant_FUNC_FRACT: .. _class_VisualShaderNodeVectorFunc_constant_FUNC_INVERSE_SQRT: @@ -112,69 +108,65 @@ enum **Function**: - **FUNC_RECIPROCAL** = **3** --- Returns ``1/vector``. -- **FUNC_RGB2HSV** = **4** --- Converts RGB vector to HSV equivalent. +- **FUNC_ABS** = **4** --- Returns the absolute value of the parameter. -- **FUNC_HSV2RGB** = **5** --- Converts HSV vector to RGB equivalent. +- **FUNC_ACOS** = **5** --- Returns the arc-cosine of the parameter. -- **FUNC_ABS** = **6** --- Returns the absolute value of the parameter. +- **FUNC_ACOSH** = **6** --- Returns the inverse hyperbolic cosine of the parameter. -- **FUNC_ACOS** = **7** --- Returns the arc-cosine of the parameter. +- **FUNC_ASIN** = **7** --- Returns the arc-sine of the parameter. -- **FUNC_ACOSH** = **8** --- Returns the inverse hyperbolic cosine of the parameter. +- **FUNC_ASINH** = **8** --- Returns the inverse hyperbolic sine of the parameter. -- **FUNC_ASIN** = **9** --- Returns the arc-sine of the parameter. +- **FUNC_ATAN** = **9** --- Returns the arc-tangent of the parameter. -- **FUNC_ASINH** = **10** --- Returns the inverse hyperbolic sine of the parameter. +- **FUNC_ATANH** = **10** --- Returns the inverse hyperbolic tangent of the parameter. -- **FUNC_ATAN** = **11** --- Returns the arc-tangent of the parameter. +- **FUNC_CEIL** = **11** --- Finds the nearest integer that is greater than or equal to the parameter. -- **FUNC_ATANH** = **12** --- Returns the inverse hyperbolic tangent of the parameter. +- **FUNC_COS** = **12** --- Returns the cosine of the parameter. -- **FUNC_CEIL** = **13** --- Finds the nearest integer that is greater than or equal to the parameter. +- **FUNC_COSH** = **13** --- Returns the hyperbolic cosine of the parameter. -- **FUNC_COS** = **14** --- Returns the cosine of the parameter. +- **FUNC_DEGREES** = **14** --- Converts a quantity in radians to degrees. -- **FUNC_COSH** = **15** --- Returns the hyperbolic cosine of the parameter. +- **FUNC_EXP** = **15** --- Base-e Exponential. -- **FUNC_DEGREES** = **16** --- Converts a quantity in radians to degrees. +- **FUNC_EXP2** = **16** --- Base-2 Exponential. -- **FUNC_EXP** = **17** --- Base-e Exponential. +- **FUNC_FLOOR** = **17** --- Finds the nearest integer less than or equal to the parameter. -- **FUNC_EXP2** = **18** --- Base-2 Exponential. +- **FUNC_FRACT** = **18** --- Computes the fractional part of the argument. -- **FUNC_FLOOR** = **19** --- Finds the nearest integer less than or equal to the parameter. +- **FUNC_INVERSE_SQRT** = **19** --- Returns the inverse of the square root of the parameter. -- **FUNC_FRAC** = **20** --- Computes the fractional part of the argument. +- **FUNC_LOG** = **20** --- Natural logarithm. -- **FUNC_INVERSE_SQRT** = **21** --- Returns the inverse of the square root of the parameter. +- **FUNC_LOG2** = **21** --- Base-2 logarithm. -- **FUNC_LOG** = **22** --- Natural logarithm. +- **FUNC_RADIANS** = **22** --- Converts a quantity in degrees to radians. -- **FUNC_LOG2** = **23** --- Base-2 logarithm. +- **FUNC_ROUND** = **23** --- Finds the nearest integer to the parameter. -- **FUNC_RADIANS** = **24** --- Converts a quantity in degrees to radians. +- **FUNC_ROUNDEVEN** = **24** --- Finds the nearest even integer to the parameter. -- **FUNC_ROUND** = **25** --- Finds the nearest integer to the parameter. +- **FUNC_SIGN** = **25** --- Extracts the sign of the parameter, i.e. returns ``-1`` if the parameter is negative, ``1`` if it's positive and ``0`` otherwise. -- **FUNC_ROUNDEVEN** = **26** --- Finds the nearest even integer to the parameter. +- **FUNC_SIN** = **26** --- Returns the sine of the parameter. -- **FUNC_SIGN** = **27** --- Extracts the sign of the parameter, i.e. returns ``-1`` if the parameter is negative, ``1`` if it's positive and ``0`` otherwise. +- **FUNC_SINH** = **27** --- Returns the hyperbolic sine of the parameter. -- **FUNC_SIN** = **28** --- Returns the sine of the parameter. +- **FUNC_SQRT** = **28** --- Returns the square root of the parameter. -- **FUNC_SINH** = **29** --- Returns the hyperbolic sine of the parameter. +- **FUNC_TAN** = **29** --- Returns the tangent of the parameter. -- **FUNC_SQRT** = **30** --- Returns the square root of the parameter. +- **FUNC_TANH** = **30** --- Returns the hyperbolic tangent of the parameter. -- **FUNC_TAN** = **31** --- Returns the tangent of the parameter. +- **FUNC_TRUNC** = **31** --- Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. -- **FUNC_TANH** = **32** --- Returns the hyperbolic tangent of the parameter. +- **FUNC_ONEMINUS** = **32** --- Returns ``1.0 - vector``. -- **FUNC_TRUNC** = **33** --- Returns a value equal to the nearest integer to the parameter whose absolute value is not larger than the absolute value of the parameter. - -- **FUNC_ONEMINUS** = **34** --- Returns ``1.0 - vector``. - -- **FUNC_MAX** = **35** --- Represents the size of the :ref:`Function` enum. +- **FUNC_MAX** = **33** --- Represents the size of the :ref:`Function` enum. Property Descriptions --------------------- diff --git a/classes/class_vsplitcontainer.rst b/classes/class_vsplitcontainer.rst index b4e80365e..ab53fe214 100644 --- a/classes/class_vsplitcontainer.rst +++ b/classes/class_vsplitcontainer.rst @@ -18,6 +18,11 @@ Description Vertical split container. See :ref:`SplitContainer`. This goes from top to bottom. +Tutorials +--------- + +- :doc:`GUI containers <../tutorials/ui/gui_containers>` + Theme Properties ---------------- diff --git a/classes/class_websocketserver.rst b/classes/class_websocketserver.rst index 80162787d..007a8533b 100644 --- a/classes/class_websocketserver.rst +++ b/classes/class_websocketserver.rst @@ -55,6 +55,8 @@ Methods +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`listen` **(** :ref:`int` port, :ref:`PackedStringArray` protocols=PackedStringArray(), :ref:`bool` gd_mp_api=false **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_extra_headers` **(** :ref:`PackedStringArray` headers=PackedStringArray() **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`stop` **(** **)** | +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -227,6 +229,14 @@ If ``false`` is passed instead (default), you must call :ref:`PacketPeer` headers=PackedStringArray() **)** + +Sets additional headers to be sent to clients during the HTTP handshake. + +---- + .. _class_WebSocketServer_method_stop: - void **stop** **(** **)** diff --git a/classes/class_window.rst b/classes/class_window.rst index fa2a5f70a..8cf19bbbb 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -170,9 +170,9 @@ Theme Properties +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color` | :ref:`title_outline_modulate` | ``Color(1, 1, 1, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_h_ofs` | ``18`` | +| :ref:`int` | :ref:`close_h_offset` | ``18`` | +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ -| :ref:`int` | :ref:`close_v_ofs` | ``24`` | +| :ref:`int` | :ref:`close_v_offset` | ``24`` | +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`resize_margin` | ``4`` | +-----------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ @@ -214,6 +214,18 @@ Signals Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths. +Note that this method only works with non-embedded windows, i.e. the main window and ``Window``-derived nodes when :ref:`Viewport.gui_embed_subwindows` is disabled in the main viewport. + +Example usage: + +:: + + func _ready(): + get_viewport().files_dropped.connect(on_files_dropped) + + func on_files_dropped(files): + print(files) + ---- .. _class_Window_signal_focus_entered: @@ -1073,9 +1085,9 @@ The color of the title outline. ---- -.. _class_Window_theme_constant_close_h_ofs: +.. _class_Window_theme_constant_close_h_offset: -- :ref:`int` **close_h_ofs** +- :ref:`int` **close_h_offset** +-----------+--------+ | *Default* | ``18`` | @@ -1083,9 +1095,9 @@ The color of the title outline. ---- -.. _class_Window_theme_constant_close_v_ofs: +.. _class_Window_theme_constant_close_v_offset: -- :ref:`int` **close_v_ofs** +- :ref:`int` **close_v_offset** +-----------+--------+ | *Default* | ``24`` | diff --git a/classes/class_worldboundaryshape2d.rst b/classes/class_worldboundaryshape2d.rst index ac4dc71d6..daec66e04 100644 --- a/classes/class_worldboundaryshape2d.rst +++ b/classes/class_worldboundaryshape2d.rst @@ -11,12 +11,14 @@ WorldBoundaryShape2D **Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -World boundary shape for 2D collisions. +World boundary (infinite plane) shape resource for 2D physics. Description ----------- -World boundary shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. +2D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody2D` or :ref:`Area2D` using a :ref:`CollisionShape2D` node. ``WorldBoundaryShape2D`` works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`normal` matters; anything "below" the plane will collide with it. If the ``WorldBoundaryShape2D`` is used in a :ref:`PhysicsBody2D`, it will cause colliding objects placed "below" it to teleport "above" the plane. + +\ **Performance:** Being a primitive collision shape, ``WorldBoundaryShape2D`` is fast to check collisions against. Properties ---------- diff --git a/classes/class_worldboundaryshape3d.rst b/classes/class_worldboundaryshape3d.rst index 06d90d1ae..fcd187343 100644 --- a/classes/class_worldboundaryshape3d.rst +++ b/classes/class_worldboundaryshape3d.rst @@ -11,12 +11,14 @@ WorldBoundaryShape3D **Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -World boundary shape for 3D collisions. +World boundary (infinite plane) shape resource for 3D physics. Description ----------- -World boundary shape for 3D collisions. It works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the ``WorldBoundaryShape3D`` is used in a :ref:`PhysicsBody3D`, it will cause colliding objects placed "below" it to teleport "above" the plane. +3D world boundary shape to be added as a *direct* child of a :ref:`PhysicsBody3D` or :ref:`Area3D` using a :ref:`CollisionShape3D` node. ``WorldBoundaryShape3D`` works like an infinite plane and will not allow any physics body to go to the negative side. Note that the :ref:`Plane`'s normal matters; anything "below" the plane will collide with it. If the ``WorldBoundaryShape3D`` is used in a :ref:`PhysicsBody3D`, it will cause colliding objects placed "below" it to teleport "above" the plane. + +\ **Performance:** Being a primitive collision shape, ``WorldBoundaryShape3D`` is fast to check collisions against. Properties ---------- diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index efd0965e0..6f9f3ff7f 100644 --- a/classes/class_x509certificate.rst +++ b/classes/class_x509certificate.rst @@ -20,8 +20,6 @@ The X509Certificate class represents an X509 certificate. Certificates can be lo They can be used as the server certificate in :ref:`StreamPeerSSL.accept_stream` (along with the proper :ref:`CryptoKey`), and to specify the only certificate that should be accepted when connecting to an SSL server via :ref:`StreamPeerSSL.connect_to_stream`. -\ **Note:** Not available in HTML5 exports. - Methods -------