classref: Sync with current master branch (2d53a62)

This commit is contained in:
Godot Organization
2026-01-15 10:21:55 +00:00
parent 9a41d5eb13
commit 7858440990
8 changed files with 60 additions and 24 deletions

View File

@@ -3860,6 +3860,8 @@ Sets a custom mouse cursor image for the given ``shape``. This means the user's
\ ``cursor`` can be either a :ref:`Texture2D<class_Texture2D>` or an :ref:`Image<class_Image>`, and it should not be larger than 256×256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape()<class_DisplayServer_method_cursor_set_shape>`.
\ **Note:** On Web, calling this method every frame can cause the cursor to flicker.
.. rst-class:: classref-item-separator
----

View File

@@ -25,13 +25,6 @@ Base resource that provides the functionality of exporting a release build of a
Used in scripting by :ref:`EditorExportPlugin<class_EditorExportPlugin>` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes()<class_EditorExportPlugin_private_method__begin_customize_scenes>` and :ref:`EditorExportPlugin._begin_customize_resources()<class_EditorExportPlugin_private_method__begin_customize_resources>` for more details.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`Console support in Godot <../tutorials/platform/consoles>`
.. rst-class:: classref-reftable-group
Methods

View File

@@ -219,6 +219,8 @@ Properties
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`editors/3d/selection_box_color<class_EditorSettings_property_editors/3d/selection_box_color>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`editors/3d/show_gizmo_during_rotation<class_EditorSettings_property_editors/3d/show_gizmo_during_rotation>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/aabb<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb>` |
+---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/camera<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/camera>` |
@@ -2041,6 +2043,18 @@ The color to use for the selection box that surrounds selected nodes in the 3D e
----
.. _class_EditorSettings_property_editors/3d/show_gizmo_during_rotation:
.. rst-class:: classref-property
:ref:`int<class_int>` **editors/3d/show_gizmo_during_rotation** :ref:`🔗<class_EditorSettings_property_editors/3d/show_gizmo_during_rotation>`
If checked, the transform gizmo remains visible during rotation in that transform mode.
.. rst-class:: classref-item-separator
----
.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb:
.. rst-class:: classref-property

View File

