Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/class_@gdscript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ Returns the length of the given Variant ``var``. The length can be the character

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

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>`.
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>`.

\ **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.

Expand Down
2 changes: 1 addition & 1 deletion classes/class_@globalscope.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7225,7 +7225,7 @@ Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Ty

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.

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.
The returned value is a :ref:`Variant<class_Variant>`, but the data inside and its type will be the same as the requested type.

::

Expand Down
4 changes: 1 addition & 3 deletions classes/class_animationnodestatemachine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,7 @@ Renames the given animation node.

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

.. container:: contribute

There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
Replaces the given animation node with a new animation node.

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

Expand Down
2 changes: 2 additions & 0 deletions classes/class_area2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Description

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

\ **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.

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

Tutorials
Expand Down
2 changes: 2 additions & 0 deletions classes/class_area3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Description

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

\ **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.

\ **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>`.

.. rst-class:: classref-introduction-group
Expand Down
2 changes: 1 addition & 1 deletion classes/class_csgpolygon3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ When :ref:`mode<class_CSGPolygon3D_property_mode>` is :ref:`MODE_PATH<class_CSGP
- void **set_path_rotation** **(** :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` value **)**
- :ref:`PathRotation<enum_CSGPolygon3D_PathRotation>` **get_path_rotation** **(** **)**

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.
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.

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

Expand Down
14 changes: 14 additions & 0 deletions classes/class_dictionary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ Methods
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`get<class_Dictionary_method_get>` **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :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 **)** |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has<class_Dictionary_method_has>` **(** :ref:`Variant<class_Variant>` key **)** |const| |
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_all<class_Dictionary_method_has_all>` **(** :ref:`Array<class_Array>` keys **)** |const| |
Expand Down Expand Up @@ -374,6 +376,18 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the

----

.. _class_Dictionary_method_get_or_add:

.. rst-class:: classref-method

:ref:`Variant<class_Variant>` **get_or_add** **(** :ref:`Variant<class_Variant>` key, :ref:`Variant<class_Variant>` default=null **)**

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.

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

----

.. _class_Dictionary_method_has:

.. rst-class:: classref-method
Expand Down
54 changes: 54 additions & 0 deletions classes/class_displayserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ Methods
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :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| |
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`global_menu_get_system_menu_roots<class_DisplayServer_method_global_menu_get_system_menu_roots>` **(** **)** |const| |
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :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| |
+-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :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| |
Expand Down Expand Up @@ -1791,6 +1793,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

----

.. _class_DisplayServer_method_global_menu_get_system_menu_roots:

.. rst-class:: classref-method

:ref:`Dictionary<class_Dictionary>` **global_menu_get_system_menu_roots** **(** **)** |const|

Returns Dictionary of supported system menu IDs and names.

\ **Note:** This method is implemented only on macOS.

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

----

.. _class_DisplayServer_method_global_menu_is_item_checkable:

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

Set active tablet driver name.

Supported drivers:

- ``winink``: Windows Ink API, default (Windows 8.1+ required).

- ``wintab``: Wacom Wintab API (compatible device driver required).

- ``dummy``: Dummy driver, tablet input is disabled.

\ **Note:** This method is implemented only on Windows.

.. rst-class:: classref-item-separator
Expand Down
Loading