diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 52fb53984..93d578f39 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -1466,7 +1466,13 @@ enum **JoystickList**: - **JOY_BUTTON_22** = **22** --- Gamepad button 22. -- **JOY_BUTTON_MAX** = **23** --- Represents the maximum number of joystick buttons supported. +- **JOY_BUTTON_MAX** = **128** --- The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms: + +- Android: Up to 36 buttons. + +- Linux: Up to 80 buttons. + +- Windows and macOS: Up to 128 buttons. - **JOY_SONY_CIRCLE** = **1** --- DualShock circle button. diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 172613d36..c5b39f411 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -28,28 +28,21 @@ Tutorials Properties ---------- -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`autorestart` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`autorestart_delay` | ``1.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadein_time` | ``0.1`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`float` | :ref:`fadeout_time` | ``0.1`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ -| :ref:`bool` | :ref:`sync` | ``false`` | -+---------------------------+-----------------------------------------------------------------------------------------------+-----------+ - -Methods -------- - -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| :ref:`MixMode` | :ref:`get_mix_mode` **(** **)** |const| | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_mix_mode` **(** :ref:`MixMode` mode **)** | -+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`autorestart` | ``false`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`autorestart_delay` | ``1.0`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`fadein_time` | ``0.1`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`float` | :ref:`fadeout_time` | ``0.1`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`MixMode` | :ref:`mix_mode` | ``0`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ +| :ref:`bool` | :ref:`sync` | ``false`` | ++---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ Enumerations ------------ @@ -145,6 +138,20 @@ If :ref:`autorestart` is ``true ---- +.. _class_AnimationNodeOneShot_property_mix_mode: + +- :ref:`MixMode` **mix_mode** + ++-----------+---------------------+ +| *Default* | ``0`` | ++-----------+---------------------+ +| *Setter* | set_mix_mode(value) | ++-----------+---------------------+ +| *Getter* | get_mix_mode() | ++-----------+---------------------+ + +---- + .. _class_AnimationNodeOneShot_property_sync: - :ref:`bool` **sync** @@ -157,19 +164,6 @@ If :ref:`autorestart` is ``true | *Getter* | is_using_sync() | +-----------+---------------------+ -Method Descriptions -------------------- - -.. _class_AnimationNodeOneShot_method_get_mix_mode: - -- :ref:`MixMode` **get_mix_mode** **(** **)** |const| - ----- - -.. _class_AnimationNodeOneShot_method_set_mix_mode: - -- void **set_mix_mode** **(** :ref:`MixMode` mode **)** - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_array.rst b/classes/class_array.rst index 13d093994..ae49e9147 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -346,9 +346,9 @@ Returns ``true`` if the array contains the given value. - :ref:`int` **hash** **(** **)** -Returns a hashed integer value representing the array and its contents. +Returns a hashed 32-bit integer value representing the array and its contents. -**Note:** Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value. +**Note:** ``Array``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the arrays are equal, because different arrays can have identical hash values due to hash collisions. ---- diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index f571b71ea..ed62bef55 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -188,7 +188,7 @@ Number of available audio buses. | *Getter* | get_device() | +-----------+-------------------+ -Name of the current device for audio output (see :ref:`get_device_list`). +Name of the current device for audio output (see :ref:`get_device_list`). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value ``"Default"`` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to ``"Default"``. ---- @@ -229,7 +229,7 @@ Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ` - :ref:`String` **capture_get_device** **(** **)** -Name of the current device for audio input (see :ref:`capture_get_device_list`). +Name of the current device for audio input (see :ref:`capture_get_device_list`). The value ``"Default"`` means that the system-wide default audio input is currently used. ---- @@ -245,7 +245,7 @@ Returns the names of all audio input devices detected on the system. - void **capture_set_device** **(** :ref:`String` name **)** -Sets which audio input device is used for audio capture. +Sets which audio input device is used for audio capture. On systems with multiple audio inputs (such as analog and USB), this can be used to select the audio input device. Setting the value ``"Default"`` will record audio from the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. ---- diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 2922db42e..c6e2c1c20 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -91,7 +91,7 @@ Property Descriptions | *Getter* | get_area_mask() | +-----------+----------------------+ -Areas in which this sound plays. +Determines which :ref:`Area2D` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect :ref:`AudioStream`\ s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. ---- diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index d51da1734..fcfb50fa8 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -166,7 +166,7 @@ Property Descriptions | *Getter* | get_area_mask() | +-----------+----------------------+ -Areas in which this sound plays. +Determines which :ref:`Area` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect :ref:`AudioStream`\ s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. ---- diff --git a/classes/class_csgbox.rst b/classes/class_csgbox.rst index 1a2e16b52..f9cfc9437 100644 --- a/classes/class_csgbox.rst +++ b/classes/class_csgbox.rst @@ -18,6 +18,13 @@ Description This node allows you to create a box for use with the CSG system. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgcombiner.rst b/classes/class_csgcombiner.rst index 7a402f7a7..47bb85370 100644 --- a/classes/class_csgcombiner.rst +++ b/classes/class_csgcombiner.rst @@ -18,6 +18,13 @@ Description For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner node, and then do an operation that takes the two end results as its input to create the final shape. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_csgcylinder.rst b/classes/class_csgcylinder.rst index 2c872fda3..eb408ca00 100644 --- a/classes/class_csgcylinder.rst +++ b/classes/class_csgcylinder.rst @@ -18,6 +18,13 @@ Description This node allows you to create a cylinder (or cone) for use with the CSG system. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgmesh.rst b/classes/class_csgmesh.rst index 53206c157..3a573b699 100644 --- a/classes/class_csgmesh.rst +++ b/classes/class_csgmesh.rst @@ -18,6 +18,13 @@ Description This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also :ref:`CSGPolygon` for drawing 2D extruded polygons to be used as CSG nodes. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgpolygon.rst b/classes/class_csgpolygon.rst index daefcd824..8d62e9e69 100644 --- a/classes/class_csgpolygon.rst +++ b/classes/class_csgpolygon.rst @@ -18,6 +18,13 @@ Description An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also :ref:`CSGMesh` for using 3D meshes as CSG nodes. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgprimitive.rst b/classes/class_csgprimitive.rst index 71c0c610b..8197ae525 100644 --- a/classes/class_csgprimitive.rst +++ b/classes/class_csgprimitive.rst @@ -20,6 +20,13 @@ Description Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgshape.rst b/classes/class_csgshape.rst index 25aacc5ed..9ed2ddb9b 100644 --- a/classes/class_csgshape.rst +++ b/classes/class_csgshape.rst @@ -20,6 +20,13 @@ Description This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgsphere.rst b/classes/class_csgsphere.rst index 554ac7a67..522a50f12 100644 --- a/classes/class_csgsphere.rst +++ b/classes/class_csgsphere.rst @@ -18,6 +18,13 @@ Description This node allows you to create a sphere for use with the CSG system. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_csgtorus.rst b/classes/class_csgtorus.rst index 0c3ea1274..e7ffb063d 100644 --- a/classes/class_csgtorus.rst +++ b/classes/class_csgtorus.rst @@ -18,6 +18,13 @@ Description This node allows you to create a torus for use with the CSG system. +**Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance` with a :ref:`PrimitiveMesh`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. + +Tutorials +--------- + +- `Prototyping levels with CSG <$DOCS_URL/tutorials/3d/csg_tools.html>`__ + Properties ---------- diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 98415cc51..1d013099c 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -223,7 +223,7 @@ Returns ``true`` if the dictionary has all the keys in the given array. - :ref:`int` **hash** **(** **)** -Returns a hashed integer value representing the dictionary contents. This can be used to compare dictionaries by value: +Returns a hashed 32-bit integer value representing the dictionary contents. This can be used to compare dictionaries by value: :: @@ -234,6 +234,8 @@ Returns a hashed integer value representing the dictionary contents. This can be **Note:** Dictionaries with the same keys/values but in a different order will have a different hash. +**Note:** Dictionaries with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the dictionaries are equal, because different dictionaries can have identical hash values due to hash collisions. + ---- .. _class_Dictionary_method_keys: diff --git a/classes/class_environment.rst b/classes/class_environment.rst index d36203261..e21278515 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -503,7 +503,9 @@ The ambient light's energy. The higher the value, the stronger the light. | *Getter* | get_ambient_light_sky_contribution() | +-----------+-------------------------------------------+ -Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. +Defines the amount of light that the sky brings on the scene. A value of ``0.0`` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of ``1.0`` means that *all* the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. + +**Note:** :ref:`ambient_light_sky_contribution` is internally clamped between ``0.0`` and ``1.0`` (inclusive). ---- diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index d0388355b..269d84957 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -108,7 +108,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------------------------------+----------------------------+ | :ref:`int` | :ref:`port_grab_distance_horizontal` | ``24`` | +---------------------------------+----------------------------------------------------------------------------------------------------+----------------------------+ -| :ref:`int` | :ref:`port_grab_distance_vertical` | ``6`` | +| :ref:`int` | :ref:`port_grab_distance_vertical` | ``26`` | +---------------------------------+----------------------------------------------------------------------------------------------------+----------------------------+ | :ref:`Texture` | :ref:`minimap` | | +---------------------------------+----------------------------------------------------------------------------------------------------+----------------------------+ @@ -647,9 +647,9 @@ The horizontal range within which a port can be grabbed (on both sides). - :ref:`int` **port_grab_distance_vertical** -+-----------+-------+ -| *Default* | ``6`` | -+-----------+-------+ ++-----------+--------+ +| *Default* | ``26`` | ++-----------+--------+ The vertical range within which a port can be grabbed (on both sides). diff --git a/classes/class_image.rst b/classes/class_image.rst index 65ed77fa8..193812d40 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -416,6 +416,8 @@ enum **CompressMode**: .. _class_Image_constant_COMPRESS_SOURCE_NORMAL: +.. _class_Image_constant_COMPRESS_SOURCE_LAYERED: + enum **CompressSource**: - **COMPRESS_SOURCE_GENERIC** = **0** --- Source texture (before compression) is a regular texture. Default for all textures. @@ -424,6 +426,8 @@ enum **CompressSource**: - **COMPRESS_SOURCE_NORMAL** = **2** --- Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). +- **COMPRESS_SOURCE_LAYERED** = **3** --- Source texture (before compression) is a :ref:`TextureLayered`. + Constants --------- diff --git a/classes/class_input.rst b/classes/class_input.rst index 23ca07104..e55008625 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -712,7 +712,9 @@ Vibrate Android and iOS devices. - void **warp_mouse_position** **(** :ref:`Vector2` to **)** -Sets the mouse position to the specified vector. +Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the game window. + +Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if :ref:`MouseMode` is set to :ref:`MOUSE_MODE_CONFINED`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_light.rst b/classes/class_light.rst index 3721f03a6..86eb5cbfc 100644 --- a/classes/class_light.rst +++ b/classes/class_light.rst @@ -357,7 +357,9 @@ The color of shadows cast by this light. | *Getter* | get_param() | +-----------+------------------+ -Attempts to reduce :ref:`shadow_bias` gap. +Attempts to reduce :ref:`shadow_bias` gap by rendering screen-space contact shadows. This has a performance impact, especially at higher values. + +**Note:** Contact shadows can look broken, so leaving this property to ``0.0`` is recommended. ---- diff --git a/classes/class_object.rst b/classes/class_object.rst index 612c07a87..46bef38d2 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -580,7 +580,7 @@ Removes a given entry from the object's metadata. See also :ref:`set_meta` property, :ref:`Variant` value **)** -Assigns a new value to the given property. If the ``property`` does not exist, nothing will happen. +Assigns a new value to the given property. If the ``property`` does not exist or the given value's type doesn't match, nothing will happen. **Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). diff --git a/classes/class_raycast.rst b/classes/class_raycast.rst index ee50157ee..6be7f4dba 100644 --- a/classes/class_raycast.rst +++ b/classes/class_raycast.rst @@ -47,7 +47,7 @@ Properties +-------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`Color` | :ref:`debug_shape_custom_color` | ``Color( 0, 0, 0, 1 )`` | +-------------------------------+----------------------------------------------------------------------------------+-------------------------+ -| :ref:`float` | :ref:`debug_shape_thickness` | ``2.0`` | +| :ref:`int` | :ref:`debug_shape_thickness` | ``2`` | +-------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`enabled` | ``false`` | +-------------------------------+----------------------------------------------------------------------------------+-------------------------+ @@ -172,10 +172,10 @@ If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectS .. _class_RayCast_property_debug_shape_thickness: -- :ref:`float` **debug_shape_thickness** +- :ref:`int` **debug_shape_thickness** +-----------+----------------------------------+ -| *Default* | ``2.0`` | +| *Default* | ``2`` | +-----------+----------------------------------+ | *Setter* | set_debug_shape_thickness(value) | +-----------+----------------------------------+ diff --git a/classes/class_string.rst b/classes/class_string.rst index b608116d1..e6f2b0301 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -584,7 +584,9 @@ If the string is a valid file path, returns the filename. - :ref:`int` **hash** **(** **)** -Hashes the string and returns a 32-bit integer. +Returns the 32-bit hash value representing the string's contents. + +**Note:** ``String``\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the strings are equal, because different strings can have identical hash values due to hash collisions. ---- diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index d619c652d..2e5ab028d 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -114,7 +114,7 @@ Methods +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cell` **(** :ref:`int` x, :ref:`int` y, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false, :ref:`Vector2` autotile_coord=Vector2( 0, 0 ) **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| void | :ref:`set_cellv` **(** :ref:`Vector2` position, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** | +| void | :ref:`set_cellv` **(** :ref:`Vector2` position, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false, :ref:`Vector2` autotile_coord=Vector2( 0, 0 ) **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_collision_layer_bit` **(** :ref:`int` bit, :ref:`bool` value **)** | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -668,13 +668,13 @@ Overriding this method also overrides it internally, allowing custom logic to be .. _class_TileMap_method_set_cellv: -- void **set_cellv** **(** :ref:`Vector2` position, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false **)** +- void **set_cellv** **(** :ref:`Vector2` position, :ref:`int` tile, :ref:`bool` flip_x=false, :ref:`bool` flip_y=false, :ref:`bool` transpose=false, :ref:`Vector2` autotile_coord=Vector2( 0, 0 ) **)** -Sets the tile index for the given cell. +Sets the tile index for the cell given by a Vector2. An index of ``-1`` clears the cell. -Optionally, the tile can also be flipped or transposed. +Optionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile. **Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index b02c02ba0..72eab5625 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -255,7 +255,7 @@ Method Descriptions - void **add_button** **(** :ref:`int` column, :ref:`Texture` button, :ref:`int` button_idx=-1, :ref:`bool` disabled=false, :ref:`String` tooltip="" **)** -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``. +Adds a button with :ref:`Texture` ``button`` at column ``column``. The ``button_idx`` is used to identify the button. 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``. ---- @@ -311,7 +311,7 @@ Returns the :ref:`Texture` of the button at index ``button_idx`` - :ref:`int` **get_button_count** **(** :ref:`int` column **)** |const| -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. +Returns the number of buttons in column ``column``. ----