@@ -147,7 +147,7 @@ Methods
+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_gyroscope<class_Input_method_set_gyroscope>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |
+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`set_joy_light<class_Input_method_set_joy_light>`\ (\ device\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
| |void| | :ref:`set_joy_light<class_Input_method_set_joy_light>`\ (\ device\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |
+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_magnetometer<class_Input_method_set_magnetometer>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |
+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -1137,9 +1137,9 @@ Sets the value of the rotation rate of the gyroscope sensor. Can be used for deb
.. rst-class:: classref-method
:ref:`bool<class_bool>` **set_joy_light**\ (\ device\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Input_method_set_joy_light>`
|void| **set_joy_light**\ (\ device\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Input_method_set_joy_light>`
Sets the joypad's LED light, if available, to the specified color. Returns ``true`` if the operation was successful. See also :ref:`has_joy_light()<class_Input_method_has_joy_light>`.
Sets the joypad's LED light, if available, to the specified color. See also :ref:`has_joy_light()<class_Input_method_has_joy_light>`.
\ **Note:** There is no way to get the color of the light from a joypad. If you need to know the assigned color, store it separately.

View File

@@ -386,7 +386,7 @@ If ``1.0``, no damping is performed. If ``0.0``, damping is always performed.
- |void| **set_primary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_primary_limit_angle**\ (\ )
The limit angle of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
The limit angle of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``, in radians.
.. rst-class:: classref-item-separator
@@ -420,7 +420,7 @@ The threshold to start damping for :ref:`primary_negative_limit_angle<class_Look
- |void| **set_primary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_primary_negative_limit_angle**\ (\ )
The limit angle of negative side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
The limit angle of negative side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``, in radians.
.. rst-class:: classref-item-separator
@@ -454,7 +454,7 @@ The threshold to start damping for :ref:`primary_positive_limit_angle<class_Look
- |void| **set_primary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_primary_positive_limit_angle**\ (\ )
The limit angle of positive side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
The limit angle of positive side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``, in radians.
.. rst-class:: classref-item-separator
@@ -522,7 +522,7 @@ The threshold to start damping for :ref:`secondary_limit_angle<class_LookAtModif
- |void| **set_secondary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_secondary_limit_angle**\ (\ )
The limit angle of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
The limit angle of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``, in radians.
.. rst-class:: classref-item-separator
@@ -556,7 +556,7 @@ The threshold to start damping for :ref:`secondary_negative_limit_angle<class_Lo
- |void| **set_secondary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_secondary_negative_limit_angle**\ (\ )
The limit angle of negative side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
The limit angle of negative side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``, in radians.
.. rst-class:: classref-item-separator
@@ -590,7 +590,7 @@ The threshold to start damping for :ref:`secondary_positive_limit_angle<class_Lo
- |void| **set_secondary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_secondary_positive_limit_angle**\ (\ )
The limit angle of positive side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
The limit angle of positive side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``, in radians.
.. rst-class:: classref-item-separator

View File

@@ -5730,7 +5730,7 @@ Font glyph subpixel positioning mode for the default project font. See :ref:`Fon
The default scale factor for :ref:`Control<class_Control>`\ s, when not overridden by a :ref:`Theme<class_Theme>`.
\ **Note:** This property is only read when the project starts. To change the default scale at runtime, set :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>` instead.
\ **Note:** This property is only read when the project starts. To change the default theme scale at runtime, set :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>` instead. However, to adjust the scale of all 2D elements at runtime, it's preferable to use :ref:`Window.content_scale_factor<class_Window_property_content_scale_factor>` on the root :ref:`Window<class_Window>` node instead (as this also affects overridden :ref:`Theme<class_Theme>`\ s). See :doc:`Multiple resolutions <../tutorials/rendering/multiple_resolutions>` in the documentation for details.
.. rst-class:: classref-item-separator

View File

@@ -21,12 +21,14 @@ Description
A regular expression (or regex) is a compact language that can be used to recognize strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For example, a regex of ``ab[0-9]`` would find any string that is ``ab`` followed by any number from ``0`` to ``9``. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet.
To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile()<class_RegEx_method_compile>` before it can be used.
To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile()<class_RegEx_method_compile>` before it can be used. Alternatively, the static method :ref:`create_from_string()<class_RegEx_method_create_from_string>` can be used to create and compile a RegEx object in a single method call.
::
var regex = RegEx.new()
regex.compile("\\w-(\\d+)")
# Shorthand to create and compile a regex (used in the examples below):
var regex2 = RegEx.create_from_string("\\w-(\\d+)")
The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. In GDScript, you can also use raw string literals (r-strings). For example, ``compile(r'"(?:\\.|[^"])*"')`` would be read the same.
@@ -34,8 +36,7 @@ Using :ref:`search()<class_RegEx_method_search>`, you can find the pattern withi
::
var regex = RegEx.new()
regex.compile("\\w-(\\d+)")
var regex = RegEx.create_from_string("\\w-(\\d+)")
var result = regex.search("abc n-0123")
if result:
print(result.get_string()) # Prints "n-0123"
@@ -46,8 +47,7 @@ This version of RegEx also supports named capturing groups, and the names can be
::
var regex = RegEx.new()
regex.compile("d(?<digit>[0-9]+)|x(?<digit>[0-9a-f]+)")
var regex = RegEx.create_from_string("d(?<digit>[0-9]+)|x(?<digit>[0-9a-f]+)")
var result = regex.search("the number is x2f")
if result:
print(result.get_string("digit")) # Prints "2f"
@@ -64,8 +64,7 @@ If you need to process multiple results, :ref:`search_all()<class_RegEx_method_s
::
var regex = RegEx.new()
regex.compile("\\S+") # Negated whitespace character class.
var regex = RegEx.create_from_string("\\S+") # Negated whitespace character class.
var results = []
for result in regex.search_all("One Two \n\tThree"):
results.push_back(result.get_string())

View File

@@ -231,6 +231,8 @@ Theme Properties
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`button_margin<class_Tree_theme_constant_button_margin>` | ``4`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`check_h_separation<class_Tree_theme_constant_check_h_separation>` | ``4`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`children_hl_line_width<class_Tree_theme_constant_children_hl_line_width>` | ``1`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`dragging_unfold_wait_msec<class_Tree_theme_constant_dragging_unfold_wait_msec>` | ``500`` |
@@ -241,6 +243,8 @@ Theme Properties
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`h_separation<class_Tree_theme_constant_h_separation>` | ``4`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`icon_h_separation<class_Tree_theme_constant_icon_h_separation>` | ``4`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`icon_max_width<class_Tree_theme_constant_icon_max_width>` | ``0`` |
+-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+
| :ref:`int<class_int>` | :ref:`inner_item_margin_bottom<class_Tree_theme_constant_inner_item_margin_bottom>` | ``0`` |
@@ -1666,6 +1670,18 @@ The horizontal space between each button in a cell.
----
.. _class_Tree_theme_constant_check_h_separation:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **check_h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_check_h_separation>`
The horizontal space between the checkbox and the text in a :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell.
.. rst-class:: classref-item-separator
----
.. _class_Tree_theme_constant_children_hl_line_width:
.. rst-class:: classref-themeproperty
@@ -1726,6 +1742,18 @@ The horizontal space between item cells. This is also used as the margin at the
----
.. _class_Tree_theme_constant_icon_h_separation:
.. rst-class:: classref-themeproperty
:ref:`int<class_int>` **icon_h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_icon_h_separation>`
The horizontal space between the icon and the text in item's cells.
.. rst-class:: classref-item-separator
----
.. _class_Tree_theme_constant_icon_max_width:
.. rst-class:: classref-themeproperty