From e0dc2b106ab0abf0c5ae50b1c274b42418d5c33d Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 16 Nov 2024 03:22:28 +0000 Subject: [PATCH] classref: Sync with current master branch (6c05ec3) --- classes/class_@gdscript.rst | 15 +- classes/class_@globalscope.rst | 8 +- classes/class_aabb.rst | 4 +- classes/class_animatedsprite2d.rst | 2 +- classes/class_animatedsprite3d.rst | 2 +- classes/class_animationnodeanimation.rst | 21 + ...ss_animationnodestatemachinetransition.rst | 4 +- classes/class_area2d.rst | 4 +- classes/class_area3d.rst | 4 +- classes/class_astar2d.rst | 2 +- classes/class_audioeffectspectrumanalyzer.rst | 2 +- ...ss_audioeffectspectrumanalyzerinstance.rst | 2 +- classes/class_audiostreaminteractive.rst | 2 +- .../class_audiostreamplaybackpolyphonic.rst | 2 +- classes/class_basematerial3d.rst | 4 +- classes/class_basis.rst | 4 +- classes/class_button.rst | 20 +- classes/class_callable.rst | 30 +- classes/class_callbacktweener.rst | 2 +- classes/class_cameraattributes.rst | 6 +- classes/class_canvasitem.rst | 6 +- classes/class_characterbody2d.rst | 2 +- classes/class_charfxtransform.rst | 2 - classes/class_color.rst | 90 ++- classes/class_control.rst | 50 +- classes/class_cpuparticles2d.rst | 2 +- classes/class_cubemap.rst | 30 +- classes/class_diraccess.rst | 16 +- classes/class_displayserver.rst | 2 +- classes/class_editorexportplatformandroid.rst | 70 ++ classes/class_editorexportplatformweb.rst | 8 +- classes/class_editorexportplugin.rst | 18 +- ...itorfilesystemimportformatsupportquery.rst | 2 +- classes/class_editorimportplugin.rst | 2 +- classes/class_editorinterface.rst | 28 + classes/class_editornode3dgizmoplugin.rst | 2 +- classes/class_editorplugin.rst | 2 +- classes/class_editorproperty.rst | 12 + classes/class_editorresourcepreview.rst | 4 +- .../class_editorresourcepreviewgenerator.rst | 2 +- classes/class_editorscenepostimport.rst | 2 +- classes/class_editorscenepostimportplugin.rst | 6 +- classes/class_editorscript.rst | 2 +- classes/class_editorsettings.rst | 84 +- classes/class_editortoaster.rst | 101 +++ .../class_editortranslationparserplugin.rst | 18 +- classes/class_editorundoredomanager.rst | 2 +- classes/class_environment.rst | 4 +- classes/class_fastnoiselite.rst | 2 +- classes/class_fileaccess.rst | 226 +++--- classes/class_gdscript.rst | 4 +- classes/class_geometryinstance3d.rst | 33 + classes/class_gltfaccessor.rst | 6 +- classes/class_gltfanimation.rst | 2 +- classes/class_gltfbufferview.rst | 4 +- classes/class_gltfcamera.rst | 6 +- classes/class_gltfdocument.rst | 2 +- classes/class_gltfdocumentextension.rst | 8 +- classes/class_gltfmesh.rst | 2 +- classes/class_gltfnode.rst | 4 +- classes/class_gltfobjectmodelproperty.rst | 2 +- classes/class_gltfstate.rst | 10 +- classes/class_gpuparticles2d.rst | 2 +- classes/class_gpuparticles3d.rst | 4 +- classes/class_gpuparticlescollision3d.rst | 4 +- classes/class_graphnode.rst | 2 +- classes/class_hboxcontainer.rst | 2 +- classes/class_httpclient.rst | 10 +- classes/class_httprequest.rst | 6 +- classes/class_image.rst | 6 +- classes/class_itemlist.rst | 2 +- classes/class_label.rst | 2 +- classes/class_label3d.rst | 2 +- classes/class_labelsettings.rst | 2 +- classes/class_lightmapgi.rst | 4 +- classes/class_lookatmodifier3d.rst | 739 ++++++++++++++++++ classes/class_mainloop.rst | 2 +- classes/class_meshinstance3d.rst | 2 +- classes/class_multiplayerapi.rst | 2 +- classes/class_multiplayerapiextension.rst | 10 +- classes/class_multiplayerpeer.rst | 2 +- classes/class_multiplayersynchronizer.rst | 4 +- classes/class_navigationserver2d.rst | 8 +- classes/class_navigationserver3d.rst | 12 +- classes/class_node.rst | 4 +- classes/class_nodepath.rst | 2 +- classes/class_object.rst | 10 +- classes/class_openxrcompositionlayer.rst | 2 +- .../class_openxrextensionwrapperextension.rst | 2 +- classes/class_os.rst | 144 +++- classes/class_packedscene.rst | 4 +- classes/class_packetpeerudp.rst | 31 +- classes/class_pckpacker.rst | 20 +- classes/class_physicalbone3d.rst | 66 +- classes/class_popupmenu.rst | 6 +- classes/class_primitivemesh.rst | 4 +- classes/class_projection.rst | 4 +- classes/class_projectsettings.rst | 28 +- classes/class_quaternion.rst | 2 + classes/class_range.rst | 2 +- classes/class_rdpipelinedepthstencilstate.rst | 6 +- classes/class_rdtextureformat.rst | 8 +- classes/class_rdtextureview.rst | 2 +- classes/class_regex.rst | 4 +- classes/class_renderdata.rst | 2 +- classes/class_renderingserver.rst | 42 +- classes/class_renderscenebuffersrd.rst | 10 +- classes/class_resource.rst | 2 +- classes/class_resourceformatloader.rst | 4 +- classes/class_resourceimportermp3.rst | 6 +- classes/class_resourceimporteroggvorbis.rst | 6 +- classes/class_resourceimportertexture.rst | 10 +- classes/class_resourceloader.rst | 18 +- classes/class_richtextlabel.rst | 8 +- classes/class_rigidbody2d.rst | 6 +- classes/class_rigidbody3d.rst | 6 +- classes/class_shader.rst | 4 +- classes/class_skeletonik3d.rst | 2 +- .../class_skeletonmodification2dtwoboneik.rst | 2 +- classes/class_skeletonmodifier3d.rst | 2 +- classes/class_slider.rst | 4 +- classes/class_splitcontainer.rst | 2 +- classes/class_string.rst | 16 +- classes/class_stringname.rst | 47 +- classes/class_styleboxtexture.rst | 6 +- classes/class_surfacetool.rst | 2 +- classes/class_syntaxhighlighter.rst | 10 +- classes/class_textedit.rst | 8 +- classes/class_textmesh.rst | 2 +- classes/class_textparagraph.rst | 19 + classes/class_tilemap.rst | 4 +- classes/class_tilemaplayer.rst | 34 +- classes/class_tileset.rst | 34 +- classes/class_timer.rst | 2 + classes/class_touchscreenbutton.rst | 2 +- classes/class_transform2d.rst | 2 + classes/class_transform3d.rst | 4 +- classes/class_treeitem.rst | 6 +- classes/class_tween.rst | 40 +- classes/class_videostreamplayback.rst | 6 +- classes/class_viewport.rst | 10 +- classes/class_visualshadernodecompare.rst | 4 +- classes/class_websocketmultiplayerpeer.rst | 4 +- classes/class_websocketpeer.rst | 25 +- classes/class_window.rst | 6 +- classes/class_xrcamera3d.rst | 2 +- classes/class_xrcontroller3d.rst | 4 +- classes/class_xrnode3d.rst | 2 +- classes/index.rst | 3 + 149 files changed, 2125 insertions(+), 515 deletions(-) create mode 100644 classes/class_editortoaster.rst create mode 100644 classes/class_lookatmodifier3d.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 5afb97a6ed6..7772c35b32e 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -705,7 +705,20 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096`` -The property is a script variable which should be serialized and saved in the scene file. +The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list` in a script. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: @@ -4021,7 +4021,7 @@ If this property is modified, all inspector fields will be refreshed. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536`` -The property is an enum, i.e. it only takes named integer constants from its associated enumeration. +The property is a variable of enum type, i.e. it only takes named integer constants from its associated enumeration. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: @@ -6698,8 +6698,8 @@ Given a ``seed``, returns a :ref:`PackedInt64Array` of s var a = rand_from_seed(4) - print(a[0]) # Prints 2879024997 - print(a[1]) # Prints 4 + print(a[0]) # Prints 2879024997 + print(a[1]) # Prints 4 .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index b9e0bb902a9..16261e2cf9b 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -692,7 +692,7 @@ The segment begins at ``from`` and ends at ``to``. :ref:`bool` **is_equal_approx**\ (\ aabb\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by c :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 21402452fe8..dc63037b2c0 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -415,7 +415,7 @@ This method is a shorthand for :ref:`play` w Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: .. tabs:: diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 100e061fe44..744c7ff23bb 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -335,7 +335,7 @@ This method is a shorthand for :ref:`play` w Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: .. tabs:: diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index d7b220ae231..7f25c8bfb4d 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -40,6 +40,8 @@ Properties .. table:: :widths: auto + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`advance_on_start` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`StringName` | :ref:`animation` | ``&""`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ @@ -96,6 +98,25 @@ Plays animation in backward direction. Property Descriptions --------------------- +.. _class_AnimationNodeAnimation_property_advance_on_start: + +.. rst-class:: classref-property + +:ref:`bool` **advance_on_start** = ``false`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_advance_on_start**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_advance_on_start**\ (\ ) + +If ``true``, on receiving a request to play an animation from the start, the first frame is not drawn, but only processed, and playback starts from the next frame. + +See also the notes of :ref:`AnimationPlayer.play`. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeAnimation_property_animation: .. rst-class:: classref-property diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 1a4973608e7..3bc8ed56d4e 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -146,7 +146,7 @@ Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` **ADVANCE_MODE_AUTO** = ``2`` -Automatically use this transition if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). +Automatically use this transition if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-section-separator @@ -215,7 +215,7 @@ Use an expression as a condition for state machine transitions. It is possible t - |void| **set_advance_mode**\ (\ value\: :ref:`AdvanceMode`\ ) - :ref:`AdvanceMode` **get_advance_mode**\ (\ ) -Determines whether the transition should disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). +Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-item-separator diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index a47df40ffed..e06699e42d5 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -146,7 +146,7 @@ Emitted when a :ref:`Shape2D` of the received ``area`` enters a s \ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer2D`. -\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape2D` node from the shape index: .. tabs:: @@ -213,7 +213,7 @@ Emitted when a :ref:`Shape2D` of the received ``body`` enters a s \ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer2D`. -\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape2D` node from the shape index: .. tabs:: diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 67d979f8775..9c0b2aaf80c 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -160,7 +160,7 @@ Emitted when a :ref:`Shape3D` of the received ``area`` enters a s \ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer3D`. -\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape3D` node from the shape index: .. tabs:: @@ -227,7 +227,7 @@ Emitted when a :ref:`Shape3D` of the received ``body`` enters a s \ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer3D`. -\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape3D` node from the shape index: .. tabs:: diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 0127c90824a..0d09e9b4711 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -494,7 +494,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`πŸ”—` -Reserves space internally for ``num_nodes`` points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. The new capacity must be greater or equal to the old capacity. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 2a862c5c0f3..4e01dc5d26d 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,7 +21,7 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. -This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be acquired with :ref:`AudioServer.get_bus_effect_instance`. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance`. See also :ref:`AudioStreamGenerator` for procedurally generating sounds. diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 68c533dcf73..00f953b3935 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -21,7 +21,7 @@ Description The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. -An instance of this class can be acquired with :ref:`AudioServer.get_bus_effect_instance`. +An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance`. .. rst-class:: classref-introduction-group diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index e5aa52ec1f2..544b64695f4 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -471,7 +471,7 @@ Return the destination time position for a transition (see :ref:`add_transition< :ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return true if a given transition exists (was added via :ref:`add_transition`). +Returns ``true`` if a given transition exists (was added via :ref:`add_transition`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index c6d5c216ea8..7ca1d3ce91a 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -73,7 +73,7 @@ Method Descriptions :ref:`bool` **is_stream_playing**\ (\ stream\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return true whether the stream associated with an integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. +Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. .. rst-class:: classref-item-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 02634ebaf45..fd7161937ec 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -645,7 +645,7 @@ The object will be shaded per pixel. Useful for realistic shading effects. :ref:`ShadingMode` **SHADING_MODE_PER_VERTEX** = ``2`` -The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. Not implemented yet (this mode will act like :ref:`SHADING_MODE_PER_PIXEL`). +The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. .. _class_BaseMaterial3D_constant_SHADING_MODE_MAX: @@ -2929,8 +2929,6 @@ Specifies the channel of the :ref:`roughness_texture`. +\ **Note:** In C#, this constructs a **Basis** with all of its components set to :ref:`Vector3.ZERO`. + .. rst-class:: classref-item-separator ---- @@ -716,7 +718,7 @@ The basis matrix's rows are multiplied by ``scale``'s components. This operation Performs a spherical-linear interpolation with the ``to`` basis, given a ``weight``. Both this basis and ``to`` should represent a rotation. -\ **Example:** Smoothly rotate a :ref:`Node3D` to the target basis over time, with a :ref:`Tween`. +\ **Example:** Smoothly rotate a :ref:`Node3D` to the target basis over time, with a :ref:`Tween`: :: diff --git a/classes/class_button.rst b/classes/class_button.rst index 6d617ac223f..477654634be 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -23,7 +23,7 @@ Description **Button** is the standard themed button. It can contain text and an icon, and it will display them according to the current :ref:`Theme`. -\ **Example of creating a button and assigning an action when pressed by code:**\ +\ **Example:** Create a button and connect a method that will be called when the button is pressed: .. tabs:: @@ -33,7 +33,7 @@ Description func _ready(): var button = Button.new() button.text = "Click me" - button.pressed.connect(self._button_pressed) + button.pressed.connect(_button_pressed) add_child(button) func _button_pressed(): @@ -58,7 +58,7 @@ Description See also :ref:`BaseButton` which contains common properties and methods associated with this node. -\ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. +\ **Note:** Buttons do not detect touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. .. rst-class:: classref-introduction-group @@ -144,6 +144,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_max_width` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`line_spacing` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -587,6 +589,18 @@ The maximum allowed width of the **Button**'s icon. This limit is applied on top ---- +.. _class_Button_theme_constant_line_spacing: + +.. rst-class:: classref-themeproperty + +:ref:`int` **line_spacing** = ``0`` :ref:`πŸ”—` + +Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_callable.rst b/classes/class_callable.rst index e5de02ea433..4e6bcfbd1ad 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -139,6 +139,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_object_id`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unbound_arguments_count`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_custom`\ (\ ) |const| | @@ -335,7 +337,15 @@ Returns the total number of arguments this **Callable** should take, including o :ref:`Array` **get_bound_arguments**\ (\ ) |const| :ref:`πŸ”—` -Return the bound arguments (as long as :ref:`get_bound_arguments_count` is greater than zero), or empty (if :ref:`get_bound_arguments_count` is less than or equal to zero). +Returns the array of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count` arguments on the right have been previously excluded. + +:: + + func get_effective_arguments(callable, call_args): + assert(call_args.size() - callable.get_unbound_arguments_count() >= 0) + var result = call_args.slice(0, call_args.size() - callable.get_unbound_arguments_count()) + result.append_array(callable.get_bound_arguments()) + return result .. rst-class:: classref-item-separator @@ -347,7 +357,9 @@ Return the bound arguments (as long as :ref:`get_bound_arguments_count` **get_bound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total amount of arguments bound (or unbound) via successive :ref:`bind` or :ref:`unbind` calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. +Returns the total amount of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments`. See :ref:`get_bound_arguments` for details. + +\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. .. rst-class:: classref-item-separator @@ -389,6 +401,20 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id` **get_unbound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` + +Returns the total amount of arguments unbound via successive :ref:`bind` or :ref:`unbind` calls. See :ref:`get_bound_arguments` for details. + +\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Callable_method_hash: .. rst-class:: classref-method diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 2256e8ab3ae..b65c79a4565 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -54,7 +54,7 @@ Method Descriptions Makes the callback call delayed by given time in seconds. -\ **Example:** Call :ref:`Node.queue_free` after 2 seconds. +\ **Example:** Call :ref:`Node.queue_free` after 2 seconds: :: diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 2bbe852e8b0..386753ab34e 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -137,7 +137,11 @@ Multiplier for the exposure amount. A higher value results in a brighter image. - |void| **set_exposure_sensitivity**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_exposure_sensitivity**\ (\ ) -Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. When :ref:`auto_exposure_enabled` this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. +Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. + +If :ref:`auto_exposure_enabled` is ``true``, this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. + +\ **Note:** Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. .. |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_canvasitem.rst b/classes/class_canvasitem.rst index 4ce59f3b7a3..64e59fcab6b 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -529,6 +529,8 @@ Property Descriptions Allows the current node to clip child nodes, essentially acting as a mask. +\ **Note:** Clipping nodes cannot be nested or placed within :ref:`CanvasGroup`\ s. If an ancestor of this node clips its children or is a :ref:`CanvasGroup`, then this node's clip mode should be set to :ref:`CLIP_CHILDREN_DISABLED` to avoid unexpected behavior. + .. rst-class:: classref-item-separator ---- @@ -737,7 +739,7 @@ If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is ac If ``true``, this and child **CanvasItem** nodes with a higher Y position are rendered in front of nodes with a lower Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. -With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. +With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc.) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. Nodes sort relative to each other only if they are on the same :ref:`z_index`. @@ -1155,7 +1157,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. -\ **Example using the default project font:**\ +\ **Example:** Draw "Hello world", using the project's default font: .. tabs:: diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index ea56c53059b..078c9009f22 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -574,7 +574,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). -\ **Example usage:**\ +\ **Example:** Iterate through the collisions with a ``for`` loop: .. tabs:: diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 25c6eebf6fd..fc3d18859e5 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -28,8 +28,6 @@ Tutorials - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>` -- `RichTextEffect test project (third-party) `__ - .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_color.rst b/classes/class_color.rst index 08a71e5faf2..8c5b5ffbf9f 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -48,29 +48,35 @@ Properties .. table:: :widths: auto - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`a` | ``1.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`a8` | ``255`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`b` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`b8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`g` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`g8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`h` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`r` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`r8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`s` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`v` | ``0.0`` | - +---------------------------+------------------------------------+---------+ + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`a` | ``1.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`a8` | ``255`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`b` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`b8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`g` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`g8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`h` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_h` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_l` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_s` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`r` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`r8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`s` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`v` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ .. rst-class:: classref-reftable-group @@ -1462,6 +1468,42 @@ The HSV hue of this color, on the range 0 to 1. ---- +.. _class_Color_property_ok_hsl_h: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_h** = ``0.0`` :ref:`πŸ”—` + +The OKHSL hue of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Color_property_ok_hsl_l: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_l** = ``0.0`` :ref:`πŸ”—` + +The OKHSL lightness of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Color_property_ok_hsl_s: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_s** = ``0.0`` :ref:`πŸ”—` + +The OKHSL saturation of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + .. _class_Color_property_r: .. rst-class:: classref-property @@ -1523,7 +1565,7 @@ Constructor Descriptions Constructs a default **Color** from opaque black. This is the same as :ref:`BLACK`. -\ **Note:** in C#, constructs an empty color with all of its components set to ``0.0`` (transparent black). +\ **Note:** In C#, this constructs a **Color** with all of its components set to ``0.0`` (transparent black). .. rst-class:: classref-item-separator diff --git a/classes/class_control.rst b/classes/class_control.rst index 4032c1c58a6..52429b732b9 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -1611,10 +1611,12 @@ Controls whether the control will be able to receive mouse button input events t - |void| **set_force_pass_scroll_events**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **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. +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`. You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. +\ **Note:** Because this property defaults to ``true``, this allows nested scrollable containers to work out of the box. + .. rst-class:: classref-item-separator ---- @@ -2122,9 +2124,9 @@ Virtual method to be implemented by the user. Returns the tooltip text for the p |void| **_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See :ref:`accept_event`. +Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event`. -\ **Example usage for clicking a control:**\ +\ **Example:** Click on the control to print a message: .. tabs:: @@ -2151,19 +2153,19 @@ Virtual method to be implemented by the user. Use this method to process and acc -The event won't trigger if: +If the ``event`` inherits :ref:`InputEventMouse`, this method will **not** be called when: -\* clicking outside the control (see :ref:`_has_point`); +- the control's :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_IGNORE`; -\* control has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; +- the control is obstructed by another control on top, that doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; -\* control is obstructed by another **Control** on top of it, which doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; +- the control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; -\* control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; +- the control's parent has :ref:`clip_contents` enabled and the ``event``'s position is outside the parent's rectangle; -\* it happens outside the parent's rectangle and the parent has either :ref:`clip_contents` enabled. +- the ``event``'s position is outside the control (see :ref:`_has_point`). -\ **Note:** Event position is relative to the control origin. +\ **Note:** The ``event``'s position is relative to this control's origin. .. rst-class:: classref-item-separator @@ -2199,9 +2201,9 @@ The returned node will be added as child to a :ref:`PopupPanel \ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`custom_minimum_size` to some non-zero value. -\ **Note:** The node (and any relevant children) should be :ref:`CanvasItem.visible` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. +\ **Note:** The node (and any relevant children) should have their :ref:`CanvasItem.visible` set to ``true`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. -\ **Example of usage with a custom-constructed node:**\ +\ **Example:** Use a constructed node as a tooltip: .. tabs:: @@ -2224,7 +2226,7 @@ The returned node will be added as child to a :ref:`PopupPanel -\ **Example of usage with a custom scene instance:**\ +\ **Example:** Usa a scene instance as a tooltip: .. tabs:: @@ -2289,7 +2291,7 @@ Creates a local override for a theme :ref:`Color` with the specifie See also :ref:`get_theme_color`. -\ **Example of overriding a label's color and resetting it later:**\ +\ **Example:** Override a :ref:`Label`'s color and reset it later: .. tabs:: @@ -2384,14 +2386,14 @@ Creates a local override for a theme :ref:`StyleBox` with the sp See also :ref:`get_theme_stylebox`. -\ **Example of modifying a property in a StyleBox by duplicating it:**\ +\ **Example:** Modify a property in a :ref:`StyleBox` by duplicating it: .. tabs:: .. code-tab:: gdscript - # The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + # The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned. # Resources are shared across instances, so we need to duplicate it # to avoid modifying the appearance of all other buttons. var new_stylebox_normal = $MyButton.get_theme_stylebox("normal").duplicate() @@ -2403,7 +2405,7 @@ See also :ref:`get_theme_stylebox`. .. code-tab:: csharp - // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + // The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned. // Resources are shared across instances, so we need to duplicate it // to avoid modifying the appearance of all other buttons. StyleBoxFlat newStyleboxNormal = GetNode