From 286ce78e08db3ec09524bc1be2adaeb45f7a482c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 18 Feb 2019 09:46:06 +0100 Subject: [PATCH] Sync classref with current source --- classes/class_@gdscript.rst | 4 +-- classes/class_animation.rst | 7 ++++ classes/class_animationplayer.rst | 8 ++++- classes/class_audiobuslayout.rst | 2 +- classes/class_audioserver.rst | 6 ++-- classes/class_control.rst | 4 +-- classes/class_dictionary.rst | 4 ++- classes/class_editorspatialgizmoplugin.rst | 2 +- classes/class_file.rst | 2 +- classes/class_multimesh.rst | 42 ++++++++++++++-------- classes/class_networkedmultiplayerenet.rst | 2 +- classes/class_optionbutton.rst | 14 ++++++-- classes/class_os.rst | 28 +++++++++++++-- classes/class_physics2dserver.rst | 4 +++ classes/class_physicsserver.rst | 4 +++ classes/class_randomnumbergenerator.rst | 4 ++- classes/class_resource.rst | 17 +++++++-- classes/class_skeleton2d.rst | 7 ++++ classes/class_surfacetool.rst | 4 +-- classes/class_tabcontainer.rst | 2 ++ classes/class_tabs.rst | 2 ++ classes/class_tilemap.rst | 4 +-- 22 files changed, 132 insertions(+), 41 deletions(-) diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 04734f5f9..e45e84af0 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -896,7 +896,7 @@ Random from seed: pass a ``seed``, and an array with both number and new seed is - :ref:`float` **randf** **(** **)** -Returns a random floating point value between 0 and 1. +Returns a random floating point value on the interval ``[0, 1]``. :: @@ -906,7 +906,7 @@ Returns a random floating point value between 0 and 1. - :ref:`int` **randi** **(** **)** -Returns a random 32 bit integer. Use remainder to obtain a random value between 0 and N (where N is smaller than 2^32 -1). +Returns a random 32 bit integer. Use remainder to obtain a random value in the interval ``[0, N]`` (where N is smaller than 2^32 -1). :: diff --git a/classes/class_animation.rst b/classes/class_animation.rst index cc87e1fde..d7a0233c2 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -144,6 +144,13 @@ Methods | void | :ref:`value_track_set_update_mode` **(** :ref:`int` idx, :ref:`UpdateMode` mode **)** | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +Signals +------- + +.. _class_Animation_signal_tracks_changed: + +- **tracks_changed** **(** **)** + Enumerations ------------ diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 1866996cd..89517d735 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -356,12 +356,16 @@ Returns ``true`` if playing an animation. Play the animation with key ``name``. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. +If the animation has been paused by ``stop(true)`` it will be resumed. Calling ``play()`` without arguments will also resume the animation. + .. _class_AnimationPlayer_method_play_backwards: - void **play_backwards** **(** :ref:`String` name="", :ref:`float` custom_blend=-1 **)** Play the animation with key ``name`` in reverse. +If the animation has been paused by ``stop(true)`` it will be resumed backwards. Calling ``play_backwards()`` without arguments will also resume the animation backwards. + .. _class_AnimationPlayer_method_queue: - void **queue** **(** :ref:`String` name **)** @@ -396,5 +400,7 @@ Specify a blend time (in seconds) between two animations, referenced by their na - void **stop** **(** :ref:`bool` reset=true **)** -Stop the currently playing animation. If ``reset`` is ``true``, the anim position is reset to ``0``. +Stop the currently playing animation. If ``reset`` is ``true``, the animation position is reset to ``0`` and the playback speed is reset to ``1.0``. + +If ``reset`` is ``false``, then calling ``play()`` without arguments or ``play("same_as_before")`` will resume the animation. Works the same for the ``play_backwards()`` method. diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 6d0aa6d83..ab1679936 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -19,5 +19,5 @@ Stores information about the audiobusses. Description ----------- -Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between busses. See :ref:`AudioServer` for usage. +Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See :ref:`AudioServer` for usage. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index fb2527e68..a99b05015 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -174,7 +174,7 @@ Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ` - :ref:`AudioBusLayout` **generate_bus_layout** **(** **)** const -Generates an :ref:`AudioBusLayout` using the available busses and effects. +Generates an :ref:`AudioBusLayout` using the available buses and effects. .. _class_AudioServer_method_get_bus_channels: @@ -186,7 +186,7 @@ Returns the amount of channels of the bus at index ``bus_idx``. - :ref:`int` **get_bus_count** **(** **)** const -Returns the number of available busses. +Returns the number of available buses. .. _class_AudioServer_method_get_bus_effect: @@ -314,7 +314,7 @@ If ``true``, the bus at index ``bus_idx`` is bypassing effects. - void **set_bus_count** **(** :ref:`int` amount **)** -Adds and removes busses to make the number of busses match ``amount``. +Adds and removes buses to make the number of buses match ``amount``. .. _class_AudioServer_method_set_bus_effect_enabled: diff --git a/classes/class_control.rst b/classes/class_control.rst index f1a9ccd86..2e850d3a1 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -502,9 +502,9 @@ enum **GrowDirection**: - **GROW_DIRECTION_BEGIN** = **0** --- The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. -- **GROW_DIRECTION_END** = **1** --- The control wil grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. +- **GROW_DIRECTION_END** = **1** --- The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. -- **GROW_DIRECTION_BOTH** = **2** --- The control wil grow in both directions equally to make up if its minimum size is changed to be greater than its current size. +- **GROW_DIRECTION_BOTH** = **2** --- The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. .. _enum_Control_Anchor: diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index f4c59db47..2fd619eb7 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -46,6 +46,8 @@ Description Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are always passed by reference. +Erasing elements while iterating over them **is not supported**. + Method Descriptions ------------------- @@ -71,7 +73,7 @@ Return true if the dictionary is empty. - :ref:`bool` **erase** **(** :ref:`Variant` key **)** -Erase a dictionary key/value pair by key. +Erase a dictionary key/value pair by key. Do not erase elements while iterating over the dictionary. .. _class_Dictionary_method_get: diff --git a/classes/class_editorspatialgizmoplugin.rst b/classes/class_editorspatialgizmoplugin.rst index acd0de269..d539a7cf0 100644 --- a/classes/class_editorspatialgizmoplugin.rst +++ b/classes/class_editorspatialgizmoplugin.rst @@ -130,7 +130,7 @@ Get material from the internal list of materials. If an :ref:`EditorSpatialGizmo - :ref:`String` **get_name** **(** **)** virtual -Override this method to provide the name that will appear in teh gizmo visibility menu. +Override this method to provide the name that will appear in the gizmo visibility menu. .. _class_EditorSpatialGizmoPlugin_method_has_gizmo: diff --git a/classes/class_file.rst b/classes/class_file.rst index 555da8c40..60fc14d2c 100644 --- a/classes/class_file.rst +++ b/classes/class_file.rst @@ -216,7 +216,7 @@ Closes the currently opened file. - :ref:`bool` **eof_reached** **(** **)** const -Returns ``true`` if the file cursor has reached the end of the file. +Returns ``true`` if the file cursor has read past the end of the file. Note that this function will still return ``false`` while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always :ref:`get_len` and :ref:`get_position` to implement a custom logic. .. _class_File_method_file_exists: diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index 08947a7d5..cff471c73 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -34,21 +34,25 @@ Properties Methods ------- -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`AABB` | :ref:`get_aabb` **(** **)** const | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_instance_color` **(** :ref:`int` instance **)** const | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Color` | :ref:`get_instance_custom_data` **(** :ref:`int` instance **)** const | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`Transform` | :ref:`get_instance_transform` **(** :ref:`int` instance **)** const | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_color` **(** :ref:`int` instance, :ref:`Color` color **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_custom_data` **(** :ref:`int` instance, :ref:`Color` custom_data **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_instance_transform` **(** :ref:`int` instance, :ref:`Transform` transform **)** | -+-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`AABB` | :ref:`get_aabb` **(** **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_instance_color` **(** :ref:`int` instance **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Color` | :ref:`get_instance_custom_data` **(** :ref:`int` instance **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform` | :ref:`get_instance_transform` **(** :ref:`int` instance **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`Transform2D` | :ref:`get_instance_transform_2d` **(** :ref:`int` instance **)** const | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_color` **(** :ref:`int` instance, :ref:`Color` color **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_custom_data` **(** :ref:`int` instance, :ref:`Color` custom_data **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_transform` **(** :ref:`int` instance, :ref:`Transform` transform **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| void | :ref:`set_instance_transform_2d` **(** :ref:`int` instance, :ref:`Transform2D` transform **)** | ++---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Enumerations ------------ @@ -198,6 +202,10 @@ Return the custom data that has been set for a specific instance. Return the transform of a specific instance. +.. _class_MultiMesh_method_get_instance_transform_2d: + +- :ref:`Transform2D` **get_instance_transform_2d** **(** :ref:`int` instance **)** const + .. _class_MultiMesh_method_set_instance_color: - void **set_instance_color** **(** :ref:`int` instance, :ref:`Color` color **)** @@ -216,3 +224,7 @@ Set custom data for a specific instance. Although :ref:`Color` is u Set the transform for a specific instance. +.. _class_MultiMesh_method_set_instance_transform_2d: + +- void **set_instance_transform_2d** **(** :ref:`int` instance, :ref:`Transform2D` transform **)** + diff --git a/classes/class_networkedmultiplayerenet.rst b/classes/class_networkedmultiplayerenet.rst index e1710357d..7f01487e9 100644 --- a/classes/class_networkedmultiplayerenet.rst +++ b/classes/class_networkedmultiplayerenet.rst @@ -155,7 +155,7 @@ Closes the connection. Ignored if no connection is currently established. If thi - :ref:`Error` **create_client** **(** :ref:`String` address, :ref:`int` port, :ref:`int` in_bandwidth=0, :ref:`int` out_bandwidth=0, :ref:`int` client_port=0 **)** -Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain nome (e.g. ``www.example.com``) or an IP address in IPv4 or IPv6 format (e.g. ``192.168.1.1``). The ``port`` is the port the server is listening on. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns ``OK`` if a client was created, ``ERR_ALREADY_IN_USE`` if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or ``ERR_CANT_CREATE`` if the client could not be created. If ``client_port`` is specified, the client will also listen to the given port, this is useful in some NAT traversal technique. +Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``www.example.com``) or an IP address in IPv4 or IPv6 format (e.g. ``192.168.1.1``). The ``port`` is the port the server is listening on. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns ``OK`` if a client was created, ``ERR_ALREADY_IN_USE`` if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call :ref:`close_connection` first) or ``ERR_CANT_CREATE`` if the client could not be created. If ``client_port`` is specified, the client will also listen to the given port, this is useful in some NAT traversal technique. .. _class_NetworkedMultiplayerENet_method_create_server: diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index 91fc0cad5..db77db627 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -41,6 +41,8 @@ Methods +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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:`String` | :ref:`get_item_text` **(** :ref:`int` idx **)** const | @@ -106,13 +108,13 @@ Signals - **item_focused** **(** :ref:`int` ID **)** -This signal is emitted when user navigated to an item using ``ui_up`` or ``ui_down`` action. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). +This signal is emitted when user navigated to an item using ``ui_up`` or ``ui_down`` action. ID of the item selected is passed as argument. .. _class_OptionButton_signal_item_selected: - **item_selected** **(** :ref:`int` ID **)** -This signal is emitted when the current item was changed by the user. ID of the item selected is passed as argument (if no IDs were added, ID will be just the item index). +This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument. Description ----------- @@ -173,7 +175,13 @@ Return the icon of the item at index "idx". - :ref:`int` **get_item_id** **(** :ref:`int` idx **)** const -Return the ID of the item at index "idx". +Return the ID of the item at index ``idx``. + +.. _class_OptionButton_method_get_item_index: + +- :ref:`int` **get_item_index** **(** :ref:`int` id **)** const + +Return the index of the item with the given ``id``. .. _class_OptionButton_method_get_item_metadata: diff --git a/classes/class_os.rst b/classes/class_os.rst index 9d8ecfd27..c18c62f07 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -85,6 +85,8 @@ Methods +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolStringArray` | :ref:`get_connected_midi_inputs` **(** **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| :ref:`VideoDriver` | :ref:`get_current_video_driver` **(** **)** const | ++-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_date` **(** :ref:`bool` utc=false **)** const | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_datetime` **(** :ref:`bool` utc=false **)** const | @@ -161,7 +163,7 @@ Methods +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_video_driver_count` **(** **)** const | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`String` | :ref:`get_video_driver_name` **(** :ref:`int` driver **)** const | +| :ref:`String` | :ref:`get_video_driver_name` **(** :ref:`VideoDriver` driver **)** const | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_virtual_keyboard_height` **(** **)** | +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -237,6 +239,18 @@ Methods Enumerations ------------ +.. _enum_OS_VideoDriver: + +.. _class_OS_constant_VIDEO_DRIVER_GLES2: + +.. _class_OS_constant_VIDEO_DRIVER_GLES3: + +enum **VideoDriver**: + +- **VIDEO_DRIVER_GLES2** = **1** --- The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web. + +- **VIDEO_DRIVER_GLES3** = **0** --- The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web. + .. _enum_OS_Weekday: .. _class_OS_constant_DAY_SUNDAY: @@ -723,6 +737,12 @@ Returns the command line arguments passed to the engine. - :ref:`PoolStringArray` **get_connected_midi_inputs** **(** **)** +.. _class_OS_method_get_current_video_driver: + +- :ref:`VideoDriver` **get_current_video_driver** **(** **)** const + +Returns the currently used video driver, using one of the values from :ref:`VideoDriver`. + .. _class_OS_method_get_date: - :ref:`Dictionary` **get_date** **(** :ref:`bool` utc=false **)** const @@ -979,9 +999,13 @@ If the project name is empty, ``user://`` falls back to ``res://``. - :ref:`int` **get_video_driver_count** **(** **)** const +Returns the number of video drivers supported on the current platform. + .. _class_OS_method_get_video_driver_name: -- :ref:`String` **get_video_driver_name** **(** :ref:`int` driver **)** const +- :ref:`String` **get_video_driver_name** **(** :ref:`VideoDriver` driver **)** const + +Returns the name of the video driver matching the given ``driver`` index. This index is a value from :ref:`VideoDriver`, and you can use :ref:`get_current_video_driver` to get the current backend's index. .. _class_OS_method_get_virtual_keyboard_height: diff --git a/classes/class_physics2dserver.rst b/classes/class_physics2dserver.rst index 2fdc96fe8..8ed7d2358 100644 --- a/classes/class_physics2dserver.rst +++ b/classes/class_physics2dserver.rst @@ -246,6 +246,8 @@ Enumerations .. _class_Physics2DServer_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: +.. _class_Physics2DServer_constant_SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: + enum **SpaceParameter**: - **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. @@ -262,6 +264,8 @@ enum **SpaceParameter**: - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **6** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. +- **SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH** = **7** + .. _enum_Physics2DServer_ShapeType: .. _class_Physics2DServer_constant_SHAPE_LINE: diff --git a/classes/class_physicsserver.rst b/classes/class_physicsserver.rst index 300f70828..469c02c3b 100644 --- a/classes/class_physicsserver.rst +++ b/classes/class_physicsserver.rst @@ -784,6 +784,8 @@ enum **ProcessInfo**: .. _class_PhysicsServer_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS: +.. _class_PhysicsServer_constant_SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH: + enum **SpaceParameter**: - **SPACE_PARAM_CONTACT_RECYCLE_RADIUS** = **0** --- Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. @@ -802,6 +804,8 @@ enum **SpaceParameter**: - **SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS** = **7** --- Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. +- **SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH** = **8** + .. _enum_PhysicsServer_BodyAxis: .. _class_PhysicsServer_constant_BODY_AXIS_LINEAR_X: diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index 4bbd65b72..762498a38 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -51,6 +51,8 @@ Property Descriptions | *Getter* | get_seed() | +----------+-----------------+ +The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers. + Method Descriptions ------------------- @@ -76,7 +78,7 @@ Generates pseudo-random 32-bit unsigned integer between '0' and '4294967295'. - :ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** -Generates pseudo-random 32-bit signed integer between ``from`` and ``to``\ (inclusive). +Generates pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclusive). .. _class_RandomNumberGenerator_method_randomize: diff --git a/classes/class_resource.rst b/classes/class_resource.rst index f59ac94d9..fa9e3a38e 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -56,7 +56,12 @@ Signals Description ----------- -Resource is the base class for all resource types. Resources are primarily data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a :ref:`Node`, which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a :ref:`Node` or another resource. +Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a :ref:`Node`, which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a :ref:`Node` or another resource. + +Tutorials +--------- + +- :doc:`../getting_started/step_by_step/resources` Property Descriptions --------------------- @@ -81,6 +86,8 @@ Property Descriptions | *Getter* | get_name() | +----------+-----------------+ +The name of the resource. This is an optional identifier. + .. _class_Resource_property_resource_path: - :ref:`String` **resource_path** @@ -91,6 +98,8 @@ Property Descriptions | *Getter* | get_path() | +----------+-----------------+ +The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. + Method Descriptions ------------------- @@ -102,6 +111,8 @@ Method Descriptions - :ref:`Resource` **duplicate** **(** :ref:`bool` subresources=false **)** const +Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency, this can be changed by passing ``true`` to the ``subresources`` argument. + .. _class_Resource_method_get_local_scene: - :ref:`Node` **get_local_scene** **(** **)** const @@ -110,7 +121,7 @@ Method Descriptions - :ref:`RID` **get_rid** **(** **)** const -Return the RID of the resource (or an empty RID). Many resources (such as :ref:`Texture`, :ref:`Mesh`, etc) are high level abstractions of resources stored in a server, so this function will return the original RID. +Returns the RID of the resource (or an empty RID). Many resources (such as :ref:`Texture`, :ref:`Mesh`, etc) are high level abstractions of resources stored in a server, so this function will return the original RID. .. _class_Resource_method_setup_local_to_scene: @@ -120,5 +131,5 @@ Return the RID of the resource (or an empty RID). Many resources (such as :ref:` - void **take_over_path** **(** :ref:`String` path **)** -Set the path of the resource. Differs from set_path(), if another ``Resource`` exists with "path" it over-takes it, instead of failing. +Sets the path of the resource. Differs from ``set_path()``, if another ``Resource`` exists with "path" it over-takes it, instead of failing. diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 681fefaed..fb33673e6 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -27,6 +27,13 @@ Methods | :ref:`RID` | :ref:`get_skeleton` **(** **)** const | +-----------------------------+-----------------------------------------------------------------------------------------+ +Signals +------- + +.. _class_Skeleton2D_signal_bone_setup_changed: + +- **bone_setup_changed** **(** **)** + Method Descriptions ------------------- diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index 8cc7d0224..83bda9620 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -32,7 +32,7 @@ Methods +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_tangent` **(** :ref:`Plane` tangent **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`add_triangle_fan` **(** :ref:`PoolVector3Array` vertexes, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`PoolColorArray` colors=PoolColorArray( ), :ref:`PoolVector2Array` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array` normals=PoolVector3Array( ), :ref:`Array` tangents=[ ] **)** | +| void | :ref:`add_triangle_fan` **(** :ref:`PoolVector3Array` vertices, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`PoolColorArray` colors=PoolColorArray( ), :ref:`PoolVector2Array` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array` normals=PoolVector3Array( ), :ref:`Array` tangents=[ ] **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_uv` **(** :ref:`Vector2` uv **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -123,7 +123,7 @@ Specify a Tangent for the next Vertex to use. .. _class_SurfaceTool_method_add_triangle_fan: -- void **add_triangle_fan** **(** :ref:`PoolVector3Array` vertexes, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`PoolColorArray` colors=PoolColorArray( ), :ref:`PoolVector2Array` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array` normals=PoolVector3Array( ), :ref:`Array` tangents=[ ] **)** +- void **add_triangle_fan** **(** :ref:`PoolVector3Array` vertices, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`PoolColorArray` colors=PoolColorArray( ), :ref:`PoolVector2Array` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array` normals=PoolVector3Array( ), :ref:`Array` tangents=[ ] **)** Insert a triangle fan made of array data into :ref:`Mesh` being constructed. diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index ad24f1fee..7351469f6 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -98,6 +98,8 @@ Theme Properties +---------------------------------+---------------------+ | :ref:`StyleBox` | tab_bg | +---------------------------------+---------------------+ +| :ref:`StyleBox` | tab_disabled | ++---------------------------------+---------------------+ | :ref:`StyleBox` | tab_fg | +---------------------------------+---------------------+ | :ref:`int` | top_margin | diff --git a/classes/class_tabs.rst b/classes/class_tabs.rst index 38bec7c65..4b9e85125 100644 --- a/classes/class_tabs.rst +++ b/classes/class_tabs.rst @@ -108,6 +108,8 @@ Theme Properties +---------------------------------+---------------------+ | :ref:`StyleBox` | tab_bg | +---------------------------------+---------------------+ +| :ref:`StyleBox` | tab_disabled | ++---------------------------------+---------------------+ | :ref:`StyleBox` | tab_fg | +---------------------------------+---------------------+ | :ref:`int` | top_margin | diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 2e92819fb..801b751b6 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -377,7 +377,7 @@ Clears cells that do not exist in the tileset. - :ref:`int` **get_cell** **(** :ref:`int` x, :ref:`int` y **)** const -Returns the tile index of the given cell. +Returns the tile index of the given cell. If no tile exists in the cell, returns :ref:`INVALID_CELL`. .. _class_TileMap_method_get_cell_autotile_coord: @@ -387,7 +387,7 @@ Returns the tile index of the given cell. - :ref:`int` **get_cellv** **(** :ref:`Vector2` position **)** const -Returns the tile index of the cell given by a Vector2. +Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns :ref:`INVALID_CELL`. .. _class_TileMap_method_get_collision_layer_bit: