From 342d2ff3a629249dbe2af7c9b94c6724042ef53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 11 Oct 2019 08:45:15 +0200 Subject: [PATCH] Sync classref with current source --- classes/class_astar.rst | 106 ++++---- classes/class_astar2d.rst | 98 ++++---- classes/class_camera2d.rst | 14 +- classes/class_camerafeed.rst | 10 +- classes/class_clippedcamera.rst | 41 +++- classes/class_colorpicker.rst | 48 ++-- classes/class_configfile.rst | 6 + classes/class_crypto.rst | 42 +++- classes/class_cryptokey.rst | 13 +- classes/class_editorspatialgizmo.rst | 4 +- classes/class_environment.rst | 8 +- classes/class_font.rst | 4 +- classes/class_gdnativelibrary.rst | 36 ++- classes/class_gridcontainer.rst | 4 +- classes/class_hashingcontext.rst | 43 +++- classes/class_input.rst | 2 + classes/class_mainloop.rst | 34 +-- classes/class_meshlibrary.rst | 16 +- classes/class_mutex.rst | 5 + classes/class_os.rst | 10 +- classes/class_popupmenu.rst | 228 ++++++++++-------- classes/class_projectsettings.rst | 84 ++++--- classes/class_reflectionprobe.rst | 13 +- classes/class_rigidbody.rst | 8 + classes/class_rigidbody2d.rst | 4 + classes/class_scenetreetimer.rst | 6 +- classes/class_scriptcreatedialog.rst | 6 +- classes/class_semaphore.rst | 5 + classes/class_skeleton.rst | 14 ++ classes/class_skeleton2d.rst | 4 +- classes/class_staticbody.rst | 4 + classes/class_staticbody2d.rst | 4 + classes/class_streampeer.rst | 12 + classes/class_streampeerssl.rst | 4 +- classes/class_string.rst | 30 ++- classes/class_surfacetool.rst | 2 + classes/class_textureprogress.rst | 2 +- classes/class_thread.rst | 5 + classes/class_treeitem.rst | 24 ++ classes/class_videoplayer.rst | 2 + classes/class_visualscriptcomposearray.rst | 25 ++ classes/class_visualscriptlists.rst | 83 +++++++ classes/class_visualscriptnode.rst | 2 +- classes/class_visualshader.rst | 6 - classes/class_visualshadernode.rst | 10 +- .../class_visualshadernodecubemapuniform.rst | 9 +- .../class_visualshadernodescalarswitch.rst | 7 + classes/class_visualshadernodeswitch.rst | 2 +- .../class_visualshadernodetextureuniform.rst | 2 +- classes/class_websocketclient.rst | 50 +++- classes/class_websocketserver.rst | 50 ++++ classes/class_x509certificate.rst | 13 +- 52 files changed, 905 insertions(+), 359 deletions(-) create mode 100644 classes/class_visualscriptcomposearray.rst create mode 100644 classes/class_visualscriptlists.rst diff --git a/classes/class_astar.rst b/classes/class_astar.rst index df7d2506b..6f80ed7c8 100644 --- a/classes/class_astar.rst +++ b/classes/class_astar.rst @@ -21,57 +21,57 @@ AStar class representation that uses 3d-vectors as edges. Methods ------- -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_points` **(** **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` id **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | -+-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** virtual | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_points` **(** **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` id **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | ++-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -147,9 +147,9 @@ Returns the next available point ID with no point associated to it. .. _class_AStar_method_get_closest_point: -- :ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position **)** const +- :ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** const -Returns the ID of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. +Returns the ID of the closest point to ``to_position``, optionally taking disabled points into account. Returns -1 if there are no points in the points pool. .. _class_AStar_method_get_closest_position_in_segment: diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 5828a1550..b40f377bb 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -21,53 +21,53 @@ AStar class representation that uses 2d-vectors as edges. Methods ------- -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector2` to_position **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector2` to_position **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_point_count` **(** **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`PoolVector2Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` id **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Array` | :ref:`get_points` **(** **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_point` **(** :ref:`int` id **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector2` position **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | -+-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_available_point_id` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector2` to_position **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_capacity` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolIntArray` | :ref:`get_point_connections` **(** :ref:`int` id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_point_count` **(** **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`PoolVector2Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Array` | :ref:`get_points` **(** **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** const | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_point` **(** :ref:`int` id **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector2` position **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | ++-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- @@ -129,9 +129,9 @@ Returns the next available point ID with no point associated to it. .. _class_AStar2D_method_get_closest_point: -- :ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position **)** const +- :ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** const -Returns the ID of the closest point to ``to_position``. Returns -1 if there are no points in the points pool. +Returns the ID of the closest point to ``to_position``, optionally taking disabled points into account. Returns -1 if there are no points in the points pool. .. _class_AStar2D_method_get_closest_position_in_segment: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index e72ad3274..14acbe973 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -123,9 +123,9 @@ enum **AnchorMode**: enum **Camera2DProcessMode**: -- **CAMERA2D_PROCESS_PHYSICS** = **0** +- **CAMERA2D_PROCESS_PHYSICS** = **0** --- The camera updates with the ``_physics_process`` callback. -- **CAMERA2D_PROCESS_IDLE** = **1** +- **CAMERA2D_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. Description ----------- @@ -429,6 +429,8 @@ The vertical offset of the camera, relative to the drag margins. | *Getter* | get_process_mode() | +-----------+-------------------------+ +The camera's process callback. See :ref:`Camera2DProcessMode`. + .. _class_Camera2D_property_rotating: - :ref:`bool` **rotating** @@ -522,10 +524,14 @@ Returns the location of the ``Camera2D``'s screen-center, relative to the origin - :ref:`float` **get_drag_margin** **(** :ref:`Margin` margin **)** const +Returns the specified margin. See also :ref:`drag_margin_bottom`, :ref:`drag_margin_top`, :ref:`drag_margin_left`, and :ref:`drag_margin_right`. + .. _class_Camera2D_method_get_limit: - :ref:`int` **get_limit** **(** :ref:`Margin` margin **)** const +Returns the specified camera limit. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. + .. _class_Camera2D_method_make_current: - void **make_current** **(** **)** @@ -544,7 +550,11 @@ This has no effect if smoothing is disabled. - void **set_drag_margin** **(** :ref:`Margin` margin, :ref:`float` drag_margin **)** +Sets the specified margin. See also :ref:`drag_margin_bottom`, :ref:`drag_margin_top`, :ref:`drag_margin_left`, and :ref:`drag_margin_right`. + .. _class_Camera2D_method_set_limit: - void **set_limit** **(** :ref:`Margin` margin, :ref:`int` limit **)** +Sets the specified camera limit. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. + diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 7bdae1e32..bd04a970d 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -99,6 +99,8 @@ Property Descriptions | *Getter* | is_active() | +-----------+-------------------+ +If ``true``, the feed is active. + .. _class_CameraFeed_property_feed_transform: - :ref:`Transform2D` **feed_transform** @@ -111,6 +113,8 @@ Property Descriptions | *Getter* | get_transform() | +-----------+----------------------------------+ +The transform applied to the camera's image. + Method Descriptions ------------------- @@ -118,17 +122,17 @@ Method Descriptions - :ref:`int` **get_id** **(** **)** const -Gets the unique ID for this feed. +Returns the unique ID for this feed. .. _class_CameraFeed_method_get_name: - :ref:`String` **get_name** **(** **)** const -Gets the camera's name. +Returns the camera's name. .. _class_CameraFeed_method_get_position: - :ref:`FeedPosition` **get_position** **(** **)** const -Position of camera on the device. +Returns the position of camera on the device. diff --git a/classes/class_clippedcamera.rst b/classes/class_clippedcamera.rst index 690c180ad..7867f7f9a 100644 --- a/classes/class_clippedcamera.rst +++ b/classes/class_clippedcamera.rst @@ -16,7 +16,7 @@ ClippedCamera Brief Description ----------------- - +A :ref:`Camera` that includes collision. Properties ---------- @@ -65,9 +65,14 @@ Enumerations enum **ProcessMode**: -- **CLIP_PROCESS_PHYSICS** = **0** +- **CLIP_PROCESS_PHYSICS** = **0** --- The camera updates with the ``_physics_process`` callback. -- **CLIP_PROCESS_IDLE** = **1** +- **CLIP_PROCESS_IDLE** = **1** --- The camera updates with the ``_process`` callback. + +Description +----------- + +This node extends :ref:`Camera` to add collisions with :ref:`Area` and/or :ref:`PhysicsBody` nodes. The camera cannot move through colliding objects. Property Descriptions --------------------- @@ -84,6 +89,8 @@ Property Descriptions | *Getter* | is_clip_to_areas_enabled() | +-----------+----------------------------+ +If ``true``, the camera stops on contact with :ref:`Area`\ s. + .. _class_ClippedCamera_property_clip_to_bodies: - :ref:`bool` **clip_to_bodies** @@ -96,6 +103,8 @@ Property Descriptions | *Getter* | is_clip_to_bodies_enabled() | +-----------+-----------------------------+ +If ``true``, the camera stops on contact with :ref:`PhysicsBody`\ s. + .. _class_ClippedCamera_property_collision_mask: - :ref:`int` **collision_mask** @@ -108,6 +117,8 @@ Property Descriptions | *Getter* | get_collision_mask() | +-----------+---------------------------+ +The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. + .. _class_ClippedCamera_property_margin: - :ref:`float` **margin** @@ -120,6 +131,8 @@ Property Descriptions | *Getter* | get_margin() | +-----------+-------------------+ +The camera's collision margin. The camera can't get closer than this distance to a colliding object. + .. _class_ClippedCamera_property_process_mode: - :ref:`ProcessMode` **process_mode** @@ -132,6 +145,8 @@ Property Descriptions | *Getter* | get_process_mode() | +-----------+-------------------------+ +The camera's process callback. See :ref:`ProcessMode`. + Method Descriptions ------------------- @@ -139,31 +154,51 @@ Method Descriptions - void **add_exception** **(** :ref:`Object` node **)** +Adds a collision exception so the camera does not collide with the specified node. + .. _class_ClippedCamera_method_add_exception_rid: - void **add_exception_rid** **(** :ref:`RID` rid **)** +Adds a collision exception so the camera does not collide with the specified :ref:`RID`. + .. _class_ClippedCamera_method_clear_exceptions: - void **clear_exceptions** **(** **)** +Removes all collision exceptions. + .. _class_ClippedCamera_method_get_clip_offset: - :ref:`float` **get_clip_offset** **(** **)** const +Returns the distance the camera has been offset due to a collision. + .. _class_ClippedCamera_method_get_collision_mask_bit: - :ref:`bool` **get_collision_mask_bit** **(** :ref:`int` bit **)** const +Returns ``true`` if the specified bit index is on. + +**Note:** Bit indices range from 0-19. + .. _class_ClippedCamera_method_remove_exception: - void **remove_exception** **(** :ref:`Object` node **)** +Removes a collision exception with the specified node. + .. _class_ClippedCamera_method_remove_exception_rid: - void **remove_exception_rid** **(** :ref:`RID` rid **)** +Removes a collision exception with the specified :ref:`RID`. + .. _class_ClippedCamera_method_set_collision_mask_bit: - void **set_collision_mask_bit** **(** :ref:`int` bit, :ref:`bool` value **)** +Sets the specified bit index to the ``value``. + +**Note:** Bit indices range from 0-19. + diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 5de2d5b63..a4e378392 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -51,27 +51,29 @@ Methods Theme Properties ---------------- -+-------------------------------+---------------+-----+ -| :ref:`Texture` | add_preset | | -+-------------------------------+---------------+-----+ -| :ref:`Texture` | color_hue | | -+-------------------------------+---------------+-----+ -| :ref:`Texture` | color_sample | | -+-------------------------------+---------------+-----+ -| :ref:`int` | h_width | 30 | -+-------------------------------+---------------+-----+ -| :ref:`int` | label_width | 10 | -+-------------------------------+---------------+-----+ -| :ref:`int` | margin | 4 | -+-------------------------------+---------------+-----+ -| :ref:`Texture` | preset_bg | | -+-------------------------------+---------------+-----+ -| :ref:`Texture` | screen_picker | | -+-------------------------------+---------------+-----+ -| :ref:`int` | sv_height | 256 | -+-------------------------------+---------------+-----+ -| :ref:`int` | sv_width | 256 | -+-------------------------------+---------------+-----+ ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | add_preset | | ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | color_hue | | ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | color_sample | | ++-------------------------------+----------------------+-----+ +| :ref:`int` | h_width | 30 | ++-------------------------------+----------------------+-----+ +| :ref:`int` | label_width | 10 | ++-------------------------------+----------------------+-----+ +| :ref:`int` | margin | 4 | ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | overbright_indicator | | ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | preset_bg | | ++-------------------------------+----------------------+-----+ +| :ref:`Texture` | screen_picker | | ++-------------------------------+----------------------+-----+ +| :ref:`int` | sv_height | 256 | ++-------------------------------+----------------------+-----+ +| :ref:`int` | sv_width | 256 | ++-------------------------------+----------------------+-----+ Signals ------- @@ -172,6 +174,8 @@ If ``true``, allows editing the color with Hue/Saturation/Value sliders. | *Getter* | are_presets_enabled() | +-----------+----------------------------+ +If ``true``, the "add preset" button is enabled. + .. _class_ColorPicker_property_presets_visible: - :ref:`bool` **presets_visible** @@ -184,6 +188,8 @@ If ``true``, allows editing the color with Hue/Saturation/Value sliders. | *Getter* | are_presets_visible() | +-----------+----------------------------+ +If ``true``, saved color presets are visible. + .. _class_ColorPicker_property_raw_mode: - :ref:`bool` **raw_mode** diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index fc4b4bcb4..19c8c72ef 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -24,6 +24,8 @@ Methods +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`erase_section` **(** :ref:`String` section **)** | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`erase_section_key` **(** :ref:`String` section, :ref:`String` key **)** | ++-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`get_section_keys` **(** :ref:`String` section **)** const | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`get_sections` **(** **)** const | @@ -89,6 +91,10 @@ Method Descriptions Deletes the specified section along with all the key-value pairs inside. +.. _class_ConfigFile_method_erase_section_key: + +- void **erase_section_key** **(** :ref:`String` section, :ref:`String` key **)** + .. _class_ConfigFile_method_get_section_keys: - :ref:`PoolStringArray` **get_section_keys** **(** :ref:`String` section **)** const diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index 48d20b1a2..e72e7005b 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -16,7 +16,7 @@ Crypto Brief Description ----------------- - +Access to advanced cryptographic functionalities. Methods ------- @@ -29,6 +29,30 @@ Methods | :ref:`X509Certificate` | :ref:`generate_self_signed_certificate` **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +Description +----------- + +The Crypto class allows you to access some more advanced cryptographic functionalities in Godot. + +For now, this includes generating cryptographically secure random bytes, and RSA keys and self-signed X509 certificates generation. More functionalities are planned for future releases. + +:: + + extends Node + + var crypto = Crypto.new() + var key = CryptoKey.new() + var cert = X509Certificate.new() + + func _ready(): + # Generate new RSA key. + key = crypto.generate_rsa(4096) + # Generate new self-signed certificate with the given key. + cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") + # Save key and certificate in the user folder. + key.save("user://generated.key") + cert.save("user://generated.crt") + Method Descriptions ------------------- @@ -36,11 +60,27 @@ Method Descriptions - :ref:`PoolByteArray` **generate_random_bytes** **(** :ref:`int` size **)** +Generates a :ref:`PoolByteArray` of cryptographically secure random bytes with given ``size``. + .. _class_Crypto_method_generate_rsa: - :ref:`CryptoKey` **generate_rsa** **(** :ref:`int` size **)** +Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerSSL.accept_stream`. + .. _class_Crypto_method_generate_self_signed_certificate: - :ref:`X509Certificate` **generate_self_signed_certificate** **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** +Generates a self-signed :ref:`X509Certificate` from the given :ref:`CryptoKey` and ``issuer_name``. The certificate validity will be defined by ``not_before`` and ``not_after`` (first valid date and last valid date). The ``issuer_name`` must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). + +A small example to generate an RSA key and a X509 self-signed certificate. + +:: + + var crypto = Crypto.new() + # Generate 4096 bits RSA key. + var key = crypto.generate_rsa(4096) + # Generate self-signed certificate using the given key. + var cert = crypto.generate_self_signed_certificate(key, "CN=example.com,O=A Game Company,C=IT") + diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index dd8e4e66b..4297cba2a 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -16,7 +16,7 @@ CryptoKey Brief Description ----------------- - +A cryptographic key (RSA). Methods ------- @@ -27,6 +27,13 @@ Methods | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | +---------------------------------------+---------------------------------------------------------------------------------------+ +Description +----------- + +The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other :ref:`Resource`. + +They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerSSL.accept_stream` along with the appropriate certificate. + Method Descriptions ------------------- @@ -34,7 +41,11 @@ Method Descriptions - :ref:`Error` **load** **(** :ref:`String` path **)** +Loads a key from ``path`` ("\*.key" file). + .. _class_CryptoKey_method_save: - :ref:`Error` **save** **(** :ref:`String` path **)** +Saves a key to the given ``path`` (should be a "\*.key" file). + diff --git a/classes/class_editorspatialgizmo.rst b/classes/class_editorspatialgizmo.rst index bbb9cc3d6..ae4a1a4dd 100644 --- a/classes/class_editorspatialgizmo.rst +++ b/classes/class_editorspatialgizmo.rst @@ -30,7 +30,7 @@ Methods +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_lines` **(** :ref:`PoolVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false **)** | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_mesh` **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton, :ref:`Material` material=null **)** | +| void | :ref:`add_mesh` **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton=null, :ref:`Material` material=null **)** | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_unscaled_billboard` **(** :ref:`Material` material, :ref:`float` default_scale=1 **)** | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -91,7 +91,7 @@ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines .. _class_EditorSpatialGizmo_method_add_mesh: -- void **add_mesh** **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton, :ref:`Material` material=null **)** +- void **add_mesh** **(** :ref:`ArrayMesh` mesh, :ref:`bool` billboard=false, :ref:`SkinReference` skeleton=null, :ref:`Material` material=null **)** .. _class_EditorSpatialGizmo_method_add_unscaled_billboard: diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 9e1259ec2..6701d031f 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -1020,6 +1020,8 @@ Enables fog's light transmission. If enabled, lets reflections light to be trans | *Getter* | is_glow_bicubic_upscale_enabled() | +-----------+-----------------------------------+ +Smooths out blockiness created by sampling higher levels. + .. _class_Environment_property_glow_blend_mode: - :ref:`GlowBlendMode` **glow_blend_mode** @@ -1100,7 +1102,7 @@ Bleed scale of the HDR glow. | *Getter* | get_glow_hdr_bleed_threshold() | +-----------+-------------------------------------+ -Bleed threshold of the HDR glow. +Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. .. _class_Environment_property_glow_intensity: @@ -1114,7 +1116,7 @@ Bleed threshold of the HDR glow. | *Getter* | get_glow_intensity() | +-----------+---------------------------+ -Glow intensity. +Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. .. _class_Environment_property_glow_levels/1: @@ -1226,7 +1228,7 @@ Seventh level of glow (most global). | *Getter* | get_glow_strength() | +-----------+--------------------------+ -Glow strength. +Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. .. _class_Environment_property_ss_reflections_depth_tolerance: diff --git a/classes/class_font.rst b/classes/class_font.rst index a893025b2..0bf3b59a7 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -36,7 +36,7 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` string **)** const | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Vector2` | :ref:`get_wordwrap_string_size` **(** :ref:`String` string, :ref:`float` p_width **)** const | +| :ref:`Vector2` | :ref:`get_wordwrap_string_size` **(** :ref:`String` string, :ref:`float` width **)** const | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_outline` **(** **)** const | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -91,7 +91,7 @@ Returns the size of a string, taking kerning and advance into account. .. _class_Font_method_get_wordwrap_string_size: -- :ref:`Vector2` **get_wordwrap_string_size** **(** :ref:`String` string, :ref:`float` p_width **)** const +- :ref:`Vector2` **get_wordwrap_string_size** **(** :ref:`String` string, :ref:`float` width **)** const .. _class_Font_method_has_outline: diff --git a/classes/class_gdnativelibrary.rst b/classes/class_gdnativelibrary.rst index 1ef1e3aab..4e0d5a4a8 100644 --- a/classes/class_gdnativelibrary.rst +++ b/classes/class_gdnativelibrary.rst @@ -16,7 +16,7 @@ GDNativeLibrary Brief Description ----------------- - +An external library containing functions or script classes to use in Godot. Properties ---------- @@ -42,6 +42,18 @@ Methods | :ref:`String` | :ref:`get_current_library_path` **(** **)** const | +-----------------------------------------------+----------------------------------------------------------------------------------------------------------+ +Description +----------- + +A GDNative library can implement :ref:`NativeScript`\ s, global functions to call with the :ref:`GDNative` class, or low-level engine extensions through interfaces such as :ref:`ARVRInterfaceGDNative`. The library must be compiled for each platform and architecture that the project will run on. + +Tutorials +--------- + +- :doc:`../tutorials/plugins/gdnative/gdnative-c-example` + +- :doc:`../tutorials/plugins/gdnative/gdnative-cpp-example` + Property Descriptions --------------------- @@ -55,6 +67,8 @@ Property Descriptions | *Getter* | get_config_file() | +----------+------------------------+ +This resource in INI-style :ref:`ConfigFile` format, as in ``.gdnlib`` files. + .. _class_GDNativeLibrary_property_load_once: - :ref:`bool` **load_once** @@ -67,6 +81,10 @@ Property Descriptions | *Getter* | should_load_once() | +-----------+----------------------+ +If ``true``, Godot loads only one copy of the library and each script that references the library will share static data like static or global variables. + +If ``false``, Godot loads a separate copy of the library into memory for each script that references it. + .. _class_GDNativeLibrary_property_reloadable: - :ref:`bool` **reloadable** @@ -79,6 +97,10 @@ Property Descriptions | *Getter* | is_reloadable() | +-----------+-----------------------+ +If ``true``, the editor will temporarily unload the library whenever the user switches away from the editor window, allowing the user to recompile the library without restarting Godot. + +**Note:** If the library defines tool scripts that run inside the editor, ``reloadable`` must be ``false``. Otherwise, the editor will attempt to unload the tool scripts while they're in use and crash. + .. _class_GDNativeLibrary_property_singleton: - :ref:`bool` **singleton** @@ -91,6 +113,10 @@ Property Descriptions | *Getter* | is_singleton() | +-----------+----------------------+ +If ``true``, Godot loads the library at startup rather than the first time a script uses the library, calling ``{prefix}gdnative_singleton`` after initializing the library (where ``{prefix}`` is the value of :ref:`symbol_prefix`). The library remains loaded as long as Godot is running. + +**Note:** A singleton library cannot be :ref:`reloadable`. + .. _class_GDNativeLibrary_property_symbol_prefix: - :ref:`String` **symbol_prefix** @@ -103,6 +129,10 @@ Property Descriptions | *Getter* | get_symbol_prefix() | +-----------+--------------------------+ +The prefix this library's entry point functions begin with. For example, a GDNativeLibrary would declare its ``gdnative_init`` function as ``godot_gdnative_init`` by default. + +On platforms that require statically linking libraries (currently only iOS), each library must have a different ``symbol_prefix``. + Method Descriptions ------------------- @@ -110,7 +140,11 @@ Method Descriptions - :ref:`PoolStringArray` **get_current_dependencies** **(** **)** const +Returns paths to all dependency libraries for the current platform and architecture. + .. _class_GDNativeLibrary_method_get_current_library_path: - :ref:`String` **get_current_library_path** **(** **)** const +Returns the path to the dynamic library file for the current platform and architecture. + diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index e6cd486e0..7dedf924c 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -39,7 +39,9 @@ Theme Properties Description ----------- -Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. +Grid container will arrange its children in a grid like structure, the grid columns are specified using the :ref:`columns` property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. + +Notice that grid layout will preserve the columns and rows for every size of the container, and that empty columns will be expanded automatically. Property Descriptions --------------------- diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index ae11c6df3..c38efcc3b 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -16,7 +16,7 @@ HashingContext Brief Description ----------------- - +Context to compute cryptographic hashes over multiple iterations. Methods ------- @@ -42,11 +42,40 @@ Enumerations enum **HashType**: -- **HASH_MD5** = **0** +- **HASH_MD5** = **0** --- Hashing algorithm: MD5. -- **HASH_SHA1** = **1** +- **HASH_SHA1** = **1** --- Hashing algorithm: SHA-1. -- **HASH_SHA256** = **2** +- **HASH_SHA256** = **2** --- Hashing algorithm: SHA-256. + +Description +----------- + +The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. This is useful for example when computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). + +The :ref:`HashType` enum shows the supported hashing algorithms. + +:: + + const CHUNK_SIZE = 1024 + + func hash_file(path): + var ctx = HashingContext.new() + var file = File.new() + # Start a SHA-256 context. + ctx.start(HashingContext.HASH_SHA256) + # Check that file exists. + if not file.file_exists(path): + return + # Open the file to hash. + file.open(path, File.READ) + # Update the context after reading each chunk. + while not file.eof_reached(): + ctx.update(file.get_buffer(CHUNK_SIZE)) + # Get the computed hash. + var res = ctx.finish() + # Print the result as hex string and array. + printt(res.hex_encode(), Array(res)) Method Descriptions ------------------- @@ -55,11 +84,17 @@ Method Descriptions - :ref:`PoolByteArray` **finish** **(** **)** +Closes the current context, and return the computed hash. + .. _class_HashingContext_method_start: - :ref:`Error` **start** **(** :ref:`HashType` type **)** +Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256` to start computation of a SHA-256). + .. _class_HashingContext_method_update: - :ref:`Error` **update** **(** :ref:`PoolByteArray` chunk **)** +Updates the computation with the given ``chunk`` of data. + diff --git a/classes/class_input.rst b/classes/class_input.rst index 625086250..6897b1980 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -268,6 +268,8 @@ Returns an :ref:`Array` containing the device IDs of all currently - :ref:`CursorShape` **get_current_cursor_shape** **(** **)** const +Returns the currently assigned cursor shape (see :ref:`CursorShape`). + .. _class_Input_method_get_gravity: - :ref:`Vector3` **get_gravity** **(** **)** const diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index 95bf4487b..0c5dc3d3b 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -156,29 +156,29 @@ Here is an example script implementing a simple ``MainLoop``: var quit = false func _initialize(): - print("Initialized:") - print(" Starting time: %s" % str(time_elapsed)) + print("Initialized:") + print(" Starting time: %s" % str(time_elapsed)) func _idle(delta): - time_elapsed += delta - # Return true to end the main loop - return quit + time_elapsed += delta + # Return true to end the main loop. + return quit func _input_event(event): - # Record keys - if event is InputEventKey and event.pressed and !event.echo: - keys_typed.append(OS.get_scancode_string(event.scancode)) - # Quit on Escape press - if event.scancode == KEY_ESCAPE: - quit = true - # Quit on any mouse click - if event is InputEventMouseButton: - quit = true + # Record keys. + if event is InputEventKey and event.pressed and !event.echo: + keys_typed.append(OS.get_scancode_string(event.scancode)) + # Quit on Escape press. + if event.scancode == KEY_ESCAPE: + quit = true + # Quit on any mouse click. + if event is InputEventMouseButton: + quit = true func _finalize(): - print("Finalized:") - print(" End time: %s" % str(time_elapsed)) - print(" Keys typed: %s" % var2str(keys_typed)) + print("Finalized:") + print(" End time: %s" % str(time_elapsed)) + print(" Keys typed: %s" % var2str(keys_typed)) Method Descriptions ------------------- diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index 23b892e4a..d28a6caf1 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -62,7 +62,7 @@ Methods Description ----------- -Library of meshes. Contains a list of :ref:`Mesh` resources, each with name and ID. This resource is used in :ref:`GridMap`. +A library of meshes. Contains a list of :ref:`Mesh` resources, each with a name and ID. This resource is used in :ref:`GridMap`. Method Descriptions ------------------- @@ -71,13 +71,13 @@ Method Descriptions - void **clear** **(** **)** -Clear the library. +Clears the library. .. _class_MeshLibrary_method_create_item: - void **create_item** **(** :ref:`int` id **)** -Create a new item in the library, supplied an id. +Create a new item in the library, supplied as an ID. .. _class_MeshLibrary_method_find_item_by_name: @@ -113,6 +113,10 @@ Returns the name of the item. - :ref:`Texture` **get_item_preview** **(** :ref:`int` id **)** const +Returns a generated item preview (a 3D rendering in isometric perspective). + +**Note:** Since item previews are only generated in an editor context, this function will return an empty :ref:`Texture` in a running project. + .. _class_MeshLibrary_method_get_item_shapes: - :ref:`Array` **get_item_shapes** **(** :ref:`int` id **)** const @@ -121,7 +125,7 @@ Returns the name of the item. - :ref:`int` **get_last_unused_item_id** **(** **)** const -Gets an unused id for a new item. +Gets an unused ID for a new item. .. _class_MeshLibrary_method_remove_item: @@ -133,13 +137,13 @@ Removes the item. - void **set_item_mesh** **(** :ref:`int` id, :ref:`Mesh` mesh **)** -Sets the mesh of the item. +Sets the item's mesh. .. _class_MeshLibrary_method_set_item_name: - void **set_item_name** **(** :ref:`int` id, :ref:`String` name **)** -Sets the name of the item. +Sets the item's name. .. _class_MeshLibrary_method_set_item_navmesh: diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 8b4af983b..c57171cce 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -34,6 +34,11 @@ Description A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. +Tutorials +--------- + +- :doc:`../tutorials/threads/using_multiple_threads` + Method Descriptions ------------------- diff --git a/classes/class_os.rst b/classes/class_os.rst index 7a6beee43..782806d0b 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -772,14 +772,14 @@ If ``blocking`` is ``true``, the Godot thread will pause its execution while wai If ``blocking`` is ``false``, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so ``output`` will be empty. -The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). If the process forking (non-blocking) or opening (blocking) fails, the method will return ``-1``. +The return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill`). If the process forking (non-blocking) or opening (blocking) fails, the method will return ``-1`` or another exit code. Example of blocking mode and retrieving the shell output: :: var output = [] - OS.execute("ls", ["-l", "/tmp"], true, output) + var exit_code = OS.execute("ls", ["-l", "/tmp"], true, output) Example of non-blocking mode, running another instance of the project and storing its process ID: @@ -959,7 +959,7 @@ Returns the number of displays attached to the host machine. - :ref:`int` **get_screen_dpi** **(** :ref:`int` screen=-1 **)** const -Returns the dots per inch density of the specified screen. +Returns the dots per inch density of the specified screen. If ``screen`` is ``-1`` (the default value), the current screen will be used. On Android devices, the actual screen densities are grouped into six generalized densities: @@ -976,13 +976,13 @@ On Android devices, the actual screen densities are grouped into six generalized - :ref:`Vector2` **get_screen_position** **(** :ref:`int` screen=-1 **)** const -Returns the position of the specified screen by index. If no screen index is provided, the current screen will be used. +Returns the position of the specified screen by index. If ``screen`` is ``-1`` (the default value), the current screen will be used. .. _class_OS_method_get_screen_size: - :ref:`Vector2` **get_screen_size** **(** :ref:`int` screen=-1 **)** const -Returns the dimensions in pixels of the specified screen. +Returns the dimensions in pixels of the specified screen. If ``screen`` is ``-1`` (the default value), the current screen will be used. .. _class_OS_method_get_splash_tick_msec: diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index bc0fab372..0aac2611a 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -38,105 +38,111 @@ Properties Methods ------- -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_check_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_check_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_check_shortcut` **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_icon_shortcut` **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_radio_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_radio_check_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_separator` **(** :ref:`String` label="" **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_accelerator` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_count` **(** **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_id` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`ShortCut` | :ref:`get_item_shortcut` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_hide_on_window_lose_focus` **(** **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_radio_checkable` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`is_item_shortcut_disabled` **(** :ref:`int` idx **)** const | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`remove_item` **(** :ref:`int` idx **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_hide_on_window_lose_focus` **(** :ref:`bool` enable **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_accelerator` **(** :ref:`int` idx, :ref:`int` accel **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_radio_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_as_separator` **(** :ref:`int` idx, :ref:`bool` enable **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_checked` **(** :ref:`int` idx, :ref:`bool` checked **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_id` **(** :ref:`int` idx, :ref:`int` id **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_multistate` **(** :ref:`int` idx, :ref:`int` state **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shortcut` **(** :ref:`int` idx, :ref:`ShortCut` shortcut, :ref:`bool` global=false **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_shortcut_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_submenu` **(** :ref:`int` idx, :ref:`String` submenu **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`toggle_item_checked` **(** :ref:`int` idx **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`toggle_item_multistate` **(** :ref:`int` idx **)** | -+---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_check_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_check_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_check_shortcut` **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_radio_check_item` **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_radio_check_shortcut` **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_icon_shortcut` **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_multistate_item` **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_radio_check_item` **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_radio_check_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_separator` **(** :ref:`String` label="" **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_shortcut` **(** :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_accelerator` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_count` **(** **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Texture` | :ref:`get_item_icon` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_id` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_item_index` **(** :ref:`int` id **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_item_metadata` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`ShortCut` | :ref:`get_item_shortcut` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_submenu` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_item_tooltip` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_hide_on_window_lose_focus` **(** **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checkable` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_checked` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_disabled` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_radio_checkable` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_separator` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`is_item_shortcut_disabled` **(** :ref:`int` idx **)** const | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_item` **(** :ref:`int` idx **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_hide_on_window_lose_focus` **(** :ref:`bool` enable **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_accelerator` **(** :ref:`int` idx, :ref:`int` accel **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_radio_checkable` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_as_separator` **(** :ref:`int` idx, :ref:`bool` enable **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_checked` **(** :ref:`int` idx, :ref:`bool` checked **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_icon` **(** :ref:`int` idx, :ref:`Texture` icon **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_id` **(** :ref:`int` idx, :ref:`int` id **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_metadata` **(** :ref:`int` idx, :ref:`Variant` metadata **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_multistate` **(** :ref:`int` idx, :ref:`int` state **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shortcut` **(** :ref:`int` idx, :ref:`ShortCut` shortcut, :ref:`bool` global=false **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_shortcut_disabled` **(** :ref:`int` idx, :ref:`bool` disabled **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_submenu` **(** :ref:`int` idx, :ref:`String` submenu **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_text` **(** :ref:`int` idx, :ref:`String` text **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_item_tooltip` **(** :ref:`int` idx, :ref:`String` tooltip **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`toggle_item_checked` **(** :ref:`int` idx **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`toggle_item_multistate` **(** :ref:`int` idx **)** | ++---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- @@ -329,6 +335,18 @@ Adds a new item with text ``label`` and icon ``texture``. An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. +.. _class_PopupMenu_method_add_icon_radio_check_item: + +- void **add_icon_radio_check_item** **(** :ref:`Texture` texture, :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Same as :ref:`add_icon_check_item`, but uses a radio check button. + +.. _class_PopupMenu_method_add_icon_radio_check_shortcut: + +- void **add_icon_radio_check_shortcut** **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** + +Same as :ref:`add_icon_check_shortcut`, but uses a radio check button. + .. _class_PopupMenu_method_add_icon_shortcut: - void **add_icon_shortcut** **(** :ref:`Texture` texture, :ref:`ShortCut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false **)** @@ -345,11 +363,21 @@ Adds a new item with text ``label``. An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. +.. _class_PopupMenu_method_add_multistate_item: + +- void **add_multistate_item** **(** :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state=0, :ref:`int` id=-1, :ref:`int` accel=0 **)** + +Adds a new multistate item with text ``label``. + +Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``. + +An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. + .. _class_PopupMenu_method_add_radio_check_item: - void **add_radio_check_item** **(** :ref:`String` label, :ref:`int` id=-1, :ref:`int` accel=0 **)** -Adds a new radio button with text ``label``. +Adds a new radio check button with text ``label``. An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided then the default ``0`` will be assigned to it. See :ref:`get_item_accelerator` for more info on accelerators. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 0db45b0fd..f7834e877 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -578,43 +578,45 @@ Properties Methods ------- -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_property_info` **(** :ref:`Dictionary` hint **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`clear` **(** :ref:`String` name **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** const | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save` **(** **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` position **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | -+---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_property_info` **(** :ref:`Dictionary` hint **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`clear` **(** :ref:`String` name **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_order` **(** :ref:`String` name **)** const | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`get_setting` **(** :ref:`String` name **)** const | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`globalize_path` **(** :ref:`String` path **)** const | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`has_setting` **(** :ref:`String` name **)** const | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`load_resource_pack` **(** :ref:`String` pack, :ref:`bool` replace_files=true **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`localize_path` **(** :ref:`String` path **)** const | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`property_can_revert` **(** :ref:`String` name **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`property_get_revert` **(** :ref:`String` name **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save` **(** **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`save_custom` **(** :ref:`String` file **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_initial_value` **(** :ref:`String` name, :ref:`Variant` value **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_order` **(** :ref:`String` name, :ref:`int` position **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_setting` **(** :ref:`String` name, :ref:`Variant` value **)** | ++---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- Contains global variables accessible from everywhere. Use :ref:`get_setting`, :ref:`set_setting` or :ref:`has_setting` to access them. Variables stored in ``project.godot`` are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. +When naming a Project Settings property, use the full path to the setting including the category. For example, ``"application/config/name"`` for the project name. Category and property names can be viewed in the Project Settings dialog. + Property Descriptions --------------------- @@ -1408,7 +1410,7 @@ Sets the window to full screen when it starts. | *Default* | 600 | +-----------+-----+ -Sets the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. +Sets the game's main viewport height. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. .. _class_ProjectSettings_property_display/window/size/resizable: @@ -1428,7 +1430,7 @@ Allows the window to be resizable by default. | *Default* | 0 | +-----------+---+ -If greater than zero, uses a different height for the window when running from the editor. The main use for this is to test with stretch modes. +If greater than zero, overrides the window height when running the game. Useful for testing stretch modes. .. _class_ProjectSettings_property_display/window/size/test_width: @@ -1438,7 +1440,7 @@ If greater than zero, uses a different height for the window when running from t | *Default* | 0 | +-----------+---+ -If greater than zero, uses a different width for the window when running from the editor. The main use for this is to test with stretch modes. +If greater than zero, overrides the window width when running the game. Useful for testing stretch modes. .. _class_ProjectSettings_property_display/window/size/width: @@ -1448,7 +1450,7 @@ If greater than zero, uses a different width for the window when running from th | *Default* | 1024 | +-----------+------+ -Sets the main window width. On desktop platforms, this is the default window size. Stretch mode settings use this also as a reference when enabled. +Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. .. _class_ProjectSettings_property_display/window/vsync/use_vsync: @@ -3168,6 +3170,14 @@ Returns the order of a configuration value (influences when saved to the config - :ref:`Variant` **get_setting** **(** :ref:`String` name **)** const +Returns the value of a setting. + +**Example:** + +:: + + print(ProjectSettings.get_setting("application/config/name")) + .. _class_ProjectSettings_method_globalize_path: - :ref:`String` **globalize_path** **(** :ref:`String` path **)** const @@ -3182,11 +3192,11 @@ Returns ``true`` if a configuration value is present. .. _class_ProjectSettings_method_load_resource_pack: -- :ref:`bool` **load_resource_pack** **(** :ref:`String` pack **)** +- :ref:`bool` **load_resource_pack** **(** :ref:`String` pack, :ref:`bool` replace_files=true **)** Loads the contents of the .pck or .zip file specified by ``pack`` into the resource filesystem (``res://``). Returns ``true`` on success. -**Note:** If a file from ``pack`` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from ``pack``. +**Note:** If a file from ``pack`` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from ``pack`` unless ``replace_files`` is set to ``false``. .. _class_ProjectSettings_method_localize_path: diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 558add817..dcef8b98a 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -16,7 +16,7 @@ ReflectionProbe Brief Description ----------------- - +Captures its surroundings to create reflections. Properties ---------- @@ -62,6 +62,11 @@ enum **UpdateMode**: - **UPDATE_ALWAYS** = **1** +Description +----------- + +Capture its surroundings as a dual parabolid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses. + Tutorials --------- @@ -82,6 +87,8 @@ Property Descriptions | *Getter* | is_box_projection_enabled() | +-----------+----------------------------------+ +If ``true``, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. + .. _class_ReflectionProbe_property_cull_mask: - :ref:`int` **cull_mask** @@ -106,6 +113,8 @@ Property Descriptions | *Getter* | are_shadows_enabled() | +-----------+---------------------------+ +If ``true``, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the :ref:`UPDATE_ALWAYS` :ref:`update_mode`. + .. _class_ReflectionProbe_property_extents: - :ref:`Vector3` **extents** @@ -130,6 +139,8 @@ Property Descriptions | *Getter* | get_intensity() | +-----------+----------------------+ +Defines the reflection intensity. + .. _class_ReflectionProbe_property_interior_ambient_color: - :ref:`Color` **interior_ambient_color** diff --git a/classes/class_rigidbody.rst b/classes/class_rigidbody.rst index 5165d28fe..eba6e9617 100644 --- a/classes/class_rigidbody.rst +++ b/classes/class_rigidbody.rst @@ -469,6 +469,10 @@ The body mode. See :ref:`Mode` for possible values. | *Getter* | get_physics_material_override() | +----------+--------------------------------------+ +The physics material override for the body. + +If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + .. _class_RigidBody_property_sleeping: - :ref:`bool` **sleeping** @@ -550,6 +554,8 @@ Applies a torque impulse which will be affected by the body mass and shape. This - :ref:`bool` **get_axis_lock** **(** :ref:`BodyAxis` axis **)** const +Returns ``true`` if the specified linear or rotational axis is locked. + .. _class_RigidBody_method_get_colliding_bodies: - :ref:`Array` **get_colliding_bodies** **(** **)** const @@ -562,6 +568,8 @@ Returns a list of the bodies colliding with this one. By default, number of max - void **set_axis_lock** **(** :ref:`BodyAxis` axis, :ref:`bool` lock **)** +Locks the specified linear or rotational axis. + .. _class_RigidBody_method_set_axis_velocity: - void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **)** diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index f86eb54c5..766023aab 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -424,6 +424,10 @@ The body's mode. See :ref:`Mode` for possible values. | *Getter* | get_physics_material_override() | +----------+--------------------------------------+ +The physics material override for the body. + +If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + .. _class_RigidBody2D_property_sleeping: - :ref:`bool` **sleeping** diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index 351626060..571c03d62 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -44,9 +44,9 @@ As opposed to :ref:`Timer`, it does not require the instantiation o :: func some_function(): - print("start") - yield(get_tree().create_timer(1.0), "timeout") - print("end") + print("Timer started.") + yield(get_tree().create_timer(1.0), "timeout") + print("Timer ended.") Property Descriptions --------------------- diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index 1170c1426..d39292750 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -24,11 +24,11 @@ Properties +-------------------------------+-------------------+-----------------------------+ | :ref:`bool` | dialog_hide_on_ok | **O:** false | +-------------------------------+-------------------+-----------------------------+ -| :ref:`float` | margin_bottom | **O:** 76.0 | +| :ref:`float` | margin_bottom | **O:** 232.0 | +-------------------------------+-------------------+-----------------------------+ -| :ref:`float` | margin_right | **O:** 200.0 | +| :ref:`float` | margin_right | **O:** 361.0 | +-------------------------------+-------------------+-----------------------------+ -| :ref:`Vector2` | rect_size | **O:** Vector2( 200, 76 ) | +| :ref:`Vector2` | rect_size | **O:** Vector2( 361, 232 ) | +-------------------------------+-------------------+-----------------------------+ | :ref:`String` | window_title | **O:** "Attach Node Script" | +-------------------------------+-------------------+-----------------------------+ diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index 2e9f73cfc..c994c0f8f 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -32,6 +32,11 @@ Description A synchronization semaphore which can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. +Tutorials +--------- + +- :doc:`../tutorials/threads/using_multiple_threads` + Method Descriptions ------------------- diff --git a/classes/class_skeleton.rst b/classes/class_skeleton.rst index e9eb2524c..d5be301c7 100644 --- a/classes/class_skeleton.rst +++ b/classes/class_skeleton.rst @@ -32,6 +32,8 @@ Methods +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bone_count` **(** **)** const | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_bone_custom_pose` **(** :ref:`int` bone_idx **)** const | ++-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_bone_global_pose` **(** :ref:`int` bone_idx **)** const | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_bone_name` **(** :ref:`int` bone_idx **)** const | @@ -58,6 +60,8 @@ Methods +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SkinReference` | :ref:`register_skin` **(** :ref:`Skin` skin **)** | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_bone_custom_pose` **(** :ref:`int` bone_idx, :ref:`Transform` custom_pose **)** | ++-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_disable_rest` **(** :ref:`int` bone_idx, :ref:`bool` disable **)** | +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bone_global_pose_override` **(** :ref:`int` bone_idx, :ref:`Transform` pose, :ref:`float` amount, :ref:`bool` persistent=false **)** | @@ -122,6 +126,12 @@ Returns the bone index that matches ``name`` as its name. Returns the amount of bones in the skeleton. +.. _class_Skeleton_method_get_bone_custom_pose: + +- :ref:`Transform` **get_bone_custom_pose** **(** :ref:`int` bone_idx **)** const + +Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose. + .. _class_Skeleton_method_get_bone_global_pose: - :ref:`Transform` **get_bone_global_pose** **(** :ref:`int` bone_idx **)** const @@ -188,6 +198,10 @@ Returns the rest transform for a bone ``bone_idx``. - :ref:`SkinReference` **register_skin** **(** :ref:`Skin` skin **)** +.. _class_Skeleton_method_set_bone_custom_pose: + +- void **set_bone_custom_pose** **(** :ref:`int` bone_idx, :ref:`Transform` custom_pose **)** + .. _class_Skeleton_method_set_bone_disable_rest: - void **set_bone_disable_rest** **(** :ref:`int` bone_idx, :ref:`bool` disable **)** diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 14ee32135..ae751bcac 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -16,7 +16,7 @@ Skeleton2D Brief Description ----------------- - +Skeleton for 2D characters and animated objects. Methods ------- @@ -52,6 +52,8 @@ Method Descriptions - :ref:`int` **get_bone_count** **(** **)** const +Returns the amount of bones in the skeleton. + .. _class_Skeleton2D_method_get_skeleton: - :ref:`RID` **get_skeleton** **(** **)** const diff --git a/classes/class_staticbody.rst b/classes/class_staticbody.rst index d0529aa0c..5ac974668 100644 --- a/classes/class_staticbody.rst +++ b/classes/class_staticbody.rst @@ -111,3 +111,7 @@ Deprecated, use :ref:`PhysicsMaterial.friction`: + +:: + + put_data("Hello world".to_ascii()) + .. _class_StreamPeer_method_put_u16: - void **put_u16** **(** :ref:`int` value **)** @@ -301,6 +307,12 @@ Puts an unsigned byte into the stream. Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. +Note: To put an UTF-8 string without prepending its size, you can use :ref:`put_data`: + +:: + + put_data("Hello world".to_utf8()) + .. _class_StreamPeer_method_put_var: - void **put_var** **(** :ref:`Variant` value, :ref:`bool` full_objects=false **)** diff --git a/classes/class_streampeerssl.rst b/classes/class_streampeerssl.rst index f8ae4c7cb..5e373ada3 100644 --- a/classes/class_streampeerssl.rst +++ b/classes/class_streampeerssl.rst @@ -70,7 +70,7 @@ enum **Status**: Description ----------- -SSL stream peer. This object can be used to connect to SSL servers. +SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. Tutorials --------- @@ -99,6 +99,8 @@ Method Descriptions - :ref:`Error` **accept_stream** **(** :ref:`StreamPeer` stream, :ref:`CryptoKey` private_key, :ref:`X509Certificate` certificate, :ref:`X509Certificate` chain=null **)** +Accepts a peer connection as a server using the given ``private_key`` and providing the given ``certificate`` to the client. You can pass the optional ``chain`` parameter to provide additional CA chain information along with the certificate. + .. _class_StreamPeerSSL_method_connect_to_stream: - :ref:`Error` **connect_to_stream** **(** :ref:`StreamPeer` stream, :ref:`bool` validate_certs=false, :ref:`String` for_hostname="", :ref:`X509Certificate` valid_certificate=null **)** diff --git a/classes/class_string.rst b/classes/class_string.rst index 6f043794d..a58499cb7 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -116,6 +116,8 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`http_unescape` **(** **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`humanize_size` **(** :ref:`int` size **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`insert` **(** :ref:`int` position, :ref:`String` what **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_abs_path` **(** **)** | @@ -170,12 +172,12 @@ Methods +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`plus_file` **(** :ref:`String` file **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** | ++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`replace` **(** :ref:`String` what, :ref:`String` forwhat **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`replacen` **(** :ref:`String` what, :ref:`String` forwhat **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`repeat` **(** :ref:`int` count **)** | -+-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rfind` **(** :ref:`String` what, :ref:`int` from=-1 **)** | +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rfindn` **(** :ref:`String` what, :ref:`int` from=-1 **)** | @@ -494,6 +496,18 @@ Unescapes (decodes) a string in URL encoded format. Also referred to as 'URL dec print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".http_unescape()) +.. _class_String_method_humanize_size: + +- :ref:`String` **humanize_size** **(** :ref:`int` size **)** + +Converts ``size`` represented as number of bytes to human-readable format using internationalized set of data size units, namely: B, KiB, MiB, GiB, TiB, PiB, EiB. Note that the next smallest unit is picked automatically to hold at most 1024 units. + +:: + + var bytes = 133790307 + var size = String.humanize_size(bytes) + print(size) # prints "127.5 MiB" + .. _class_String_method_insert: - :ref:`String` **insert** **(** :ref:`int` position, :ref:`String` what **)** @@ -658,6 +672,12 @@ Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET re If the string is a path, this concatenates ``file`` at the end of the string as a subpath. E.g. ``"this/is".plus_file("path") == "this/is/path"``. +.. _class_String_method_repeat: + +- :ref:`String` **repeat** **(** :ref:`int` count **)** + +Returns original string repeated a number of times. The number of repetitions is given by the argument. + .. _class_String_method_replace: - :ref:`String` **replace** **(** :ref:`String` what, :ref:`String` forwhat **)** @@ -670,12 +690,6 @@ Replaces occurrences of a case-sensitive substring with the given one inside the Replaces occurrences of a case-insensitive substring with the given one inside the string. -.. _class_String_method_repeat: - -- :ref:`String` **repeat** **(** :ref:`int` count **)** - -Returns original string repeated a number of times. The number of repetitions is given by the argument. - .. _class_String_method_rfind: - :ref:`int` **rfind** **(** :ref:`String` what, :ref:`int` from=-1 **)** diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 33d6a2198..3fd7d5cb2 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -183,6 +183,8 @@ Clear all information passed into the surface tool so far. Returns a constructed :ref:`ArrayMesh` from current information passed in. If an existing :ref:`ArrayMesh` is passed in as an argument, will add an extra surface to the existing :ref:`ArrayMesh`. +Default flag is :ref:`Mesh.ARRAY_COMPRESS_DEFAULT`. See ``Mesh.ARRAY_COMPRESS_*`` constants for other flags. + .. _class_SurfaceTool_method_commit_to_arrays: - :ref:`Array` **commit_to_arrays** **(** **)** diff --git a/classes/class_textureprogress.rst b/classes/class_textureprogress.rst index f1d346e3e..9831abe8a 100644 --- a/classes/class_textureprogress.rst +++ b/classes/class_textureprogress.rst @@ -141,7 +141,7 @@ The fill direction. See :ref:`FillMode` for possi | *Getter* | get_nine_patch_stretch() | +-----------+-------------------------------+ -If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect`. Use the ``stretch_margin_*`` properties like :ref:`stretch_margin_bottom` to set up the nine patch's 3×3 grid. +If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect`. Use the ``stretch_margin_*`` properties like :ref:`stretch_margin_bottom` to set up the nine patch's 3×3 grid. When using a radial :ref:`fill_mode`, this setting will enable stretching. .. _class_TextureProgress_property_radial_center_offset: diff --git a/classes/class_thread.rst b/classes/class_thread.rst index f65a6e017..464033e9a 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -55,6 +55,11 @@ Description A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex` or :ref:`Semaphore` is advised if working with shared objects. +Tutorials +--------- + +- :doc:`../tutorials/threads/using_multiple_threads` + Method Descriptions ------------------- diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index 3defa8925..014cb8cab 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -35,6 +35,8 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_button` **(** :ref:`int` column, :ref:`Texture` button, :ref:`int` button_idx=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Variant` | :ref:`call_recursive` **(** :ref:`String` method, ... **)** vararg | ++-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_custom_bg_color` **(** :ref:`int` column **)** | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_custom_color` **(** :ref:`int` column **)** | @@ -47,12 +49,16 @@ Methods +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_button_count` **(** :ref:`int` column **)** const | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_button_tooltip` **(** :ref:`int` column, :ref:`int` button_idx **)** const | ++-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeCellMode` | :ref:`get_cell_mode` **(** :ref:`int` column **)** const | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`TreeItem` | :ref:`get_children` **(** **)** | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_custom_bg_color` **(** :ref:`int` column **)** const | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_custom_color` **(** :ref:`int` column **)** const | ++-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_expand_right` **(** :ref:`int` column **)** const | +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_icon` **(** :ref:`int` column **)** const | @@ -244,6 +250,12 @@ Method Descriptions Adds a button with :ref:`Texture` ``button`` at column ``column``. The ``button_idx`` index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count` immediately after this method. Optionally, the button can be ``disabled`` and have a ``tooltip``. +.. _class_TreeItem_method_call_recursive: + +- :ref:`Variant` **call_recursive** **(** :ref:`String` method, ... **)** vararg + +Calls the ``method`` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. + .. _class_TreeItem_method_clear_custom_bg_color: - void **clear_custom_bg_color** **(** :ref:`int` column **)** @@ -280,6 +292,12 @@ Returns the :ref:`Texture` of the button at index ``button_idx`` Returns the number of buttons in column ``column``. May be used to get the most recently added button's index, if no index was specified. +.. _class_TreeItem_method_get_button_tooltip: + +- :ref:`String` **get_button_tooltip** **(** :ref:`int` column, :ref:`int` button_idx **)** const + +Returns the tooltip string for the button at index ``button_idx`` in column ``column``. + .. _class_TreeItem_method_get_cell_mode: - :ref:`TreeCellMode` **get_cell_mode** **(** :ref:`int` column **)** const @@ -298,6 +316,12 @@ Returns the TreeItem's child items. Returns the custom background color of column ``column``. +.. _class_TreeItem_method_get_custom_color: + +- :ref:`Color` **get_custom_color** **(** :ref:`int` column **)** const + +Returns the custom color of column ``column``. + .. _class_TreeItem_method_get_expand_right: - :ref:`bool` **get_expand_right** **(** :ref:`int` column **)** const diff --git a/classes/class_videoplayer.rst b/classes/class_videoplayer.rst index 58af31d15..52dafd4f3 100644 --- a/classes/class_videoplayer.rst +++ b/classes/class_videoplayer.rst @@ -169,6 +169,8 @@ If ``true``, the video is paused. | *Getter* | get_stream() | +----------+-------------------+ +The assigned video stream. See description for supported formats. + .. _class_VideoPlayer_property_stream_position: - :ref:`float` **stream_position** diff --git a/classes/class_visualscriptcomposearray.rst b/classes/class_visualscriptcomposearray.rst new file mode 100644 index 000000000..b1d95fb38 --- /dev/null +++ b/classes/class_visualscriptcomposearray.rst @@ -0,0 +1,25 @@ +:github_url: hide + +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the VisualScriptComposeArray.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_VisualScriptComposeArray: + +VisualScriptComposeArray +======================== + +**Inherits:** :ref:`VisualScriptLists` **<** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Category:** Core + +Brief Description +----------------- + +A Visual Script Node used to create array from a list of items. + +Description +----------- + +A Visual Script Node used to compose array from the list of elements provided with custom in-graph UI hard coded in the VisualScript Editor. + diff --git a/classes/class_visualscriptlists.rst b/classes/class_visualscriptlists.rst new file mode 100644 index 000000000..bf1ee0de7 --- /dev/null +++ b/classes/class_visualscriptlists.rst @@ -0,0 +1,83 @@ +:github_url: hide + +.. Generated automatically by doc/tools/makerst.py in Godot's source tree. +.. DO NOT EDIT THIS FILE, but the VisualScriptLists.xml source instead. +.. The source is found in doc/classes or modules//doc_classes. + +.. _class_VisualScriptLists: + +VisualScriptLists +================= + +**Inherits:** :ref:`VisualScriptNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` + +**Inherited By:** :ref:`VisualScriptComposeArray` + +**Category:** Core + +Brief Description +----------------- + +A Visual Script virtual class for in-graph editable nodes. + +Methods +------- + ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_input_data_port` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`add_output_data_port` **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_input_data_port` **(** :ref:`int` index **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`remove_output_data_port` **(** :ref:`int` index **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_input_data_port_name` **(** :ref:`int` index, :ref:`String` name **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_input_data_port_type` **(** :ref:`int` index, :ref:`Variant.Type` type **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_output_data_port_name` **(** :ref:`int` index, :ref:`String` name **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_output_data_port_type` **(** :ref:`int` index, :ref:`Variant.Type` type **)** | ++------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Description +----------- + +A Visual Script virtual class that defines the shape and the default behaviour of the nodes that have to be in-graph editable nodes. + +Method Descriptions +------------------- + +.. _class_VisualScriptLists_method_add_input_data_port: + +- void **add_input_data_port** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** + +.. _class_VisualScriptLists_method_add_output_data_port: + +- void **add_output_data_port** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`int` index **)** + +.. _class_VisualScriptLists_method_remove_input_data_port: + +- void **remove_input_data_port** **(** :ref:`int` index **)** + +.. _class_VisualScriptLists_method_remove_output_data_port: + +- void **remove_output_data_port** **(** :ref:`int` index **)** + +.. _class_VisualScriptLists_method_set_input_data_port_name: + +- void **set_input_data_port_name** **(** :ref:`int` index, :ref:`String` name **)** + +.. _class_VisualScriptLists_method_set_input_data_port_type: + +- void **set_input_data_port_type** **(** :ref:`int` index, :ref:`Variant.Type` type **)** + +.. _class_VisualScriptLists_method_set_output_data_port_name: + +- void **set_output_data_port_name** **(** :ref:`int` index, :ref:`String` name **)** + +.. _class_VisualScriptLists_method_set_output_data_port_type: + +- void **set_output_data_port_type** **(** :ref:`int` index, :ref:`Variant.Type` type **)** + diff --git a/classes/class_visualscriptnode.rst b/classes/class_visualscriptnode.rst index ef439701a..a00be013b 100644 --- a/classes/class_visualscriptnode.rst +++ b/classes/class_visualscriptnode.rst @@ -11,7 +11,7 @@ VisualScriptNode **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`VisualScriptBasicTypeConstant`, :ref:`VisualScriptBuiltinFunc`, :ref:`VisualScriptClassConstant`, :ref:`VisualScriptComment`, :ref:`VisualScriptCondition`, :ref:`VisualScriptConstant`, :ref:`VisualScriptConstructor`, :ref:`VisualScriptCustomNode`, :ref:`VisualScriptDeconstruct`, :ref:`VisualScriptEmitSignal`, :ref:`VisualScriptEngineSingleton`, :ref:`VisualScriptExpression`, :ref:`VisualScriptFunction`, :ref:`VisualScriptFunctionCall`, :ref:`VisualScriptGlobalConstant`, :ref:`VisualScriptIndexGet`, :ref:`VisualScriptIndexSet`, :ref:`VisualScriptInputAction`, :ref:`VisualScriptIterator`, :ref:`VisualScriptLocalVar`, :ref:`VisualScriptLocalVarSet`, :ref:`VisualScriptMathConstant`, :ref:`VisualScriptOperator`, :ref:`VisualScriptPreload`, :ref:`VisualScriptPropertyGet`, :ref:`VisualScriptPropertySet`, :ref:`VisualScriptResourcePath`, :ref:`VisualScriptReturn`, :ref:`VisualScriptSceneNode`, :ref:`VisualScriptSceneTree`, :ref:`VisualScriptSelect`, :ref:`VisualScriptSelf`, :ref:`VisualScriptSequence`, :ref:`VisualScriptSubCall`, :ref:`VisualScriptSwitch`, :ref:`VisualScriptTypeCast`, :ref:`VisualScriptVariableGet`, :ref:`VisualScriptVariableSet`, :ref:`VisualScriptWhile`, :ref:`VisualScriptYield`, :ref:`VisualScriptYieldSignal` +**Inherited By:** :ref:`VisualScriptBasicTypeConstant`, :ref:`VisualScriptBuiltinFunc`, :ref:`VisualScriptClassConstant`, :ref:`VisualScriptComment`, :ref:`VisualScriptCondition`, :ref:`VisualScriptConstant`, :ref:`VisualScriptConstructor`, :ref:`VisualScriptCustomNode`, :ref:`VisualScriptDeconstruct`, :ref:`VisualScriptEmitSignal`, :ref:`VisualScriptEngineSingleton`, :ref:`VisualScriptExpression`, :ref:`VisualScriptFunction`, :ref:`VisualScriptFunctionCall`, :ref:`VisualScriptGlobalConstant`, :ref:`VisualScriptIndexGet`, :ref:`VisualScriptIndexSet`, :ref:`VisualScriptInputAction`, :ref:`VisualScriptIterator`, :ref:`VisualScriptLists`, :ref:`VisualScriptLocalVar`, :ref:`VisualScriptLocalVarSet`, :ref:`VisualScriptMathConstant`, :ref:`VisualScriptOperator`, :ref:`VisualScriptPreload`, :ref:`VisualScriptPropertyGet`, :ref:`VisualScriptPropertySet`, :ref:`VisualScriptResourcePath`, :ref:`VisualScriptReturn`, :ref:`VisualScriptSceneNode`, :ref:`VisualScriptSceneTree`, :ref:`VisualScriptSelect`, :ref:`VisualScriptSelf`, :ref:`VisualScriptSequence`, :ref:`VisualScriptSubCall`, :ref:`VisualScriptSwitch`, :ref:`VisualScriptTypeCast`, :ref:`VisualScriptVariableGet`, :ref:`VisualScriptVariableSet`, :ref:`VisualScriptWhile`, :ref:`VisualScriptYield`, :ref:`VisualScriptYieldSignal` **Category:** Core diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index 136625b59..148bc1ac3 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -53,8 +53,6 @@ Methods +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_node_connection` **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** const | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`rebuild` **(** **)** | -+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_node` **(** :ref:`Type` type, :ref:`int` id **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_mode` **(** :ref:`Mode` mode **)** | @@ -158,10 +156,6 @@ Method Descriptions - :ref:`bool` **is_node_connection** **(** :ref:`Type` type, :ref:`int` from_node, :ref:`int` from_port, :ref:`int` to_node, :ref:`int` to_port **)** const -.. _class_VisualShader_method_rebuild: - -- void **rebuild** **(** **)** - .. _class_VisualShader_method_remove_node: - void **remove_node** **(** :ref:`Type` type, :ref:`int` id **)** diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index 17658b789..e2e181f0c 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -11,7 +11,7 @@ VisualShaderNode **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeCubeMap`, :ref:`VisualShaderNodeCubeMapUniform`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeGroupBase`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeScalarClamp`, :ref:`VisualShaderNodeScalarConstant`, :ref:`VisualShaderNodeScalarDerivativeFunc`, :ref:`VisualShaderNodeScalarFunc`, :ref:`VisualShaderNodeScalarInterp`, :ref:`VisualShaderNodeScalarOp`, :ref:`VisualShaderNodeScalarSmoothStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformMult`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeVec3Constant`, :ref:`VisualShaderNodeVectorClamp`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDerivativeFunc`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorInterp`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp`, :ref:`VisualShaderNodeVectorRefract`, :ref:`VisualShaderNodeVectorScalarMix`, :ref:`VisualShaderNodeVectorScalarSmoothStep`, :ref:`VisualShaderNodeVectorScalarStep`, :ref:`VisualShaderNodeVectorSmoothStep` +**Inherited By:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeCubeMap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeGroupBase`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeScalarClamp`, :ref:`VisualShaderNodeScalarConstant`, :ref:`VisualShaderNodeScalarDerivativeFunc`, :ref:`VisualShaderNodeScalarFunc`, :ref:`VisualShaderNodeScalarInterp`, :ref:`VisualShaderNodeScalarOp`, :ref:`VisualShaderNodeScalarSmoothStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformMult`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUniform`, :ref:`VisualShaderNodeVec3Constant`, :ref:`VisualShaderNodeVectorClamp`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDerivativeFunc`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorInterp`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp`, :ref:`VisualShaderNodeVectorRefract`, :ref:`VisualShaderNodeVectorScalarMix`, :ref:`VisualShaderNodeVectorScalarSmoothStep`, :ref:`VisualShaderNodeVectorScalarStep`, :ref:`VisualShaderNodeVectorSmoothStep` **Category:** Core @@ -58,7 +58,9 @@ Enumerations .. _class_VisualShaderNode_constant_PORT_TYPE_TRANSFORM: -.. _class_VisualShaderNode_constant_PORT_TYPE_ICON_COLOR: +.. _class_VisualShaderNode_constant_PORT_TYPE_SAMPLER: + +.. _class_VisualShaderNode_constant_PORT_TYPE_MAX: enum **PortType**: @@ -70,7 +72,9 @@ enum **PortType**: - **PORT_TYPE_TRANSFORM** = **3** --- Transform type. Translated to ``mat4`` type in shader code. -- **PORT_TYPE_ICON_COLOR** = **4** --- Color type. Can be used for return icon type in members dialog (see :ref:`VisualShaderNodeCustom._get_return_icon_type`) - do not use it in other cases! +- **PORT_TYPE_SAMPLER** = **4** --- Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. + +- **PORT_TYPE_MAX** = **5** --- Represents the size of the :ref:`PortType` enum. Property Descriptions --------------------- diff --git a/classes/class_visualshadernodecubemapuniform.rst b/classes/class_visualshadernodecubemapuniform.rst index 53e71ea70..c36af9e2e 100644 --- a/classes/class_visualshadernodecubemapuniform.rst +++ b/classes/class_visualshadernodecubemapuniform.rst @@ -9,7 +9,7 @@ VisualShaderNodeCubeMapUniform ============================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` +**Inherits:** :ref:`VisualShaderNodeTextureUniform` **<** :ref:`VisualShaderNodeUniform` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core @@ -18,10 +18,3 @@ Brief Description -Properties ----------- - -+---------------------------+----------------------+-------------+ -| :ref:`Array` | default_input_values | **O:** [ ] | -+---------------------------+----------------------+-------------+ - diff --git a/classes/class_visualshadernodescalarswitch.rst b/classes/class_visualshadernodescalarswitch.rst index 9c7a5d662..88132f8b6 100644 --- a/classes/class_visualshadernodescalarswitch.rst +++ b/classes/class_visualshadernodescalarswitch.rst @@ -18,3 +18,10 @@ Brief Description +Properties +---------- + ++---------------------------+----------------------+-------------------------------------+ +| :ref:`Array` | default_input_values | **O:** [ 0, false, 1, 1.0, 2, 0.0 ] | ++---------------------------+----------------------+-------------------------------------+ + diff --git a/classes/class_visualshadernodeswitch.rst b/classes/class_visualshadernodeswitch.rst index 681233f91..54ff04499 100644 --- a/classes/class_visualshadernodeswitch.rst +++ b/classes/class_visualshadernodeswitch.rst @@ -24,6 +24,6 @@ Properties ---------- +---------------------------+----------------------+-------------------------------------------------------------------+ -| :ref:`Array` | default_input_values | **O:** [ 0, false, 1, Vector3( 0, 0, 0 ), 2, Vector3( 0, 0, 0 ) ] | +| :ref:`Array` | default_input_values | **O:** [ 0, false, 1, Vector3( 1, 1, 1 ), 2, Vector3( 0, 0, 0 ) ] | +---------------------------+----------------------+-------------------------------------------------------------------+ diff --git a/classes/class_visualshadernodetextureuniform.rst b/classes/class_visualshadernodetextureuniform.rst index 2b6d18ae7..5aaca686b 100644 --- a/classes/class_visualshadernodetextureuniform.rst +++ b/classes/class_visualshadernodetextureuniform.rst @@ -11,7 +11,7 @@ VisualShaderNodeTextureUniform **Inherits:** :ref:`VisualShaderNodeUniform` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeTextureUniformTriplanar` +**Inherited By:** :ref:`VisualShaderNodeCubeMapUniform`, :ref:`VisualShaderNodeTextureUniformTriplanar` **Category:** Core diff --git a/classes/class_websocketclient.rst b/classes/class_websocketclient.rst index a9643a406..945bcb23a 100644 --- a/classes/class_websocketclient.rst +++ b/classes/class_websocketclient.rst @@ -21,18 +21,24 @@ A WebSocket client implementation. Properties ---------- -+-------------------------+--------------------------------------------------------------+ -| :ref:`bool` | :ref:`verify_ssl` | -+-------------------------+--------------------------------------------------------------+ ++-----------------------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`X509Certificate` | :ref:`trusted_ssl_certificate` | ++-----------------------------------------------+----------------------------------------------------------------------------------------+ +| :ref:`bool` | :ref:`verify_ssl` | ++-----------------------------------------------+----------------------------------------------------------------------------------------+ Methods ------- -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`disconnect_from_host` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | -+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Error` | :ref:`connect_to_url` **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false, :ref:`PoolStringArray` custom_headers=PoolStringArray( ) **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`disconnect_from_host` **(** :ref:`int` code=1000, :ref:`String` reason="" **)** | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`String` | :ref:`get_connected_host` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`int` | :ref:`get_connected_port` **(** **)** const | ++---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- @@ -83,6 +89,18 @@ You will receive appropriate signals when connecting, disconnecting, or when new Property Descriptions --------------------- +.. _class_WebSocketClient_property_trusted_ssl_certificate: + +- :ref:`X509Certificate` **trusted_ssl_certificate** + ++----------+------------------------------------+ +| *Setter* | set_trusted_ssl_certificate(value) | ++----------+------------------------------------+ +| *Getter* | get_trusted_ssl_certificate() | ++----------+------------------------------------+ + +If specified, this :ref:`X509Certificate` will be the only one accepted when connecting to an SSL host. Any other certificate provided by the server will be regarded as invalid. + .. _class_WebSocketClient_property_verify_ssl: - :ref:`bool` **verify_ssl** @@ -102,7 +120,7 @@ Method Descriptions .. _class_WebSocketClient_method_connect_to_url: -- :ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false **)** +- :ref:`Error` **connect_to_url** **(** :ref:`String` url, :ref:`PoolStringArray` protocols=PoolStringArray( ), :ref:`bool` gd_mp_api=false, :ref:`PoolStringArray` custom_headers=PoolStringArray( ) **)** Connects to the given URL requesting one of the given ``protocols`` as sub-protocol. If the list empty (default), no sub-protocol will be requested. @@ -110,9 +128,23 @@ If ``true`` is passed as ``gd_mp_api``, the client will behave like a network pe If ``false`` is passed instead (default), you must call :ref:`PacketPeer` functions (``put_packet``, ``get_packet``, etc.) on the :ref:`WebSocketPeer` returned via ``get_peer(1)`` and not on this object directly (e.g. ``get_peer(1).put_packet(data)``). +You can optionally pass a list of ``custom_headers`` to be added to the handshake HTTP request (not supported in HTML5 platform). + .. _class_WebSocketClient_method_disconnect_from_host: - void **disconnect_from_host** **(** :ref:`int` code=1000, :ref:`String` reason="" **)** Disconnects this client from the connected host. See :ref:`WebSocketPeer.close` for more information. +.. _class_WebSocketClient_method_get_connected_host: + +- :ref:`String` **get_connected_host** **(** **)** const + +Return the IP address of the currently connected host. + +.. _class_WebSocketClient_method_get_connected_port: + +- :ref:`int` **get_connected_port** **(** **)** const + +Return the IP port of the currently connected host. + diff --git a/classes/class_websocketserver.rst b/classes/class_websocketserver.rst index 78854533b..697f216aa 100644 --- a/classes/class_websocketserver.rst +++ b/classes/class_websocketserver.rst @@ -18,6 +18,17 @@ Brief Description A WebSocket server implementation. +Properties +---------- + ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`X509Certificate` | :ref:`ca_chain` | ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`CryptoKey` | :ref:`private_key` | ++-----------------------------------------------+------------------------------------------------------------------------+ +| :ref:`X509Certificate` | :ref:`ssl_certificate` | ++-----------------------------------------------+------------------------------------------------------------------------+ + Methods ------- @@ -75,6 +86,45 @@ After starting the server (:ref:`listen`), **Note:** This class will not work in HTML5 exports due to browser restrictions. +Property Descriptions +--------------------- + +.. _class_WebSocketServer_property_ca_chain: + +- :ref:`X509Certificate` **ca_chain** + ++----------+---------------------+ +| *Setter* | set_ca_chain(value) | ++----------+---------------------+ +| *Getter* | get_ca_chain() | ++----------+---------------------+ + +When using SSL (see :ref:`private_key` and :ref:`ssl_certificate`), you can set this to a valid :ref:`X509Certificate` to be provided as additional CA chain information during the SSL handshake. + +.. _class_WebSocketServer_property_private_key: + +- :ref:`CryptoKey` **private_key** + ++----------+------------------------+ +| *Setter* | set_private_key(value) | ++----------+------------------------+ +| *Getter* | get_private_key() | ++----------+------------------------+ + +When set to a valid :ref:`CryptoKey` (along with :ref:`ssl_certificate`) will cause the server to require SSL instead of regular TCP (i.e. the ``wss://`` protocol). + +.. _class_WebSocketServer_property_ssl_certificate: + +- :ref:`X509Certificate` **ssl_certificate** + ++----------+----------------------------+ +| *Setter* | set_ssl_certificate(value) | ++----------+----------------------------+ +| *Getter* | get_ssl_certificate() | ++----------+----------------------------+ + +When set to a valid :ref:`X509Certificate` (along with :ref:`private_key`) will cause the server to require SSL instead of regular TCP (i.e. the ``wss://`` protocol). + Method Descriptions ------------------- diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index ecc6325d5..83a911ae3 100644 --- a/classes/class_x509certificate.rst +++ b/classes/class_x509certificate.rst @@ -16,7 +16,7 @@ X509Certificate Brief Description ----------------- - +An X509 certificate (e.g. for SSL). Methods ------- @@ -27,6 +27,13 @@ Methods | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | +---------------------------------------+---------------------------------------------------------------------------------------------+ +Description +----------- + +The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other :ref:`Resource`. + +They can be used as the server certificate in :ref:`StreamPeerSSL.accept_stream` (along with the proper :ref:`CryptoKey`), and to specify the only certificate that should be accepted when connecting to an SSL server via :ref:`StreamPeerSSL.connect_to_stream`. + Method Descriptions ------------------- @@ -34,7 +41,11 @@ Method Descriptions - :ref:`Error` **load** **(** :ref:`String` path **)** +Loads a certificate from ``path`` ("\*.crt" file). + .. _class_X509Certificate_method_save: - :ref:`Error` **save** **(** :ref:`String` path **)** +Saves a certificate to the given ``path`` (should be a "\*.crt" file). +