Skip to content

Commit dce0083

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (13a0d6e)
1 parent 4a944b2 commit dce0083

36 files changed

+1271
-197
lines changed

classes/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ Returns the length of the given Variant ``var``. The length can be the character
992992

993993
:ref:`Resource<class_Resource>` **load** **(** :ref:`String<class_String>` path **)**
994994

995-
Returns a :ref:`Resource<class_Resource>` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload<class_@GDScript_method_preload>`.
995+
Returns a :ref:`Resource<class_Resource>` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload<class_@GDScript_method_preload>`. This method is equivalent of using :ref:`ResourceLoader.load<class_ResourceLoader_method_load>` with :ref:`ResourceLoader.CACHE_MODE_REUSE<class_ResourceLoader_constant_CACHE_MODE_REUSE>`.
996996

997997
\ **Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script.
998998

classes/[email protected]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7225,7 +7225,7 @@ Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Ty
72257225

72267226
If the type conversion cannot be done, this method will return the default value for that type, for example converting :ref:`Rect2<class_Rect2>` to :ref:`Vector2<class_Vector2>` will always return :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`. This method will never show error messages as long as ``type`` is a valid Variant type.
72277227

7228-
The returned value is a :ref:`Variant<class_Variant>`, but the data inside and the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` will be the same as the requested type.
7228+
The returned value is a :ref:`Variant<class_Variant>`, but the data inside and its type will be the same as the requested type.
72297229

72307230
::
72317231

classes/class_animationnodestatemachine.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,7 @@ Renames the given animation node.
413413

414414
void **replace_node** **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationNode<class_AnimationNode>` node **)**
415415

416-
.. container:: contribute
417-
418-
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
416+
Replaces the given animation node with a new animation node.
419417

420418
.. rst-class:: classref-item-separator
421419

classes/class_area2d.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Description
2323

2424
This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses.
2525

26+
\ **Note:** Areas and bodies created with :ref:`PhysicsServer2D<class_PhysicsServer2D>` might not interact as expected with **Area2D**\ s, and might not emit signals or track objects correctly.
27+
2628
.. rst-class:: classref-introduction-group
2729

2830
Tutorials

classes/class_area3d.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Description
2323

2424
This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses.
2525

26+
\ **Note:** Areas and bodies created with :ref:`PhysicsServer3D<class_PhysicsServer3D>` might not interact as expected with **Area3D**\ s, and might not emit signals or track objects correctly.
27+
2628
\ **Warning:** Using a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` inside a :ref:`CollisionShape3D<class_CollisionShape3D>` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D<class_MeshInstance3D>` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`\ s or primitive shapes like :ref:`BoxShape3D<class_BoxShape3D>`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`.
2729

2830
.. rst-class:: classref-introduction-group

classes/class_csgpolygon3d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGP
348348
- void **set_path_rotation** **(** :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` value **)**
349349
- :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **get_path_rotation** **(** **)**
350350

351-
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, the :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` method used to rotate the :ref:`polygon<class_CSGPolygon3D_property_polygon>` as it is extruded.
351+
When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGPolygon3D_constant_MODE_PATH>`, the path rotation method used to rotate the :ref:`polygon<class_CSGPolygon3D_property_polygon>` as it is extruded.
352352

353353
.. rst-class:: classref-item-separator
354354

classes/class_dictionary.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ Methods
237237
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
238238
| :ref:`Variant<class_Variant>` | :ref:`get<class_Dictionary_method_get>` **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)** |const| |
239239
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
240+
| :ref:`Variant<class_Variant>` | :ref:`get_or_add<class_Dictionary_method_get_or_add>` **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)** |
241+
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
240242
| :ref:`bool<class_bool>` | :ref:`has<class_Dictionary_method_has>` **(** :ref:`Variant<class_Variant>` key **)** |const| |
241243
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
242244
| :ref:`bool<class_bool>` | :ref:`has_all<class_Dictionary_method_has_all>` **(** :ref:`Array<class_Array>` keys **)** |const| |
@@ -374,6 +376,18 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the
374376

375377
----
376378

379+
.. _class_Dictionary_method_get_or_add:
380+
381+
.. rst-class:: classref-method
382+
383+
:ref:`Variant<class_Variant>` **get_or_add** **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)**
384+
385+
Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get<class_Dictionary_method_get>`. Otherwise, the ``default`` value is inserted into the dictionary and returned.
386+
387+
.. rst-class:: classref-item-separator
388+
389+
----
390+
377391
.. _class_Dictionary_method_has:
378392

379393
.. rst-class:: classref-method

classes/class_displayserver.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ Methods
132132
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
133133
| :ref:`String<class_String>` | :ref:`global_menu_get_item_tooltip<class_DisplayServer_method_global_menu_get_item_tooltip>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
134134
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
135+
| :ref:`Dictionary<class_Dictionary>` | :ref:`global_menu_get_system_menu_roots<class_DisplayServer_method_global_menu_get_system_menu_roots>` **(** **)** |const| |
136+
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
135137
| :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checkable<class_DisplayServer_method_global_menu_is_item_checkable>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
136138
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
137139
| :ref:`bool<class_bool>` | :ref:`global_menu_is_item_checked<class_DisplayServer_method_global_menu_is_item_checked>` **(** :ref:`String<class_String>` menu_root, :ref:`int<class_int>` idx **)** |const| |
@@ -1791,6 +1793,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
17911793

