classref: Sync with current master branch (6fd949a)

This commit is contained in:
Godot Organization
2025-11-08 03:26:56 +00:00
parent 4541167e72
commit 5e8c99c8a4
46 changed files with 2421 additions and 342 deletions

View File

@@ -3485,9 +3485,9 @@ Additionally, other keywords can be included: ``"exp"`` for exponential range ed
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM** = ``2``
Hints that an :ref:`int<class_int>` or :ref:`String<class_String>` property is an enumerated value to pick in a list specified via a hint string.
Hints that an :ref:`int<class_int>`, :ref:`String<class_String>`, or :ref:`StringName<class_StringName>` property is an enumerated value to pick in a list specified via a hint string.
The hint string is a comma separated list of names such as ``"Hello,Something,Else"``. Whitespaces are **not** removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"Zero,One,Three:3,Four,Six:6"``.
The hint string is a comma separated list of names such as ``"Hello,Something,Else"``. Whitespace is **not** removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"Zero,One,Three:3,Four,Six:6"``.
.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM_SUGGESTION:
@@ -3495,7 +3495,7 @@ The hint string is a comma separated list of names such as ``"Hello,Something,El
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ENUM_SUGGESTION** = ``3``
Hints that a :ref:`String<class_String>` property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``.
Hints that a :ref:`String<class_String>` or :ref:`StringName<class_StringName>` property can be an enumerated value to pick in a list specified via a hint string such as ``"Hello,Something,Else"``. See :ref:`PROPERTY_HINT_ENUM<class_@GlobalScope_constant_PROPERTY_HINT_ENUM>` for details.
Unlike :ref:`PROPERTY_HINT_ENUM<class_@GlobalScope_constant_PROPERTY_HINT_ENUM>`, a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
@@ -3523,7 +3523,7 @@ Hints that a vector property should allow its components to be linked. For examp
Hints that an :ref:`int<class_int>` property is a bitmask with named bit flags.
The hint string is a comma separated list of names such as ``"Bit0,Bit1,Bit2,Bit3"``. Whitespaces are **not** removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"A:4,B:8,C:16"``. You can also combine several flags (``"A:4,B:8,AB:12,C:16"``).
The hint string is a comma separated list of names such as ``"Bit0,Bit1,Bit2,Bit3"``. Whitespace is **not** removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending ``:integer`` to the name, e.g. ``"A:4,B:8,C:16"``. You can also combine several flags (``"A:4,B:8,AB:12,C:16"``).
\ **Note:** A flag value must be at least ``1`` and at most ``2 ** 32 - 1``.
@@ -4085,7 +4085,23 @@ If property has ``nil`` as default value, its type will be :ref:`Variant<class_V
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_ARRAY** = ``262144``
The property is an array.
The property is the element count of a property array, i.e. a list of groups of related properties. Properties defined with this usage also need a specific ``class_name`` field in the form of ``label,prefix``. The field may also include additional comma-separated options:
- ``page_size=N``: Overrides :ref:`EditorSettings.interface/inspector/max_array_dictionary_items_per_page<class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page>` for this array.
- ``add_button_text=text``: The text displayed by the "Add Element" button.
- ``static``: The elements can't be re-arranged.
- ``const``: New elements can't be added.
- ``numbered``: An index will appear next to each element.
- ``unfoldable``: The array can't be folded.
- ``swap_method=method_name``: The method that will be called when two elements switch places. The method should take 2 :ref:`int<class_int>` parameters, which will be indices of the elements being swapped.
Note that making a full-fledged property array requires boilerplate code involving :ref:`Object._get_property_list()<class_Object_private_method__get_property_list>`.
.. _class_@GlobalScope_constant_PROPERTY_USAGE_ALWAYS_DUPLICATE: