Skip to content

Commit 5482c93

Browse files
author
Godot Organization
committed
classref: Sync with current master branch (19e7490)
1 parent 8d5eeed commit 5482c93

File tree

885 files changed

+4627
-2713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

885 files changed

+4627
-2713
lines changed

classes/[email protected]

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,19 @@ Mark the following property as assigned when the :ref:`Node<class_Node>` is read
659659

660660
.. rst-class:: classref-annotation
661661

662-
**@rpc** **(** :ref:`String<class_String>` mode="authority", :ref:`String<class_String>` sync="call_remote", :ref:`String<class_String>` transfer_mode="unreliable", :ref:`int<class_int>` transfer_channel=0, ... **)** |vararg|
662+
**@rpc** **(** :ref:`String<class_String>` mode="authority", :ref:`String<class_String>` sync="call_remote", :ref:`String<class_String>` transfer_mode="unreliable", :ref:`int<class_int>` transfer_channel=0 **)**
663663

664664
Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`.
665665

666-
The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter and all arguments can be omitted, but ``transfer_channel`` always has to be the last argument. The accepted values for ``mode`` are ``"any_peer"`` or ``"authority"``, for ``sync`` are ``"call_remote"`` or ``"call_local"`` and for ``transfer_mode`` are ``"unreliable"``, ``"unreliable_ordered"`` or ``"reliable"``.
666+
The accepted values:
667+
668+
- for ``mode`` are ``"any_peer"`` or ``"authority"``;
669+
670+
- for ``sync`` are ``"call_remote"`` or ``"call_local"``;
671+
672+
- and for ``transfer_mode`` are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``.
673+
674+
The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but values related to the same argument must not be used more than once. ``transfer_channel`` always has to be the 4th argument (you must specify 3 preceding arguments).
667675

668676
::
669677

@@ -1117,3 +1125,4 @@ Returns ``true`` if the given :ref:`Object<class_Object>`-derived class exists i
11171125
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
11181126
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
11191127
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
1128+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/[email protected]

Lines changed: 70 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3603,16 +3603,74 @@ Hints that a :ref:`Color<class_Color>` property should be edited without affecti
36033603

36043604
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_TYPE_STRING** = ``23``
36053605

3606-
Hint that a property represents a particular type. If a property is :ref:`TYPE_STRING<class_@GlobalScope_constant_TYPE_STRING>`, allows to set a type from the create dialog. If you need to create an :ref:`Array<class_Array>` to contain elements of a specific type, the ``hint_string`` must encode nested types using ``":"`` and ``"/"`` for specifying :ref:`Resource<class_Resource>` types. For instance:
3606+
If a property is :ref:`String<class_String>`, hints that the property represents a particular type (class). This allows to select a type from the create dialog. The property will store the selected type as a string.
36073607

3608-
::
3608+
If a property is :ref:`Array<class_Array>`, hints the editor how to show elements. The ``hint_string`` must encode nested types using ``":"`` and ``"/"``.
3609+
3610+
3611+
.. tabs::
3612+
3613+
.. code-tab:: gdscript
3614+
3615+
# Array of elem_type.
3616+
hint_string = "%d:" % [elem_type]
3617+
hint_string = "%d/%d:%s" % [elem_type, elem_hint, elem_hint_string]
3618+
# Two-dimensional array of elem_type (array of arrays of elem_type).
3619+
hint_string = "%d:%d:" % [TYPE_ARRAY, elem_type]
3620+
hint_string = "%d:%d/%d:%s" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
3621+
# Three-dimensional array of elem_type (array of arrays of arrays of elem_type).
3622+
hint_string = "%d:%d:%d:" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]
3623+
hint_string = "%d:%d:%d/%d:%s" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]
3624+
3625+
.. code-tab:: csharp
3626+
3627+
// Array of elemType.
3628+
hintString = $"{elemType:D}:";
3629+
hintString = $"{elemType:}/{elemHint:D}:{elemHintString}";
3630+
// Two-dimensional array of elemType (array of arrays of elemType).
3631+
hintString = $"{Variant.Type.Array:D}:{elemType:D}:";
3632+
hintString = $"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
3633+
// Three-dimensional array of elemType (array of arrays of arrays of elemType).
3634+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:";
3635+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}";
3636+
3637+
3638+
3639+
Examples:
36093640

3610-
hint_string = "%s:" % [TYPE_INT] # Array of integers.
3611-
hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats.
3612-
hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
3613-
hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
36143641

3615-
\ **Note:** The final colon is required for properly detecting built-in types.
3642+
.. tabs::
3643+
3644+
.. code-tab:: gdscript
3645+
3646+
hint_string = "%d:" % [TYPE_INT] # Array of integers.
3647+
hint_string = "%d/%d:1,10,1" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).
3648+
hint_string = "%d/%d:Zero,One,Two" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
3649+
hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).
3650+
hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).
3651+
hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.
3652+
3653+
hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.
3654+
hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.
3655+
hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).
3656+
hint_string = "%d:%d/%d:Texture2D" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.
3657+
3658+
.. code-tab:: csharp
3659+
3660+
hintString = $"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1"; // Array of integers (in range from 1 to 10).
3661+
hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two"; // Array of integers (an enum).
3662+
hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum).
3663+
hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths).
3664+
hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures.
3665+
3666+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats.
3667+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings.
3668+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1).
3669+
hintString = $"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Two-dimensional array of textures.
3670+
3671+
3672+
3673+
\ **Note:** The trailing colon is required for properly detecting built-in types.
36163674

36173675
.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE:
36183676

@@ -6075,14 +6133,15 @@ Returns the minimum of two :ref:`int<class_int>` values.
60756133

60766134
:ref:`float<class_float>` **move_toward** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)**
60776135

6078-
Moves ``from`` toward ``to`` by the ``delta`` value.
6136+
Moves ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``.
60796137

60806138
Use a negative ``delta`` value to move away.
60816139

60826140
::
60836141

60846142
move_toward(5, 10, 4) # Returns 9
60856143
move_toward(10, 5, 4) # Returns 6
6144+
move_toward(5, 10, 9) # Returns 10
60866145
move_toward(10, 5, -1.5) # Returns 11.5
60876146

60886147
.. rst-class:: classref-item-separator
@@ -7108,6 +7167,8 @@ Prints:
71087167
"b": 2
71097168
}
71107169

7170+
\ **Note:** Converting :ref:`Signal<class_Signal>` or :ref:`Callable<class_Callable>` is not supported and will result in an empty value for these types, regardless of their data.
7171+
71117172
.. rst-class:: classref-item-separator
71127173

71137174
----
@@ -7206,3 +7267,4 @@ Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creatin
72067267
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
72077268
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
72087269
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
7270+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_aabb.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,3 +603,4 @@ Returns ``true`` if the AABBs are exactly equal.
603603
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
604604
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
605605
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
606+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_acceptdialog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,4 @@ The panel that fills the background of the window.
344344
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
345345
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
346346
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
347+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_aescontext.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,4 @@ Run the desired operation for this AES context. Will return a :ref:`PackedByteAr
232232
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
233233
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
234234
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
235+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_animatablebody2d.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ If ``true``, the body's movement will be synchronized to the physics frame. This
6363
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
6464
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
6565
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
66+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_animatablebody3d.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ If ``true``, the body's movement will be synchronized to the physics frame. This
7474
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
7575
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
7676
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
77+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_animatedsprite2d.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,4 @@ Stops the currently playing animation. The animation position is reset to ``0``
446446
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
447447
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
448448
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
449+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_animatedsprite3d.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,3 +368,4 @@ Stops the currently playing animation. The animation position is reset to ``0``
368368
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
369369
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
370370
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
371+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

classes/class_animatedtexture.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,4 @@ You can define any number of textures up to :ref:`MAX_FRAMES<class_AnimatedTextu
239239
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
240240
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
241241
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
242+
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`

0 commit comments

Comments
 (0)