17921794
"_main" - Main menu (macOS).
17931795
"_dock" - Dock popup menu (macOS).
1796+
"_apple" - Apple menu (macOS, custom items added before "Services").
1797+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1798+
"_help" - Help menu (macOS).
17941799

17951800
.. rst-class:: classref-item-separator
17961801

@@ -1818,6 +1823,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
18181823

18191824
"_main" - Main menu (macOS).
18201825
"_dock" - Dock popup menu (macOS).
1826+
"_apple" - Apple menu (macOS, custom items added before "Services").
1827+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1828+
"_help" - Help menu (macOS).
18211829

18221830
.. rst-class:: classref-item-separator
18231831

@@ -1845,6 +1853,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
18451853

18461854
"_main" - Main menu (macOS).
18471855
"_dock" - Dock popup menu (macOS).
1856+
"_apple" - Apple menu (macOS, custom items added before "Services").
1857+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1858+
"_help" - Help menu (macOS).
18481859

18491860
.. rst-class:: classref-item-separator
18501861

@@ -1874,6 +1885,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
18741885

18751886
"_main" - Main menu (macOS).
18761887
"_dock" - Dock popup menu (macOS).
1888+
"_apple" - Apple menu (macOS, custom items added before "Services").
1889+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1890+
"_help" - Help menu (macOS).
18771891

18781892
.. rst-class:: classref-item-separator
18791893

@@ -1901,6 +1915,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
19011915

19021916
"_main" - Main menu (macOS).
19031917
"_dock" - Dock popup menu (macOS).
1918+
"_apple" - Apple menu (macOS, custom items added before "Services").
1919+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1920+
"_help" - Help menu (macOS).
19041921

19051922
.. rst-class:: classref-item-separator
19061923

@@ -1932,6 +1949,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
19321949

19331950
"_main" - Main menu (macOS).
19341951
"_dock" - Dock popup menu (macOS).
1952+
"_apple" - Apple menu (macOS, custom items added before "Services").
1953+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1954+
"_help" - Help menu (macOS).
19351955

19361956
.. rst-class:: classref-item-separator
19371957

@@ -1961,6 +1981,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that
19611981

19621982
"_main" - Main menu (macOS).
19631983
"_dock" - Dock popup menu (macOS).
1984+
"_apple" - Apple menu (macOS, custom items added before "Services").
1985+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
1986+
"_help" - Help menu (macOS).
19641987

19651988
.. rst-class:: classref-item-separator
19661989

@@ -1984,6 +2007,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde
19842007

19852008
"_main" - Main menu (macOS).
19862009
"_dock" - Dock popup menu (macOS).
2010+
"_apple" - Apple menu (macOS, custom items added before "Services").
2011+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
2012+
"_help" - Help menu (macOS).
19872013

19882014
.. rst-class:: classref-item-separator
19892015

@@ -2007,6 +2033,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde
20072033

20082034
"_main" - Main menu (macOS).
20092035
"_dock" - Dock popup menu (macOS).
2036+
"_apple" - Apple menu (macOS, custom items added before "Services").
2037+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
2038+
"_help" - Help menu (macOS).
20102039

20112040
.. rst-class:: classref-item-separator
20122041

@@ -2028,6 +2057,9 @@ Removes all items from the global menu with ID ``menu_root``.
20282057

20292058
"_main" - Main menu (macOS).
20302059
"_dock" - Dock popup menu (macOS).
2060+
"_apple" - Apple menu (macOS, custom items added before "Services").
2061+
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
2062+
"_help" - Help menu (macOS).
20312063

20322064
.. rst-class:: classref-item-separator
20332065

@@ -2229,6 +2261,20 @@ Returns the tooltip associated with the specified index ``idx``.
22292261

22302262
----
22312263

2264+
.. _class_DisplayServer_method_global_menu_get_system_menu_roots:
2265+
2266+
.. rst-class:: classref-method
2267+
2268+
:ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots** **(** **)** |const|
2269+
2270+
Returns Dictionary of supported system menu IDs and names.
2271+
2272+
\ **Note:** This method is implemented only on macOS.
2273+
2274+
.. rst-class:: classref-item-separator
2275+
2276+
----
2277+
22322278
.. _class_DisplayServer_method_global_menu_is_item_checkable:
22332279

22342280
.. rst-class:: classref-method
@@ -3105,6 +3151,14 @@ void **tablet_set_current_driver** **(** :ref:`String<class_String>` name **)**
31053151

31063152
Set active tablet driver name.
31073153

3154+
Supported drivers:
3155+
3156+
- ``winink``: Windows Ink API, default (Windows 8.1+ required).
3157+
3158+
- ``wintab``: Wacom Wintab API (compatible device driver required).
3159+
3160+
- ``dummy``: Dummy driver, tablet input is disabled.
3161+
31083162
\ **Note:** This method is implemented only on Windows.
31093163

31103164
.. rst-class:: classref-item-separator

0 commit comments

Comments
 (0)