From 82e5ed4c11f3d7dd28e3942f0b5cf85435c4d438 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 2 May 2026 04:20:23 +0000 Subject: [PATCH] classref: Sync with current master branch (16bb065) --- classes/class_@gdscript.rst | 2 +- classes/class_@globalscope.rst | 2 +- classes/class_audiostreaminteractive.rst | 8 ++++ classes/class_editordock.rst | 52 ++++++++++++------------ classes/class_geometry2d.rst | 4 +- classes/class_optionbutton.rst | 2 +- classes/class_projectsettings.rst | 4 +- 7 files changed, 42 insertions(+), 32 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index f738fba2e..96a2c03d4 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -1026,7 +1026,7 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` |void| **assert**\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) :ref:`🔗` -Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error()` for reporting errors to project developers or add-on users. +Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated and the current method returns a default value. When running from the editor, failed asserts also cause a debugger break. This can be used as a stronger form of :ref:`@GlobalScope.push_error()` for reporting errors to project developers or add-on users. An optional ``message`` can be shown in addition to the generic "Assertion failed" message. You can use this to provide additional details about why the assertion failed. diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 227a2da82..adf91e506 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3756,7 +3756,7 @@ If a property is :ref:`Dictionary`, hints the editor how to sh // Array of elemType. hintString = $"{elemType:D}:"; - hintString = $"{elemType:}/{elemHint:D}:{elemHintString}"; + hintString = $"{elemType:D}/{elemHint:D}:{elemHintString}"; // Two-dimensional array of elemType (array of arrays of elemType). hintString = $"{Variant.Type.Array:D}:{elemType:D}:"; hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}"; diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index 12d9d5649..67f247fd5 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -165,6 +165,14 @@ Transition to the same position in the destination clip. This is useful when bot Transition to the start of the destination clip. +.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_PREVIOUS_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionToTime` **TRANSITION_TO_TIME_PREVIOUS_POSITION** = ``2`` + +Transition to the last played position in the destination clip, if there was a previous transition from that clip. Otherwise, plays from the start of the destination clip. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editordock.rst b/classes/class_editordock.rst index 61709ff42..4d6286885 100644 --- a/classes/class_editordock.rst +++ b/classes/class_editordock.rst @@ -66,31 +66,33 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | |bitfield|\[:ref:`DockLayout`\] | :ref:`available_layouts` | ``5`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`closable` | ``false`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`DockSlot` | :ref:`default_slot` | ``-1`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`Texture2D` | :ref:`dock_icon` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`Shortcut` | :ref:`dock_shortcut` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`force_show_icon` | ``false`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`global` | ``true`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`StringName` | :ref:`icon_name` | ``&""`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`String` | :ref:`layout_key` | ``""`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`String` | :ref:`title` | ``""`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`title_color` | ``Color(0, 0, 0, 0)`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`transient` | ``false`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------+-----------------------+ + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool` | accessibility_region | ``true`` (overrides :ref:`Container`) | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`DockLayout`\] | :ref:`available_layouts` | ``5`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`closable` | ``false`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`DockSlot` | :ref:`default_slot` | ``-1`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`dock_icon` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`Shortcut` | :ref:`dock_shortcut` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`force_show_icon` | ``false`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global` | ``true`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`icon_name` | ``&""`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`layout_key` | ``""`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`title` | ``""`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`title_color` | ``Color(0, 0, 0, 0)`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`transient` | ``false`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index b6f9814e7..858e7fd0e 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -411,7 +411,7 @@ Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, other Returns the point of intersection between the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``). Returns a :ref:`Vector2`, or ``null`` if the lines are parallel. -\ ``from`` and ``dir`` are *not* endpoints of a line segment or ray but the slope (``dir``) and a known point (``from``) on that line. +\ ``from`` and ``dir`` are *not* endpoints of a line segment or ray but the slope (``dir``) and a known point (``from``) on that line. To get the intersection between two line segments, use :ref:`segment_intersects_segment()`. .. tabs:: @@ -559,7 +559,7 @@ Given the 2D segment (``segment_from``, ``segment_to``), returns the position on :ref:`Variant` **segment_intersects_segment**\ (\ from_a\: :ref:`Vector2`, to_a\: :ref:`Vector2`, from_b\: :ref:`Vector2`, to_b\: :ref:`Vector2`\ ) :ref:`🔗` -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``. +Checks if two line segments intersect, with line ``a`` between ``from_a`` and ``to_a`` and line ``b`` between ``from_b`` and ``to_b``. If the line segments intersect, the point of intersection is returned as a :ref:`Vector2`. If no intersection takes place, ``null`` is returned. .. rst-class:: classref-item-separator diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 42a55bccb..13800380d 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -167,7 +167,7 @@ Signals **item_focused**\ (\ index\: :ref:`int`\ ) :ref:`🔗` -Emitted when the user navigates to an item using the :ref:`ProjectSettings.input/ui_up` or :ref:`ProjectSettings.input/ui_down` input actions. The index of the item selected is passed as argument. +Emitted when the user navigates to an item using the :ref:`ProjectSettings.input/ui_up` or :ref:`ProjectSettings.input/ui_down` input actions. The index of the item focused is passed as argument. .. rst-class:: classref-item-separator diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 120401def..f984bb114 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -5052,7 +5052,7 @@ Defines how the aspect ratio of the base size is preserved when stretching to fi \ ``"keep_height"``: Keep aspect ratio when stretching the screen. If the screen is taller than the base size, black bars are added at the top and bottom (letterboxing). But if the screen is wider than the base resolution, the viewport will be grown in the horizontal direction (and more content will be visible to the right). You can also think of this as "Expand Horizontally". -\ ``"expand"``: Keep aspect ratio when stretching the screen, but keep neither the base width nor height. Depending on the screen aspect ratio, the viewport will either be larger in the horizontal direction (if the screen is wider than the base size) or in the vertical direction (if the screen is taller than the original size). This is the default for projects created starting in Godot 4.8. +\ ``"expand"``: Keep aspect ratio when stretching the screen, but keep neither the base width nor height. Depending on the screen aspect ratio, the viewport will either be larger in the horizontal direction (if the screen is wider than the base size) or in the vertical direction (if the screen is taller than the original size). This is the default for projects created starting in Godot 4.7. .. rst-class:: classref-item-separator @@ -5068,7 +5068,7 @@ Defines how the base size is stretched to fit the resolution of the window or sc \ ``"disabled"``: No stretching happens. One unit in the scene corresponds to one pixel on the screen. In this mode, :ref:`display/window/stretch/aspect` has no effect. Recommended for non-game applications. -\ ``"canvas_items"``: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art aesthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). This is the default for projects created starting in Godot 4.8. +\ ``"canvas_items"``: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art aesthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). This is the default for projects created starting in Godot 4.7. \ ``"viewport"``: The size of the root :ref:`Viewport` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect` into account). Recommended for games that use a pixel art aesthetic.