From e3a0347f34b51a4cc0cb1ec4662462e113ff5068 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 9 Sep 2023 03:18:37 +0000 Subject: [PATCH] classref: Sync with current master branch (fc99492) --- classes/class_animatablebody2d.rst | 2 +- classes/class_animatablebody3d.rst | 2 +- classes/class_basematerial3d.rst | 29 +- classes/class_concavepolygonshape2d.rst | 4 +- classes/class_container.rst | 2 +- classes/class_convexpolygonshape2d.rst | 4 +- classes/class_displayserver.rst | 2 +- classes/class_editorexportplatform.rst | 29 + classes/class_editorplugin.rst | 6 +- classes/class_editorresourcetooltipplugin.rst | 2 +- classes/class_editorsettings.rst | 14 + classes/class_graphedit.rst | 30 +- classes/class_graphelement.rst | 233 ++++++ classes/class_graphnode.rst | 758 ++++-------------- classes/class_input.rst | 4 +- classes/class_int.rst | 17 +- classes/class_lineedit.rst | 4 +- classes/class_meshdatatool.rst | 2 +- classes/class_openxrinterface.rst | 415 +++++++++- classes/class_os.rst | 11 +- classes/class_projectsettings.rst | 2 +- classes/class_resource.rst | 16 +- classes/class_springarm3d.rst | 2 +- classes/class_staticbody2d.rst | 2 +- classes/class_staticbody3d.rst | 2 +- classes/class_tilemap.rst | 90 ++- classes/class_viewporttexture.rst | 2 +- classes/class_xrnode3d.rst | 17 + classes/class_xrpositionaltracker.rst | 12 + classes/index.rst | 1 + 30 files changed, 1035 insertions(+), 681 deletions(-) create mode 100644 classes/class_graphelement.rst diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 1d1ade07434..dc9869932f8 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -19,7 +19,7 @@ A 2D physics body that can't be moved by external forces. When moved manually, i Description ----------- -An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D`. +An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform2D`. When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index fbb83dc160c..27fe185e60c 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -19,7 +19,7 @@ A 3D physics body that can't be moved by external forces. When moved manually, i Description ----------- -An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D`. +An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform3D`. When **AnimatableBody3D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 65637bef9af..b1f21cd5eed 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -111,6 +111,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disable_ambient_light` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_fog` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disable_receive_shadows` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`distance_fade_max_distance` | ``10.0`` | @@ -1093,11 +1095,19 @@ Enables parts of the shader required for :ref:`GPUParticles3D` **FLAG_DISABLE_FOG** = ``21`` + +Disables receiving depth-based or volumetric fog. + .. _class_BaseMaterial3D_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Flags` **FLAG_MAX** = ``21`` +:ref:`Flags` **FLAG_MAX** = ``22`` Represents the size of the :ref:`Flags` enum. @@ -1982,6 +1992,23 @@ If ``true``, the object receives no ambient light. ---- +.. _class_BaseMaterial3D_property_disable_fog: + +.. rst-class:: classref-property + +:ref:`bool` **disable_fog** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| + +If ``true``, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_disable_receive_shadows: .. rst-class:: classref-property diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index cde57c64f9d..e79165e2760 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -19,7 +19,7 @@ A 2D polyline shape used for physics collision. Description ----------- -A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in ``BUILD_SEGMENTS`` mode. +A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SEGMENTS` mode. Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, :ref:`ConvexPolygonShape2D` is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. @@ -27,7 +27,7 @@ Being just a collection of interconnected line segments, **ConcavePolygonShape2D \ **Warning:** Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. **ConcavePolygonShape2D** is hollow, so it won't detect a collision. -\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s ``BUILD_SOLIDS`` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. +\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. .. rst-class:: classref-reftable-group diff --git a/classes/class_container.rst b/classes/class_container.rst index 7ea0dadb794..e64f8f45167 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -12,7 +12,7 @@ Container **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphNode`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` +**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` Base class for all GUI containers. diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 6323ac5d344..036557c04b6 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -19,11 +19,11 @@ A 2D convex polygon shape used for physics collision. Description ----------- -A 2D convex polygon shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in ``BUILD_SOLIDS`` mode. +A 2D convex polygon shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. \ **ConvexPolygonShape2D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape2D` which is hollow. This makes it more suitable for both detection and physics. -\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape2D** nodes or by using the :ref:`CollisionPolygon2D` node in ``BUILD_SOLIDS`` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. +\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape2D** nodes or by using the :ref:`CollisionPolygon2D` node in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. \ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` and :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 506f7e13318..3fe6742e1ca 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -1712,7 +1712,7 @@ Returns index of the screen which contains specified rectangle. :ref:`bool` **get_swap_cancel_ok** **(** **)** -Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. +Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 19831eeec0a..1c7b0151295 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -32,6 +32,35 @@ Tutorials - `$DOCS_URL/tutorials/platform/consoles.html `__ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_os_name` **(** **)** |const| | + +-----------------------------+---------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorExportPlatform_method_get_os_name: + +.. rst-class:: classref-method + +:ref:`String` **get_os_name** **(** **)** |const| + +Returns the name of the export operating system handled by this **EditorExportPlatform** class, as a friendly string. Possible return values are ``Windows``, ``Linux``, ``macOS``, ``Android``, ``iOS``, and ``Web``. + .. |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.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 7585ef62f6d..a69714af798 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -21,6 +21,8 @@ Description Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also :ref:`EditorScript` to add functions to the editor. +\ **Note:** Some names in this class contain "left" or "right" (e.g. :ref:`DOCK_SLOT_LEFT_UL`). These APIs assume left-to-right layout, and would be backwards when using right-to-left layout. These names are kept for compatibility reasons. + .. rst-class:: classref-introduction-group Tutorials @@ -400,7 +402,7 @@ Dock slot, left side, bottom-right (in default layout includes FileSystem dock). :ref:`DockSlot` **DOCK_SLOT_RIGHT_UL** = ``4`` -Dock slot, right side, upper-left (empty in default layout). +Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL: @@ -416,7 +418,7 @@ Dock slot, right side, bottom-left (empty in default layout). :ref:`DockSlot` **DOCK_SLOT_RIGHT_UR** = ``6`` -Dock slot, right side, upper-right (in default layout includes Inspector, Node and History docks). +Dock slot, right side, upper-right (empty in default layout). .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR: diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst index afe1b0fa77c..e53b184dcb2 100644 --- a/classes/class_editorresourcetooltipplugin.rst +++ b/classes/class_editorresourcetooltipplugin.rst @@ -68,7 +68,7 @@ Return ``true`` if the plugin is going to handle the given :ref:`Resource`). \ ``base`` is the base default tooltip, which is a :ref:`VBoxContainer` with a file name, type and size labels. If another plugin handled the same file type, ``base`` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned :ref:`Control`. diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 2090b616543..b73c184ab27 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -467,6 +467,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/code_complete_enabled` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/completion/colorize_suggestions` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/completion/complete_file_paths` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`text_editor/completion/idle_parse_delay` | @@ -3225,6 +3227,18 @@ If ``true``, code completion will be triggered automatically after :ref:`text_ed ---- +.. _class_EditorSettings_property_text_editor/completion/colorize_suggestions: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/completion/colorize_suggestions** + +If ``true`` enables the coloring for some items in the autocompletion suggestions, like vector components. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/completion/complete_file_paths: .. rst-class:: classref-property diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index 103729f576c..370cb2ee37c 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -190,6 +190,18 @@ Emitted at the beginning of a GraphNode movement. ---- +.. _class_GraphEdit_signal_close_nodes_request: + +.. rst-class:: classref-signal + +**close_nodes_request** **(** :ref:`StringName[]` nodes **)** + +Emitted when attempting to remove a GraphNode from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_signal_connection_drag_ended: .. rst-class:: classref-signal @@ -262,18 +274,6 @@ Emitted when the user presses :kbd:`Ctrl + C`. ---- -.. _class_GraphEdit_signal_delete_nodes_request: - -.. rst-class:: classref-signal - -**delete_nodes_request** **(** :ref:`StringName[]` nodes **)** - -Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphEdit_signal_disconnection_request: .. rst-class:: classref-signal @@ -739,7 +739,7 @@ Virtual method which can be overridden to customize how connections are drawn. Returns whether the ``mouse_position`` is in the input hot zone. -By default, a hot zone is a :ref:`Rect2` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_connection_input_position`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_connection_output_position` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. +By default, a hot zone is a :ref:`Rect2` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. Below is a sample code to help get started: @@ -747,7 +747,7 @@ Below is a sample code to help get started: func _is_in_input_hotzone(in_node, in_port, mouse_position): var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 + var port_pos: Vector2 = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -770,7 +770,7 @@ Below is a sample code to help get started: func _is_in_output_hotzone(in_node, in_port, mouse_position): var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 + var port_pos: Vector2 = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) diff --git a/classes/class_graphelement.rst b/classes/class_graphelement.rst new file mode 100644 index 00000000000..daab4e99ba3 --- /dev/null +++ b/classes/class_graphelement.rst @@ -0,0 +1,233 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphElement.xml. + +.. _class_GraphElement: + +GraphElement +============ + +**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`GraphNode` + +A container that represents a basic element that can be placed inside a :ref:`GraphEdit` control. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**GraphElement** allows to create custom elements for a :ref:`GraphEdit` graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see :ref:`GraphNode`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`draggable` | ``true`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`position_offset` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`resizable` | ``false`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`selectable` | ``true`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`selected` | ``false`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_GraphElement_signal_close_request: + +.. rst-class:: classref-signal + +**close_request** **(** **)** + +Emitted when closing the GraphElement is requested. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_dragged: + +.. rst-class:: classref-signal + +**dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** + +Emitted when the GraphElement is dragged. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_node_deselected: + +.. rst-class:: classref-signal + +**node_deselected** **(** **)** + +Emitted when the GraphElement is deselected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_node_selected: + +.. rst-class:: classref-signal + +**node_selected** **(** **)** + +Emitted when the GraphElement is selected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_position_offset_changed: + +.. rst-class:: classref-signal + +**position_offset_changed** **(** **)** + +Emitted when the GraphElement is moved. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_raise_request: + +.. rst-class:: classref-signal + +**raise_request** **(** **)** + +Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_resize_request: + +.. rst-class:: classref-signal + +**resize_request** **(** :ref:`Vector2` new_minsize **)** + +Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see :ref:`resizable`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GraphElement_property_draggable: + +.. rst-class:: classref-property + +:ref:`bool` **draggable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_draggable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_draggable** **(** **)** + +If ``true``, the user can drag the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_position_offset: + +.. rst-class:: classref-property + +:ref:`Vector2` **position_offset** = ``Vector2(0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_position_offset** **(** :ref:`Vector2` value **)** +- :ref:`Vector2` **get_position_offset** **(** **)** + +The offset of the GraphElement, relative to the scroll offset of the :ref:`GraphEdit`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_resizable: + +.. rst-class:: classref-property + +:ref:`bool` **resizable** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_resizable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_resizable** **(** **)** + +If ``true``, the user can resize the GraphElement. + +\ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphElement needs to be resized manually. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_selectable: + +.. rst-class:: classref-property + +:ref:`bool` **selectable** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_selectable** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selectable** **(** **)** + +If ``true``, the user can select the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_selected: + +.. rst-class:: classref-property + +:ref:`bool` **selected** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_selected** **(** :ref:`bool` value **)** +- :ref:`bool` **is_selected** **(** **)** + +If ``true``, the GraphElement is selected. + +.. |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.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 070037a8037..2b73a712aeb 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -10,7 +10,7 @@ GraphNode ========= -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`GraphElement` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` A container with connection ports, representing a node in a :ref:`GraphEdit`. @@ -25,7 +25,7 @@ Each **GraphNode** slot is defined by its index and can provide the node with up Slots can be configured in the Inspector dock once you add at least one child :ref:`Control`. The properties are grouped by each slot's index in the "Slot" section. -\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that, :ref:`GraphEdit` uses the port's index and not the slot's index. You can use :ref:`get_connection_input_slot` and :ref:`get_connection_output_slot` to get the slot index from the port index. +\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that :ref:`GraphEdit` uses the port's index and not the slot's index. You can use :ref:`get_input_port_slot` and :ref:`get_output_port_slot` to get the slot index from the port index. .. rst-class:: classref-reftable-group @@ -35,29 +35,11 @@ Properties .. table:: :widths: auto - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool` | :ref:`draggable` | ``true`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`String` | :ref:`language` | ``""`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`Overlay` | :ref:`overlay` | ``0`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`position_offset` | ``Vector2(0, 0)`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool` | :ref:`resizable` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool` | :ref:`selectable` | ``true`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool` | :ref:`selected` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool` | :ref:`show_close` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`TextDirection` | :ref:`text_direction` | ``0`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`String` | :ref:`title` | ``""`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + +----------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter` | mouse_filter | ``0`` (overrides :ref:`Control`) | + +----------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String` | :ref:`title` | ``""`` | + +----------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -67,65 +49,65 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_all_slots` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_slot` **(** :ref:`int` slot_index **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_connection_input_color` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_input_count` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_input_height` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_connection_input_position` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_input_slot` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_input_type` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_connection_output_color` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_output_count` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_output_height` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_connection_output_position` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_output_slot` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_connection_output_type` **(** :ref:`int` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_slot_draw_stylebox` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot` **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_color_left` **(** :ref:`int` slot_index, :ref:`Color` color **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_color_right` **(** :ref:`int` slot_index, :ref:`Color` color **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_draw_stylebox` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_enabled_left` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_enabled_right` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_type_left` **(** :ref:`int` slot_index, :ref:`int` type **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_type_right` **(** :ref:`int` slot_index, :ref:`int` type **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_port` **(** :ref:`int` slot_index, :ref:`Vector2i` position, :ref:`bool` left, :ref:`Color` color **)** |virtual| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_all_slots` **(** **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_slot` **(** :ref:`int` slot_index **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_input_port_color` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_port_count` **(** **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_input_port_position` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_port_slot` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_port_type` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_output_port_color` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_output_port_count` **(** **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_output_port_position` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_output_port_slot` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_output_port_type` **(** :ref:`int` port_idx **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_slot_color_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_slot_color_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slot_type_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slot_type_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HBoxContainer` | :ref:`get_titlebar_hbox` **(** **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_draw_stylebox` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_enabled_left` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_slot_enabled_right` **(** :ref:`int` slot_index **)** |const| | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot` **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_color_left` **(** :ref:`int` slot_index, :ref:`Color` color **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_color_right` **(** :ref:`int` slot_index, :ref:`Color` color **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_draw_stylebox` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_enabled_left` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_enabled_right` **(** :ref:`int` slot_index, :ref:`bool` enable **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_type_left` **(** :ref:`int` slot_index, :ref:`int` type **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_slot_type_right` **(** :ref:`int` slot_index, :ref:`int` type **)** | + +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -135,43 +117,27 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`close_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`title_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`close_h_offset` | ``12`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`close_offset` | ``22`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`port_offset` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`separation` | ``2`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`title_h_offset` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`title_offset` | ``26`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`title_font` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`close` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`port` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`resizer` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`breakpoint` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`frame` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`position` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`selected_frame` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`slot` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`resizer_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`port_h_offset` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`separation` | ``2`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`port` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`resizer` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`panel_selected` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`slot` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`titlebar` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`titlebar_selected` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -182,95 +148,11 @@ Theme Properties Signals ------- -.. _class_GraphNode_signal_close_request: - -.. rst-class:: classref-signal - -**close_request** **(** **)** - -Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see :ref:`show_close`). - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_dragged: - -.. rst-class:: classref-signal - -**dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** - -Emitted when the GraphNode is dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_node_deselected: - -.. rst-class:: classref-signal - -**node_deselected** **(** **)** - -Emitted when the GraphNode is deselected. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_node_selected: - -.. rst-class:: classref-signal - -**node_selected** **(** **)** - -Emitted when the GraphNode is selected. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_position_offset_changed: - -.. rst-class:: classref-signal - -**position_offset_changed** **(** **)** - -Emitted when the GraphNode is moved. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_raise_request: - -.. rst-class:: classref-signal - -**raise_request** **(** **)** - -Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_resize_request: - -.. rst-class:: classref-signal - -**resize_request** **(** :ref:`Vector2` new_minsize **)** - -Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see :ref:`resizable`). - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_signal_slot_updated: .. rst-class:: classref-signal -**slot_updated** **(** :ref:`int` idx **)** +**slot_updated** **(** :ref:`int` slot_index **)** Emitted when any GraphNode's slot is updated. @@ -280,207 +162,9 @@ Emitted when any GraphNode's slot is updated. .. rst-class:: classref-descriptions-group -Enumerations ------------- - -.. _enum_GraphNode_Overlay: - -.. rst-class:: classref-enumeration - -enum **Overlay**: - -.. _class_GraphNode_constant_OVERLAY_DISABLED: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay` **OVERLAY_DISABLED** = ``0`` - -No overlay is shown. - -.. _class_GraphNode_constant_OVERLAY_BREAKPOINT: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay` **OVERLAY_BREAKPOINT** = ``1`` - -Show overlay set in the :ref:`breakpoint` theme property. - -.. _class_GraphNode_constant_OVERLAY_POSITION: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay` **OVERLAY_POSITION** = ``2`` - -Show overlay set in the :ref:`position` theme property. - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Property Descriptions --------------------- -.. _class_GraphNode_property_draggable: - -.. rst-class:: classref-property - -:ref:`bool` **draggable** = ``true`` - -.. rst-class:: classref-property-setget - -- void **set_draggable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_draggable** **(** **)** - -If ``true``, the user can drag the GraphNode. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_language: - -.. rst-class:: classref-property - -:ref:`String` **language** = ``""`` - -.. rst-class:: classref-property-setget - -- void **set_language** **(** :ref:`String` value **)** -- :ref:`String` **get_language** **(** **)** - -Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_overlay: - -.. rst-class:: classref-property - -:ref:`Overlay` **overlay** = ``0`` - -.. rst-class:: classref-property-setget - -- void **set_overlay** **(** :ref:`Overlay` value **)** -- :ref:`Overlay` **get_overlay** **(** **)** - -Sets the overlay shown above the GraphNode. See :ref:`Overlay`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_position_offset: - -.. rst-class:: classref-property - -:ref:`Vector2` **position_offset** = ``Vector2(0, 0)`` - -.. rst-class:: classref-property-setget - -- void **set_position_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_position_offset** **(** **)** - -The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit`. - -\ **Note:** You cannot use position offset directly, as :ref:`GraphEdit` is a :ref:`Container`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_resizable: - -.. rst-class:: classref-property - -:ref:`bool` **resizable** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_resizable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_resizable** **(** **)** - -If ``true``, the user can resize the GraphNode. - -\ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphNode needs to be resized manually. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_selectable: - -.. rst-class:: classref-property - -:ref:`bool` **selectable** = ``true`` - -.. rst-class:: classref-property-setget - -- void **set_selectable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_selectable** **(** **)** - -If ``true``, the user can select the GraphNode. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_selected: - -.. rst-class:: classref-property - -:ref:`bool` **selected** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_selected** **(** :ref:`bool` value **)** -- :ref:`bool` **is_selected** **(** **)** - -If ``true``, the GraphNode is selected. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_show_close: - -.. rst-class:: classref-property - -:ref:`bool` **show_close** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_show_close_button** **(** :ref:`bool` value **)** -- :ref:`bool` **is_close_button_visible** **(** **)** - -If ``true``, the close button will be visible. - -\ **Note:** Pressing it will only emit the :ref:`close_request` signal, the GraphNode needs to be removed manually. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_text_direction: - -.. rst-class:: classref-property - -:ref:`TextDirection` **text_direction** = ``0`` - -.. rst-class:: classref-property-setget - -- void **set_text_direction** **(** :ref:`TextDirection` value **)** -- :ref:`TextDirection` **get_text_direction** **(** **)** - -Base text writing direction. - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_property_title: .. rst-class:: classref-property @@ -503,169 +187,159 @@ The text displayed in the GraphNode's title bar. Method Descriptions ------------------- -.. _class_GraphNode_method_clear_all_slots: +.. _class_GraphNode_method__draw_port: .. rst-class:: classref-method -void **clear_all_slots** **(** **)** - -Disables all input and output slots of the GraphNode. +void **_draw_port** **(** :ref:`int` slot_index, :ref:`Vector2i` position, :ref:`bool` left, :ref:`Color` color **)** |virtual| -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_method_clear_slot: - -.. rst-class:: classref-method - -void **clear_slot** **(** :ref:`int` slot_index **)** +.. container:: contribute -Disables input and output slot whose index is ``slot_index``. + There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_color: +.. _class_GraphNode_method_clear_all_slots: .. rst-class:: classref-method -:ref:`Color` **get_connection_input_color** **(** :ref:`int` port **)** +void **clear_all_slots** **(** **)** -Returns the :ref:`Color` of the input connection ``port``. +Disables all slots of the GraphNode. This will remove all input/output ports from the GraphNode. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_count: +.. _class_GraphNode_method_clear_slot: .. rst-class:: classref-method -:ref:`int` **get_connection_input_count** **(** **)** +void **clear_slot** **(** :ref:`int` slot_index **)** -Returns the number of enabled input slots (connections) to the GraphNode. +Disables the slot with the given ``slot_index``. This will remove the corresponding input and output port from the GraphNode. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_height: +.. _class_GraphNode_method_get_input_port_color: .. rst-class:: classref-method -:ref:`int` **get_connection_input_height** **(** :ref:`int` port **)** +:ref:`Color` **get_input_port_color** **(** :ref:`int` port_idx **)** -Returns the height of the input connection ``port``. +Returns the :ref:`Color` of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_position: +.. _class_GraphNode_method_get_input_port_count: .. rst-class:: classref-method -:ref:`Vector2` **get_connection_input_position** **(** :ref:`int` port **)** +:ref:`int` **get_input_port_count** **(** **)** -Returns the position of the input connection ``port``. +Returns the number of slots with an enabled input port. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_slot: +.. _class_GraphNode_method_get_input_port_position: .. rst-class:: classref-method -:ref:`int` **get_connection_input_slot** **(** :ref:`int` port **)** +:ref:`Vector2` **get_input_port_position** **(** :ref:`int` port_idx **)** -Returns the corresponding slot index of the input connection ``port``. +Returns the position of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_type: +.. _class_GraphNode_method_get_input_port_slot: .. rst-class:: classref-method -:ref:`int` **get_connection_input_type** **(** :ref:`int` port **)** +:ref:`int` **get_input_port_slot** **(** :ref:`int` port_idx **)** -Returns the type of the input connection ``port``. +Returns the corresponding slot index of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_color: +.. _class_GraphNode_method_get_input_port_type: .. rst-class:: classref-method -:ref:`Color` **get_connection_output_color** **(** :ref:`int` port **)** +:ref:`int` **get_input_port_type** **(** :ref:`int` port_idx **)** -Returns the :ref:`Color` of the output connection ``port``. +Returns the type of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_count: +.. _class_GraphNode_method_get_output_port_color: .. rst-class:: classref-method -:ref:`int` **get_connection_output_count** **(** **)** +:ref:`Color` **get_output_port_color** **(** :ref:`int` port_idx **)** -Returns the number of enabled output slots (connections) of the GraphNode. +Returns the :ref:`Color` of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_height: +.. _class_GraphNode_method_get_output_port_count: .. rst-class:: classref-method -:ref:`int` **get_connection_output_height** **(** :ref:`int` port **)** +:ref:`int` **get_output_port_count** **(** **)** -Returns the height of the output connection ``port``. +Returns the number of slots with an enabled output port. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_position: +.. _class_GraphNode_method_get_output_port_position: .. rst-class:: classref-method -:ref:`Vector2` **get_connection_output_position** **(** :ref:`int` port **)** +:ref:`Vector2` **get_output_port_position** **(** :ref:`int` port_idx **)** -Returns the position of the output connection ``port``. +Returns the position of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_slot: +.. _class_GraphNode_method_get_output_port_slot: .. rst-class:: classref-method -:ref:`int` **get_connection_output_slot** **(** :ref:`int` port **)** +:ref:`int` **get_output_port_slot** **(** :ref:`int` port_idx **)** -Returns the corresponding slot index of the output connection ``port``. +Returns the corresponding slot index of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_type: +.. _class_GraphNode_method_get_output_port_type: .. rst-class:: classref-method -:ref:`int` **get_connection_output_type** **(** :ref:`int` port **)** +:ref:`int` **get_output_port_type** **(** :ref:`int` port_idx **)** -Returns the type of the output connection ``port``. +Returns the type of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator @@ -677,7 +351,7 @@ Returns the type of the output connection ``port``. :ref:`Color` **get_slot_color_left** **(** :ref:`int` slot_index **)** |const| -Returns the left (input) :ref:`Color` of the slot ``slot_index``. +Returns the left (input) :ref:`Color` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator @@ -689,7 +363,7 @@ Returns the left (input) :ref:`Color` of the slot ``slot_index``. :ref:`Color` **get_slot_color_right** **(** :ref:`int` slot_index **)** |const| -Returns the right (output) :ref:`Color` of the slot ``slot_index``. +Returns the right (output) :ref:`Color` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator @@ -701,7 +375,7 @@ Returns the right (output) :ref:`Color` of the slot ``slot_index``. :ref:`int` **get_slot_type_left** **(** :ref:`int` slot_index **)** |const| -Returns the left (input) type of the slot ``slot_index``. +Returns the left (input) type of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator @@ -713,7 +387,19 @@ Returns the left (input) type of the slot ``slot_index``. :ref:`int` **get_slot_type_right** **(** :ref:`int` slot_index **)** |const| -Returns the right (output) type of the slot ``slot_index``. +Returns the right (output) type of the slot with the given ``slot_index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphNode_method_get_titlebar_hbox: + +.. rst-class:: classref-method + +:ref:`HBoxContainer` **get_titlebar_hbox** **(** **)** + +Returns the :ref:`HBoxContainer` used for the title bar, only containing a :ref:`Label` for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons. .. rst-class:: classref-item-separator @@ -725,7 +411,7 @@ Returns the right (output) type of the slot ``slot_index``. :ref:`bool` **is_slot_draw_stylebox** **(** :ref:`int` slot_index **)** |const| -Returns true if the background :ref:`StyleBox` of the slot ``slot_index`` is drawn. +Returns true if the background :ref:`StyleBox` of the slot with the given ``slot_index`` is drawn. .. rst-class:: classref-item-separator @@ -737,7 +423,7 @@ Returns true if the background :ref:`StyleBox` of the slot ``slo :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` slot_index **)** |const| -Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled. +Returns ``true`` if left (input) side of the slot with the given ``slot_index`` is enabled. .. rst-class:: classref-item-separator @@ -749,7 +435,7 @@ Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled. :ref:`bool` **is_slot_enabled_right** **(** :ref:`int` slot_index **)** |const| -Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled. +Returns ``true`` if right (output) side of the slot with the given ``slot_index`` is enabled. .. rst-class:: classref-item-separator @@ -761,7 +447,7 @@ Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled. void **set_slot** **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** -Sets properties of the slot with the ``slot_index`` index. +Sets properties of the slot with the given ``slot_index``. If ``enable_left_port``/``enable_right_port`` is ``true``, a port will appear and the slot will be able to be connected from this side. @@ -785,7 +471,7 @@ Individual properties can also be set using one of the ``set_slot_*`` methods. void **set_slot_color_left** **(** :ref:`int` slot_index, :ref:`Color` color **)** -Sets the :ref:`Color` of the left (input) side of the slot ``slot_index`` to ``color``. +Sets the :ref:`Color` of the left (input) side of the slot with the given ``slot_index`` to ``color``. .. rst-class:: classref-item-separator @@ -797,7 +483,7 @@ Sets the :ref:`Color` of the left (input) side of the slot ``slot_i void **set_slot_color_right** **(** :ref:`int` slot_index, :ref:`Color` color **)** -Sets the :ref:`Color` of the right (output) side of the slot ``slot_index`` to ``color``. +Sets the :ref:`Color` of the right (output) side of the slot with the given ``slot_index`` to ``color``. .. rst-class:: classref-item-separator @@ -809,7 +495,7 @@ Sets the :ref:`Color` of the right (output) side of the slot ``slot void **set_slot_draw_stylebox** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the background :ref:`StyleBox` of the slot ``slot_index``. +Toggles the background :ref:`StyleBox` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator @@ -821,7 +507,7 @@ Toggles the background :ref:`StyleBox` of the slot ``slot_index` void **set_slot_enabled_left** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the left (input) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side. +Toggles the left (input) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side. .. rst-class:: classref-item-separator @@ -833,7 +519,7 @@ Toggles the left (input) side of the slot ``slot_index``. If ``enable`` is ``tru void **set_slot_enabled_right** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the right (output) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side. +Toggles the right (output) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side. .. rst-class:: classref-item-separator @@ -845,7 +531,7 @@ Toggles the right (output) side of the slot ``slot_index``. If ``enable`` is ``t void **set_slot_type_left** **(** :ref:`int` slot_index, :ref:`int` type **)** -Sets the left (input) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. +Sets the left (input) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. .. rst-class:: classref-item-separator @@ -857,7 +543,7 @@ Sets the left (input) type of the slot ``slot_index`` to ``type``. If the value void **set_slot_type_right** **(** :ref:`int` slot_index, :ref:`int` type **)** -Sets the right (output) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. +Sets the right (output) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. .. rst-class:: classref-section-separator @@ -868,18 +554,6 @@ Sets the right (output) type of the slot ``slot_index`` to ``type``. If the valu Theme Property Descriptions --------------------------- -.. _class_GraphNode_theme_color_close_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **close_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -The color modulation applied to the close button icon. - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_theme_color_resizer_color: .. rst-class:: classref-themeproperty @@ -892,49 +566,11 @@ The color modulation applied to the resizer icon. ---- -.. _class_GraphNode_theme_color_title_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -Color of the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_constant_close_h_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **close_h_offset** = ``12`` - -.. container:: contribute - - There is currently no description for this theme property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_constant_close_offset: +.. _class_GraphNode_theme_constant_port_h_offset: .. rst-class:: classref-themeproperty -:ref:`int` **close_offset** = ``22`` - -The vertical offset of the close button. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_constant_port_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **port_offset** = ``0`` +:ref:`int` **port_h_offset** = ``0`` Horizontal offset for the ports. @@ -954,54 +590,6 @@ The vertical distance between ports. ---- -.. _class_GraphNode_theme_constant_title_h_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **title_h_offset** = ``0`` - -Horizontal offset of the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_constant_title_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **title_offset** = ``26`` - -Vertical offset of the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_font_title_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **title_font** - -Font used for the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_icon_close: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **close** - -The icon for the close button, visible when :ref:`show_close` is enabled. - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_theme_icon_port: .. rst-class:: classref-themeproperty @@ -1020,67 +608,67 @@ The icon used for representing ports. :ref:`Texture2D` **resizer** -The icon used for resizer, visible when :ref:`resizable` is enabled. +The icon used for the resizer, visible when :ref:`GraphElement.resizable` is enabled. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_breakpoint: +.. _class_GraphNode_theme_style_panel: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **breakpoint** +:ref:`StyleBox` **panel** -The background used when :ref:`overlay` is set to :ref:`OVERLAY_BREAKPOINT`. +The default background for the slot area of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_frame: +.. _class_GraphNode_theme_style_panel_selected: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **frame** +:ref:`StyleBox` **panel_selected** -The default background for **GraphNode**. +The :ref:`StyleBox` used for the slot area when selected. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_position: +.. _class_GraphNode_theme_style_slot: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **position** +:ref:`StyleBox` **slot** -The background used when :ref:`overlay` is set to :ref:`OVERLAY_POSITION`. +The :ref:`StyleBox` used for each slot of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_selected_frame: +.. _class_GraphNode_theme_style_titlebar: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **selected_frame** +:ref:`StyleBox` **titlebar** -The background used when the **GraphNode** is selected. +The :ref:`StyleBox` used for the title bar of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_slot: +.. _class_GraphNode_theme_style_titlebar_selected: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **slot** +:ref:`StyleBox` **titlebar_selected** -The :ref:`StyleBox` used for each slot of the **GraphNode**. +The :ref:`StyleBox` used for the title bar of the **GraphNode** when it is selected. .. |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_input.rst b/classes/class_input.rst index 5fab33f92de..02c6607890b 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -486,7 +486,7 @@ Returns the acceleration in m/s² of the device's accelerometer sensor, if the d Note this method returns an empty :ref:`Vector3` when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. -\ **Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns :ref:`Vector3.ZERO`. +\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ Returns the last mouse velocity. To provide a precise and jitter-free velocity, Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO`. -\ **Note:** This method only works on Android, iOS and UWP. On other platforms, it always returns :ref:`Vector3.ZERO`. +\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. .. rst-class:: classref-item-separator diff --git a/classes/class_int.rst b/classes/class_int.rst index f605703e331..edcdee797fa 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -38,7 +38,7 @@ Likewise, :ref:`float`\ s can be automatically converted into **int .. code-tab:: csharp int x = 1; // x is 1 - x = 4.2; // x is 4, because 4.2 gets truncated + x = (int)4.2; // x is 4, because 4.2 gets truncated // We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit. long maxLong = 9223372036854775807; // Biggest value a long can store maxLong++; // maxLong is now -9223372036854775808, because it wrapped around. @@ -49,14 +49,25 @@ Likewise, :ref:`float`\ s can be automatically converted into **int -In GDScript, you can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. +You can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. -:: + +.. tabs:: + + .. code-tab:: gdscript var x = 0b1001 # x is 9 var y = 0xF5 # y is 245 var z = 10_000_000 # z is 10000000 + .. code-tab:: csharp + + int x = 0b1001; // x is 9 + int y = 0xF5; // y is 245 + int z = 10_000_000; // z is 10000000 + + + .. rst-class:: classref-reftable-group Constructors diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 69fe804fa3c..a3e997b1c4c 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -848,7 +848,7 @@ If ``true``, the **LineEdit** width will increase to stay longer than the :ref:` - void **set_flat** **(** :ref:`bool` value **)** - :ref:`bool` **is_flat** **(** **)** -If ``true``, the **LineEdit** don't display decoration. +If ``true``, the **LineEdit** doesn't display decoration. .. rst-class:: classref-item-separator @@ -865,7 +865,7 @@ If ``true``, the **LineEdit** don't display decoration. - void **set_language** **(** :ref:`String` value **)** - :ref:`String` **get_language** **(** **)** -Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead. .. rst-class:: classref-item-separator diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 34e28a4a26a..45902aa0456 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -377,7 +377,7 @@ Returns the material assigned to the :ref:`Mesh`. :ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** |const| -Returns the vertex at given index. +Returns the position of the given vertex. .. rst-class:: classref-item-separator diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 78a6fff0170..559e38bab39 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -52,15 +52,29 @@ Methods .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_action_sets` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_action_set_active` **(** :ref:`String` name **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_action_set_active` **(** :ref:`String` name, :ref:`bool` active **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_action_sets` **(** **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_angular_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_linear_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_position` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_hand_joint_radius` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_hand_joint_rotation` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HandMotionRange` | :ref:`get_motion_range` **(** :ref:`Hand` hand **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_set_active` **(** :ref:`String` name **)** |const| | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_action_set_active` **(** :ref:`String` name, :ref:`bool` active **)** | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_motion_range` **(** :ref:`Hand` hand, :ref:`HandMotionRange` motion_range **)** | + +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -133,6 +147,305 @@ Informs our OpenXR session is now visible (output is being sent to the HMD). .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_OpenXRInterface_Hand: + +.. rst-class:: classref-enumeration + +enum **Hand**: + +.. _class_OpenXRInterface_constant_HAND_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand` **HAND_LEFT** = ``0`` + +Left hand. + +.. _class_OpenXRInterface_constant_HAND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand` **HAND_RIGHT** = ``1`` + +Right hand. + +.. _class_OpenXRInterface_constant_HAND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand` **HAND_MAX** = ``2`` + +Maximum value for the hand enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandMotionRange: + +.. rst-class:: classref-enumeration + +enum **HandMotionRange**: + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_UNOBSTRUCTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange` **HAND_MOTION_RANGE_UNOBSTRUCTED** = ``0`` + + + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange` **HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1`` + + + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange` **HAND_MOTION_RANGE_MAX** = ``2`` + + + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandJoints: + +.. rst-class:: classref-enumeration + +enum **HandJoints**: + +.. _class_OpenXRInterface_constant_HAND_JOINT_PALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_PALM** = ``0`` + +Palm joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_WRIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_WRIST** = ``1`` + +Wrist joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_THUMB_METACARPAL** = ``2`` + +Thumb metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_THUMB_PROXIMAL** = ``3`` + +Thumb proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_THUMB_DISTAL** = ``4`` + +Thumb distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_THUMB_TIP** = ``5`` + +Thumb tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_INDEX_METACARPAL** = ``6`` + +Index metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_INDEX_PROXIMAL** = ``7`` + +Index proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8`` + +Index intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_INDEX_DISTAL** = ``9`` + +Index distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_INDEX_TIP** = ``10`` + +Index tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MIDDLE_METACARPAL** = ``11`` + +Middle metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12`` + +Middle proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13`` + +Middle intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MIDDLE_DISTAL** = ``14`` + +Middle distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MIDDLE_TIP** = ``15`` + +Middle tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_RING_METACARPAL** = ``16`` + +Ring metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_RING_PROXIMAL** = ``17`` + +Ring proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_RING_INTERMEDIATE** = ``18`` + +Ring intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_RING_DISTAL** = ``19`` + +Ring distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_RING_TIP** = ``20`` + +Ring tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_LITTLE_METACARPAL** = ``21`` + +Little metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_LITTLE_PROXIMAL** = ``22`` + +Little proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23`` + +Little intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_LITTLE_DISTAL** = ``24`` + +Little distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_LITTLE_TIP** = ``25`` + +Little tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints` **HAND_JOINT_MAX** = ``26`` + +Maximum value for the hand joint enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -199,6 +512,78 @@ Returns display refresh rates supported by the current HMD. Only returned if thi ---- +.. _class_OpenXRInterface_method_get_hand_joint_angular_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_hand_joint_angular_velocity** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_linear_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_hand_joint_linear_velocity** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_hand_joint_position** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_radius: + +.. rst-class:: classref-method + +:ref:`float` **get_hand_joint_radius** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_rotation: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_hand_joint_rotation** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_motion_range: + +.. rst-class:: classref-method + +:ref:`HandMotionRange` **get_motion_range** **(** :ref:`Hand` hand **)** |const| + +If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_method_is_action_set_active: .. rst-class:: classref-method @@ -219,6 +604,18 @@ void **set_action_set_active** **(** :ref:`String` name, :ref:`boo Sets the given action set as active or inactive. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_set_motion_range: + +.. rst-class:: classref-method + +void **set_motion_range** **(** :ref:`Hand` hand, :ref:`HandMotionRange` motion_range **)** + +If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``. + .. |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.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_os.rst b/classes/class_os.rst index 95705101d0b..d2ef9062566 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -852,7 +852,7 @@ Returns the model name of the current device. Returns the name of the host OS. -On Windows, this is ``"Windows"`` or ``"UWP"`` if exported on Universal Windows Platform. +On Windows, this is ``"Windows"``. On macOS, this is ``"macOS"``. @@ -874,7 +874,7 @@ On the web, this is ``"Web"``. .. code-tab:: gdscript match OS.get_name(): - "Windows", "UWP": + "Windows": print("Windows") "macOS": print("macOS") @@ -892,7 +892,6 @@ On the web, this is ``"Web"``. switch (OS.GetName()) { case "Windows": - case "UWP": GD.Print("Windows"); break; case "macOS": @@ -956,7 +955,7 @@ Returns the number of *logical* CPU cores available on the host machine. On CPUs Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"). -\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android, Web and UWP, :ref:`get_processor_name` returns an empty string. +\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, :ref:`get_processor_name` returns an empty string. .. rst-class:: classref-item-separator @@ -1090,7 +1089,7 @@ Returns a string that is unique to the device. \ **Note:** This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by :ref:`get_unique_id` for security purposes. -\ **Note:** Returns an empty string on Web and UWP, as this method isn't implemented on those platforms yet. +\ **Note:** Returns an empty string on Web, as this method isn't implemented on this platform yet. .. rst-class:: classref-item-separator @@ -1136,8 +1135,6 @@ For rolling distributions, such as Arch Linux, an empty string is returned. For macOS and iOS, the major and minor version are returned, as well as the patch number. -For UWP, the device family version is returned. - For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. \ **Note:** This method is not supported on the web platform. It returns an empty string. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 6b60f74ebb5..34d791cca8f 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -4284,7 +4284,7 @@ If ``true``, snaps :ref:`Control` node vertices to the nearest pi :ref:`bool` **gui/common/swap_cancel_ok** -If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows and UWP to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok` can be used to query whether buttons are swapped at run-time. +If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok` can be used to query whether buttons are swapped at run-time. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`DisplayServer.dialog_show`. diff --git a/classes/class_resource.rst b/classes/class_resource.rst index bd9feec399f..1b96740dadc 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -105,7 +105,7 @@ Emitted when the resource changes, usually when one of its properties is modifie **setup_local_to_scene_requested** **(** **)** -Emitted when :ref:`setup_local_to_scene` is called, usually by a newly duplicated resource with :ref:`resource_local_to_scene` set to ``true``. Custom behavior can be defined by connecting this signal. +Emitted by the newly duplicated resource with :ref:`resource_local_to_scene` set to ``true``, when the scene is instantiated. Custom behavior can be defined by connecting this signal. .. rst-class:: classref-section-separator @@ -262,20 +262,6 @@ Emits the :ref:`setup_local_to_scene_requested` from a script, **not** by overriding this method. -\ **Example:** Assign a random value to ``health`` for every duplicated Resource from an instantiated scene, excluding the original. - -:: - - extends Resource - - var health = 0 - - func _init(): - setup_local_to_scene_requested.connect(randomize_health) - - func randomize_health(): - health = randi_range(10, 40) - .. rst-class:: classref-item-separator ---- diff --git a/classes/class_springarm3d.rst b/classes/class_springarm3d.rst index f18921578a2..221147efd1a 100644 --- a/classes/class_springarm3d.rst +++ b/classes/class_springarm3d.rst @@ -19,7 +19,7 @@ A 3D raycast that dynamically moves its children near the collision point. Description ----------- -**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check. +**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check). .. rst-class:: classref-reftable-group diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index 0fc82368a11..58c16a521fc 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -21,7 +21,7 @@ A 2D physics body that can't be moved by external forces. When moved manually, i Description ----------- -A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D`. +A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform2D`. When **StaticBody2D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody2D` instead. diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 7a638e881ef..9f3de65a38c 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -21,7 +21,7 @@ A 3D physics body that can't be moved by external forces. When moved manually, i Description ----------- -A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D`. +A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform3D`. When **StaticBody3D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody3D` instead. diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index bd1b742bb26..8a4932475d1 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -21,6 +21,10 @@ Description Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet` which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other. +For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a :ref:`TileSetScenesCollectionSource` may be initialized after their parent. + +To force an update earlier on, call :ref:`update_internals`. + .. rst-class:: classref-introduction-group Tutorials @@ -48,8 +52,6 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`cell_quadrant_size` | ``16`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`collision_animatable` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ @@ -57,6 +59,8 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`VisibilityMode` | :ref:`navigation_visibility_mode` | ``0`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`rendering_quadrant_size` | ``16`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`TileSet` | :ref:`tile_set` | | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ @@ -135,6 +139,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_layer` **(** :ref:`int` layer, :ref:`int` to_position **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`notify_runtime_tile_data_update` **(** :ref:`int` layer=-1 **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_layer` **(** :ref:`int` layer **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** | @@ -161,6 +167,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_pattern` **(** :ref:`int` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_internals` **(** **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -227,23 +235,6 @@ Always show. Property Descriptions --------------------- -.. _class_TileMap_property_cell_quadrant_size: - -.. rst-class:: classref-property - -:ref:`int` **cell_quadrant_size** = ``16`` - -.. rst-class:: classref-property-setget - -- void **set_quadrant_size** **(** :ref:`int` value **)** -- :ref:`int` **get_quadrant_size** **(** **)** - -The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. - -.. rst-class:: classref-item-separator - ----- - .. _class_TileMap_property_collision_animatable: .. rst-class:: classref-property @@ -297,6 +288,23 @@ Show or hide the TileMap's navigation meshes. If set to :ref:`VISIBILITY_MODE_DE ---- +.. _class_TileMap_property_rendering_quadrant_size: + +.. rst-class:: classref-property + +:ref:`int` **rendering_quadrant_size** = ``16`` + +.. rst-class:: classref-property-setget + +- void **set_rendering_quadrant_size** **(** :ref:`int` value **)** +- :ref:`int` **get_rendering_quadrant_size** **(** **)** + +The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_property_tile_set: .. rst-class:: classref-property @@ -331,7 +339,7 @@ This method is only called if :ref:`_use_tile_data_runtime_update` to trigger a TileMap update. +\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update` to notify the TileMap it needs an update. .. rst-class:: classref-item-separator @@ -347,6 +355,8 @@ Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` \ **Warning:** Make sure this function only return ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. +\ **Note:** If the result of this function should changed, use :ref:`notify_runtime_tile_data_update` to notify the TileMap it needs an update. + .. rst-class:: classref-item-separator ---- @@ -421,11 +431,7 @@ Clears cells that do not exist in the tileset. void **force_update** **(** :ref:`int` layer=-1 **)** -Triggers an update of the TileMap. If ``layer`` is provided and is positive, only updates the given layer. - -\ **Note:** The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in :ref:`_tile_data_runtime_update`) need to be applied. - -\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and the tiles they impact (by placing frequently updated tiles in a dedicated layer for example). +*Deprecated.* See :ref:`notify_runtime_tile_data_update` and :ref:`update_internals`. .. rst-class:: classref-item-separator @@ -783,6 +789,24 @@ Moves the layer at index ``layer`` to the given position ``to_position`` in the ---- +.. _class_TileMap_method_notify_runtime_tile_data_update: + +.. rst-class:: classref-method + +void **notify_runtime_tile_data_update** **(** :ref:`int` layer=-1 **)** + +Notifies the TileMap node that calls to :ref:`_use_tile_data_runtime_update` or :ref:`_tile_data_runtime_update` will lead to different results. This will thus trigger a TileMap update. + +If ``layer`` is provided, only notifies changes for the given layer. Providing the ``layer`` argument (when applicable) is usually preferred for performance reasons. + +\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. + +\ **Note:** This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals`). + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_method_remove_layer: .. rst-class:: classref-method @@ -981,6 +1005,22 @@ Paste the given :ref:`TileMapPattern` at the given ``posit If ``layer`` is negative, the layers are accessed from the last one. +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_update_internals: + +.. rst-class:: classref-method + +void **update_internals** **(** **)** + +Triggers a direct update of the TileMap. Usually, calling this function is not needed, as TileMap node updates automatically when one of its properties or cells is modified. + +However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the TileMap to update right away instead. + +\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact. + .. |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.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index e710d0ff3e2..1b8ac69986e 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -23,7 +23,7 @@ Provides the content of a :ref:`Viewport` as a dynamic :ref:`Tex To create a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` method on the target viewport. -\ **Note:** When local to scene, this texture uses :ref:`Resource.setup_local_to_scene` to set the proxy texture and flags in the local viewport. Local to scene **ViewportTexture**\ s will return incorrect data until the scene root is ready (see :ref:`Node.ready`). +\ **Note:** A **ViewportTexture** is always local to its scene (see :ref:`Resource.resource_local_to_scene`). If the scene root is not ready, it may return incorrect data (see :ref:`Node.ready`). .. rst-class:: classref-introduction-group diff --git a/classes/class_xrnode3d.rst b/classes/class_xrnode3d.rst index 129e5bb36fb..9f3ba27f1d8 100644 --- a/classes/class_xrnode3d.rst +++ b/classes/class_xrnode3d.rst @@ -68,6 +68,23 @@ Methods .. rst-class:: classref-descriptions-group +Signals +------- + +.. _class_XRNode3D_signal_tracking_changed: + +.. rst-class:: classref-signal + +**tracking_changed** **(** :ref:`bool` tracking **)** + +Emitted when the :ref:`tracker` starts or stops receiving updated tracking data for the :ref:`pose` being tracked. The ``tracking`` argument indicates whether the tracker is getting updated tracking data. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- diff --git a/classes/class_xrpositionaltracker.rst b/classes/class_xrpositionaltracker.rst index b2f2ad96dee..59db89d8829 100644 --- a/classes/class_xrpositionaltracker.rst +++ b/classes/class_xrpositionaltracker.rst @@ -143,6 +143,18 @@ Emitted when the state of a pose tracked by this tracker changes. ---- +.. _class_XRPositionalTracker_signal_pose_lost_tracking: + +.. rst-class:: classref-signal + +**pose_lost_tracking** **(** :ref:`XRPose` pose **)** + +Emitted when a pose tracked by this tracker stops getting updated tracking data. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRPositionalTracker_signal_profile_changed: .. rst-class:: classref-signal diff --git a/classes/index.rst b/classes/index.rst index d832e4c9963..55cf6ffd233 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -116,6 +116,7 @@ Nodes class_gpuparticlescollisionsdf3d class_gpuparticlescollisionsphere3d class_graphedit + class_graphelement class_graphnode class_gridcontainer class_gridmap